Page 1 of 1

[HowTo] Install Nodejs and NPM on VestaCP

Posted: Tue Sep 11, 2018 6:56 pm
by xorro
STEP 1 :
Run as root on RHEL, CentOS, CloudLinux or Fedora:

Install build tools, this tools are necessary for the nodejs installation:

Code: Select all

yum install gcc-c++ make
OR
yum groupinstall 'Development Tools'
Now enable node.js yum repository :

To install NodeJS 10.x

Code: Select all

curl -sL https://rpm.nodesource.com/setup_10.x | bash -
To install NodeJS 8.x

Code: Select all

curl -sL https://rpm.nodesource.com/setup_8.x | bash -
To install NodeJS 6.x

Code: Select all

curl -sL https://rpm.nodesource.com/setup_6.x | bash -
STEP 2 :
Now we’re going to install node.js and NPM:

Code: Select all

yum install nodejs -y
To check the version of npm and node.js run this commands :

Code: Select all

[root@server ~]# npm -v
5.6.0

[root@server ~]# node -v
v10.1.0