Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Node JS queries on Linux Systems.
In this context, we shall look into how to install NodeJS on Rocky Linux 8.4.
How to Check the NodeJS modules on AppStream repositories ?
NodeJS is available in Rocky Linux AppStream repositories. To see the available NodeJS modules, run the following command:
$ sudo dnf module list nodejs
If the version of nodejs is now up to date then follow the process below to Install the latest version.
How to Install the latest NodeJS release ?
Now, to install the latest release of NodeJS, which at the time of this guide is NodeJS 14.x, invoke the command:
$ sudo dnf module install nodejs:14
This command will install the latest NodeJS module alongside NPM ( Node Package Manager ) and other dependencies.
The installation of Node.JS proceeds and terminates successfully without any errors.
Once completed, verify the NodeJS version with the below command:
$ node -v
$ node --version
How to uninstall NodeJS from Rocky Linux System ?
To remove NodeJS from your system simply execute:
$ sudo dnf module remove nodejs
To confirm that NodeJS is uninstalled, check the version once again:
$ node -v
[Need help in Installing any Software on any Linux System ? We can help you. ]