In this article, we will demonstrate how to install Node on AlmaLinux 9, so please follow the instructions below.
Basic requirements
- AlmaLinux 9 OS
- A root user account or a standard user account with administrative privileges.
1. Download the Node setup package
Run the following command in the server console or ssh terminal to download NodeJS version 16, as the version 16 is recommended at the moment of writing this article.
curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
2. Run the Node installer
To install the downloaded NodeJS 16.x. and npm package manager run the following command.
sudo yum install -y nodejs
3. Verify the installation
To verify that NodeJS and NPM are installed successfully run the following command to get their versions.
node --version
The response should be something like this
npm --version
The response for npm version should be something like this
Conclusion
Following these 3 easy steps, we were able to install and verify node versions on AlmaLinux 9. You could install other node versions as well, just by changing the version number in the downloaded install file. https://rpm.nodesource.com/setup_16.x
I hope this article was helpful.
Thanks for reading.