How to Install Node.js 16 on CentOS 7

How to Install Node.js 16 on CentOS 7

May 30, 2024

Node.js is a powerful JavaScript runtime that allows you to build scalable and efficient server-side applications. In this tutorial, we’ll walk through the steps to install Node.js 16 on a CentOS 7 server. Whether you’re a beginner or an experienced developer, this guide will help you get started.


Before we begin, make sure you have the following:

  • A CentOS 7 server with SSH access (you can follow a tutorial on how to login to a Linux VPS with SSH).
  • Basic knowledge of the Linux command line.

Step 1: SSH into Your CentOS 7 Server

First, log in to your CentOS 7 server via SSH as the root user. If you’re not familiar with SSH, follow the tutorial linked above.

Step 2: Update CentOS

Update your CentOS system to ensure you have the latest packages:

yum update -y

Step 3: Install Node.js 16 on CentOS 7

Now let’s install Node.js 16 using the NodeSource repository:

  1. Install Required Libraries: Install the gcc-c++ and make libraries (necessary for building native addons):
    yum install -y gcc-c++ make
  2. Add the NodeSource Repository: Add the NodeSource Node.js 16.x repository:
    curl -sL | sudo -E bash –
  3. Install Node.js and npm:
    sudo yum install -y nodejs

Step 4: Verify the Installation

Confirm that Node.js and npm are installed by checking their versions:

node –version npm –version

You should see the versions displayed, indicating that Node.js 16 is successfully installed.


Congratulations! You’ve now installed Node.js 16 on your CentOS 7 server. You’re ready to start building amazing applications. If you encounter any issues or need further assistance, feel free to ask!

Leave A Comment


Hello! We are a group of skilled developers and programmers.

Hello! We are a group of skilled developers and programmers.

We have experience in working with different platforms, systems, and devices to create products that are compatible and accessible.