
Now you have successfully installed Nodejs on CentOS Stream 9. If you wish to uninstall Node.js and npm packages, you can run the command, sudo rm -rf /var/cache/yum You can use any of the codes below: curl -o- | bash Install Specific Node.js Version using NVM

OR you can Install via NVM as shown below. Run the following command list the modules that provide the NodeJS package, sudo yum -y install nodejsĬheck the version Once the installation is complete, node -version It's necessary for compiling and installing native add-ons from the npm registry, dnf groupinstall 'Development Tools' Installing Node.js Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser. The output should be like the following: 3.10.10 6.How to Install Node.js on CentOS Stream 9 To verify if the npm installation was successful, issue the following command: npm -v The output should be like the following: v6.11.5 5. To verify if the Node.js installation was successful, issue the following command: node -v In this section, we will show you how to install the Yarn package from the Rocky Linux repository. Next, verify the Node.js version with the following command. To compile and install native add-ons from the npm repository we also need to install build tools: sudo yum install gcc-c++ make Once the repository is added, install the Node.js and NPM package using the following command: dnf install nodejs npm -y. Once the NodeSource repository is enabled we can proceed with the Node.js v6 LTS and npm installation: sudo yum install nodejs 4.

If you want to enable the Node.js v8 repository instead of the command above run the following command: curl -silent -location | sudo bash. Once the EPEL repository is enabled run the following command to add the Node.js v6 LTS repository: curl -silent -location | sudo bash. To enable the EPEL repository on your CentOS 7 VPS, issue the following command: sudo yum install epel-release

We will install Node.js v6 LTS and npm from the NodeSource repository which depends on the EPEL repository being available. Install Node.js and npm from the NodeSource repository Update the system and install necessary packages yum install curl sudo 3. Install Node.js and npm from the NodeSource repositoryġ. Update the system and install necessary packages
