Find us on facebook

May 29, 2015

Install node.js on CentOS 6

Update software repository to the latest versions:
yum -y update

Install "Development Tools". It's a group of tools for compiling software from sources.
yum -y groupinstall "Development Tools"



Move to /usr/src directory - the usual place to hold software sources.
cd /usr/src

pick the latest compressed source archive from Node.js website at http://nodejs.org/download/.
wget http://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz



Uncompress the source files and move into that directory.
tar zxf node-v0.12.4.tar.gz
cd node-v0.12.4

Prepare compiler commands, by executing the configure script:
./configure


It will read the properties of the system to prepare compiler flags. Ie. it could be a system architecture (32/64bit, CPU specific flags etc). With it, Now ready to actually compile the source now. To do that, just type:
make


To make this available system-wide:
make install



No comments:

Post a Comment