How to install NodeJS on CentOS 7?

Windows Articles

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows...

Install Matomo on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install Matomo on Ubuntu 20.04. It's quite useful to measure the traffic to our...

How to change DNS in Windows 10

Hi! Today we will talk a bit about networks. In fact, we will touch on a topic related to connectivity. Specifically we will see...

The new Windows 10 file explorer will arrive with 21H2 update.

Hello! Microsoft does not stop working (except at Christmas) to continue polishing to Windows 10. In fact, users are gradually receiving the 20H2 update....

How to create an FTP server in Android

Hello! How are you? Currently sharing files from your PC to Android can be more comfortable and easy, without the need to use a...
angeloma
angeloma
Senior Writer and partner

As I have been saying in other posts, web technologies are a predominant market among developers. Therefore, all knowledge of this nature is focused on providing applications for the web. Some of these technologies is NodeJS. So, in this article, you will learn how to install NodeJS on a CentOS 7 server.

NodeJS is a runtime environment for server-side web applications. In other words, it is to achieve the implementation of JavaScript but on the server side and performing more advanced processes.

One of the most powerful reasons that make NodeJS very popular is that it allows applications to make a large number of connections to the server without losing performance. In short, scalability and performance are its main characteristics.

So, let’s install NodeJS.

Many roads, same destination

To install NodeJS we have two recommended and simple ways in our CentOS 7 server.

The first is to use the EPEL repository. This repository, which is almost mandatory for CentOS 7 users, also has updated versions of NodeJS in its packages.

The other is to do it using the Node Version Manager. This method has one advantage and that is that it allows us to install a specific version of NodeJS.

I’ll show you how to do it with both methods.

1. Install NodeJS using EPEL Repository

As I said before, you can install NodeJS on CentOS 7 using the EPEL repository. It’s really simple so let’s go for it.

Access the server and write the following:

:~$ su
:~# yum install epel-release

1.- Enabling the EPEL repository
1.- Enabling the EPEL repository

Now, install the NodeJS package.

:~# yum install nodejs

2.- Install NodeJS
2.- Install NodeJS

After that, check the installed version.

:~# nodejs -v

3.- Checking the installed version
3.- Checking the installed version

NPM is the NodeJS package manager. You can also install it.

:~# yum install npm

And that’s it.

2. Install NodeJS using Node Version Manager

If you want to install a specific version of NodeJS, this method is for you. Doing it is very easy. Let’s go.

First, go to NVM’s GitHub site and check out their latest stable version. Then run this command.

:~# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

4.- Downloading NVM script
4.- Downloading NVM script

At the time of writing this post, the latest stable version of NVM is 0.33.11.

:~# source ~/.bash_profile

5.- Making NVM available for your user
5.- Making NVM available for your user

Then, show the available versions of NodeJS.

:~# nvm list-remote

6.- All NodeJS version available to download
6.- All NodeJS version available to download

I will install the lastest.

:~# nvm install 11.4.0

7.- Install NodeJS using NVM
7.- Installing NodeJS using NVM

Next, check the NodeJS version.

:~# node --version

8.- NodeJS installed
8.- NodeJS installed

And that’s it.

Conclusion

As we have seen, installing NodeJS using the EPEL repository is really simple, but it doesn’t bring us an updated version of it. However, using NVM we can choose which version to install.

Please share this post with your friends.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows...

Install Matomo on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install Matomo on Ubuntu 20.04. It's quite useful to measure the traffic to our...

How to change DNS in Windows 10

Hi! Today we will talk a bit about networks. In fact, we will touch on a topic related to connectivity. Specifically we will see...

The new Windows 10 file explorer will arrive with 21H2 update.

Hello! Microsoft does not stop working (except at Christmas) to continue polishing to Windows 10. In fact, users are gradually receiving the 20H2 update....

How to create an FTP server in Android

Hello! How are you? Currently sharing files from your PC to Android can be more comfortable and easy, without the need to use a...
x