How to Install Node.js in RHEL 8
In this article, we will guide you on how to install the latest version of Node.js in RHEL 8 Linux distribution.
- RHEL 8 with Minimal Installation
- RHEL 8 with RedHat Subscription Enabled
- RHEL 8 with Static IP Address
- How to Setup a Developer Workstation in RHEL 8
Installing Node.js on RHEL 8
1. To install the latest version of Node.js, you need to install development tools such as make, git, gcc on your system using the following dnf command.
# dnf groupinstall "Development Tools"
2. Next, check the available Node.js package contained in the Application Stream Repository using the following command.
# dnf module list nodejs
3. Next, install the default Node.js module by running the following command.
# dnf module install nodejs OR # dnf install @nodejs
If you are a developer, you can use the development profile to install the libraries that enable you to build dynamically loadable modules, as follows:
# dnf module install nodejs/development
4. To install a minimal set of Node.js packages, run the following command.
# dnf module install nodejs/minimal
5. Once you have installed Node.js on your system, use the following commands to check the version and location of the nodejs.
# node -v # npm -v # which node # which npm
If you are new to Node.js, the following guides should get you started with learning and using it for application development:
- How to Write Your First Node.js App in Linux
- 14 Best NodeJS Frameworks for Developers in 2019
- How to Configure Nginx as Reverse Proxy for Nodejs App
- How to Install PM2 to Run Node.js Apps on Production Server
That’s all for now! If you have any queries or additions, don’t hesitate to let us know via the feedback form below.