April 19, 2024
node.js

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.

Vedant Kumar

Currently I'm working as an Implementation Engineer, Started my career as an System Administrator - Linux. Additionally loves to explore new technologies and research about new open-source software that ease the development cycle.

View all posts by Vedant Kumar →

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

close

Ad Blocker Detected!

VEDANT EXPLAINS
We've noticed that you are using an ad blocker. Advertising helps fund our server cost and keep it truly independent. It helps to build our content creator team. So please disable your ad blocker, and help us to keep providing you with free- great content - for free. Thank you for your support.

Refresh