Today in this tutorial we’ll be installing node.js and npm on centos based server eg, cwp, vestacp, cpanel, webmin etc. Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
STEP 1 :
Run as root on RHEL, CentOS, CloudLinux or Fedora:
Install build tools, this tools are necessary for the nodejs installation:
yum install gcc-c++ make
OR
yum groupinstall 'Development Tools'
Now enable node.js yum repository :
To install NodeJS 13.x
curl -sL https://rpm.nodesource.com/setup_13.x | bash -
To install NodeJS 12.x
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
To install NodeJS 10.x
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
To install NodeJS 8.x
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
To install NodeJS 6.x
curl -sL https://rpm.nodesource.com/setup_6.x | bash -
STEP 2 :
Now we’re going to install node.js and NPM:
yum install nodejs -y
To check the version of npm and node.js run this commands :
[root@mysterydata ~]# npm -v 6.14.4 [root@mysterydata ~]# node -v v12.16.3
2 comments
Hi! Thanks for your tuts.
Nodejs go with mongodb
Can you known me how to install mongodb on vestaacp
you can use official doc to install mongodb
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/