How To Install Node.js on a CentOS 7 server

How To Install Node.js on a CentOS 7 server

Node.js is a Javascript platform for server-side programming. It allows users to easily create networked applications that require backend functionality. By using Javascript as both the client and server language, development can be fast and consistent.

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.

wget http://nodejs.org/dist/latest-v10.x/node-v10.16.1.tar.gz

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.

./configure
make

The compilation will take time. Once finished run the following command to install it.

make install

In order to check if it is installed or not run the following command:

node --version
v10.16.1

If you see this following number then its installed on your server.

install Node.js on centos 7Node.js
Comments (0)
Add Comment