This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
- A server running one of the following operating systems: AlmaLinux 9.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Node.js on AlmaLinux 9
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo dnf clean all sudo dnf update sudo dnf groupinstall "Development Tools"
Step 2. Installing Node.js on AlmaLinux 9.
By default, Node.js is available on the AlmaLinux 9 base repository. Now, checklist the available Nodejs streams by running the following command:
sudo dnf module list nodejs
From the above output, Node.js version 10 is the default. To install another latest version, we need to enable and install it using this command below:
sudo dnf module enable nodejs:16 sudo dnf install nodejs
Finally, verify Node.js and npm versions using this command:
$ node -v v16.15.1
$ npm -v 8.2.2