Install node.js On RHEL/CentOS


Installing node.js is as simple as downloading the tarball from Node.js, unpacking the contents to any chosen directory & setting the PATH variable. Below are the steps to install it in 2 mins 😉 Here in this case, I copied the tarball to /opt/app directory.

  • [root@server ~]# cd /opt/app
  • [root@server node-v0.10.35-linux-x64]# tar zxf /opt/app/node-v0.10.35-linux-x64.tar.gz
  • [root@server node-v0.10.35-linux-x64]# echo “export PATH=$PATH:/opt/app/node-v0.10.35-linux-x64/bin” >> /etc/bashrc
  • [root@server node-v0.10.35-linux-x64]# source /etc/bashrc
  • Add below line in /etc/profile : –

export PATH=/opt/app/node-v0.10.35-linux-x64/bin:$PATH

  • [root@server node-v0.10.35-linux-x64]# source /etc/profile
  • Check if it’s installed or not : –
[root@vhedtdspci01 node-v0.10.35-linux-x64]# which node
/opt/app/node-v0.10.35-linux-x64/bin/node
[root@vhedtdspci01 node-v0.10.35-linux-x64]# node --version
v0.10.35
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s