In this article, we would install Node.js from the source.
Before installing the Node.js latest version. First, we would have to download Node.js from the source. We can download the Node.js source using wget command.
On the server, we will use the wget command in order to download the package.
Then extract the archive
tar xzvf node-v10.16.1.tar.gz
Before installing Node.js we should have the following packages installed on your server. If not you can download the packages using this command:-
sudo yum install gcc gcc-c++
Now we are ready to install.
The compilation will take time. Once finished run the following command to install it.
In order to check if it is installed or not run the following command:
If you see this following number then its installed on your server.