Node.js is a free and open-source JavaScript library that is used to build scalable network applications. It is built on Chromeās V8 JavaScript engine and allows you to develop complex and very scalable web applications easily. Node.js is designed for the back-end application. However, you can also use it as a full-stack and front-end solution. It is cross-platform and runs on different platforms including Windows, Linux, Unix, and Mac OS X. It is simple, lightweight, and supports a non-blocking I/O model and event-driven architecture.
In this post, we will show you how to install Node.js and NPM on Oracle Linux 10.
Step 1 – Install Node.js Using Oracle Linux Repository
By default, Node.js is included in the Oracle Linux default repository.
You can install the Node.js by running the following command:
dnf install nodejs -y
Once Node.js is installed, you can verify the Node.js version using the following command:
node --version
You will get the following output:
v22.19.0
To verify the NPM version, run the following command:
npm -v
Sample output:
10.9.3
Step 2 – Install Node.js From NodeSource Repository
By default, the latest version of Node.js is not available in the Oracle Linux 10 default repo, so you can use the NodeSource repository to install the latest version of Node.js.
First, install the curl command utility with the following command:
dnf install curl -y
Next, add the NodeSource repository for version 24 using the following command:
curl -sL https://rpm.nodesource.com/setup_24.x | bash -
To install the latest Node.js version, run the following command:
dnf install nodejs
After the installation, verify the Node.js version with the following command:
node -v
You should see the following output:
v24.12.0
To verify the NPM version, run the following command:
npm -v
You should see the following output:
11.6.2
Step 3 – Install Node.js Using NVM
NVM stands for Node Version Manager, which provides an easy way to install and manage multiple Node.js versions in the same system.
To install NVM, run the following command:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
This command will install NVM to your system and add the NVM path to the .bashrc file.
Next, activate the NVM system path using the following command:
source ~/.bashrc
You can now verify the NVM version using the following command:
nvm --version
You should see the following output:
0.40.3
To install the latest Node.js version, run the following command:
nvm install node
You should see the following output:
Downloading and installing node v25.2.1... Downloading https://nodejs.org/dist/v25.2.1/node-v25.2.1-linux-x64.tar.xz... ################################################################################################################################################################################# 100.0% Computing checksum with sha256sum Checksums matched! Now using node v25.2.1 (npm v11.6.2) Creating default alias: default -> node (-> v25.2.1)
To install the latest stable Node.js version, run the following command:
nvm install --lts
You should see the following output:
Installing latest LTS version. Downloading and installing node v24.12.0... Downloading https://nodejs.org/dist/v24.12.0/node-v24.12.0-linux-x64.tar.xz... ################################################################################################################################################################################# 100.0% Computing checksum with sha256sum Checksums matched! Now using node v24.12.0 (npm v11.6.2)
To list all Node.js versions installed in your system, run the following command:
nvm ls
You should see the following output:
-> v24.12.0
v25.2.1
default -> node (-> v25.2.1)
To set the default Node.js version, run the following command:
nvm use v24.12.0
You should see the following output:
Now using node v24.12.0 (npm v11.6.2)
Conclusion
This guide taught us how to install Node.js using three different ways on Oracle Linux 10. You can now choose your preferred method to install the Node.js on Oracle Linux 10. Give it a try on your dedicated server from Atlantic.Net!