Install NodeJS on CentOS 6 – 7

Install Latest NodeJS on CentOS 6 or 7

1. Add Repo and Install NodeJS

For Stable Release:-

$ yum install -y gcc-c++ make
$ curl -sL | sudo -E bash –

$ yum install nodejs


2. Check the version for Node and NPM

$ node -v


$ npm -v



3. Create a Demo Server

$ vim demo_server.js

add below lines

var http = require(‘http’);
http.createServer(function (req, res) {
res.writeHead(200, {‘Content-Type’: ‘text/plain’});
res.end(‘Welcome To EasyOraDBA’);
}).listen(3005, “”);
console.log(‘Server is running at’);

4. Start the Node Server

[root@easyoradba CordovaApps]# node demo_server.js
Server is running at

Go to your Browser and Paste the URL, your WebServer has been started on port 3005