CrownCloud Wiki

CrownCloud - Internet Services

User Tools

Site Tools


Installing NodeJS on CentOS

Since we're compiling nodejs from source in this guide, it'll work on CentOS 5, 6 and 7!

Node.js is an open source, cross-platform runtime environment for server-side and networking applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on OS X, Microsoft Windows, Linux, FreeBSD, NonStop, IBM AIX, IBM System z and IBM i.

  • Log in as root using putty or your SSH Client of choice
  • Update all the repository with the latest versions
    •  yum -y update 
  • Install the latest Development tools needed to compile node.js, this includes compilers and various libraries needed to compile the source code
    •  yum -y groupinstall "Development Tools" 
  • Navigate to /usr/src/ folder, where all the software are usually installed on Linux
    •  cd /usr/src/ 
  • Download the latest NodeJS source code
    •  wget 

      This is the currently the latest version of node released at the time of writing this tutorial. Go to NodeJS Website and look for the current stable version of node and just replace it in the URL when installing on your VPS.

  • Unzip the package we just downloaded
    •  tar zxf node-v0.12.7.tar.gz 
  • Navigate into the unzipped folder
    • cd node-v0.12.7
  • Now our nodejs source is extracted and placed in right place
  • Now we need to configure our compiler command
    •  ./configure 
  • Now we need to actually compile with the configurations that we have set in the previous command, It'll take a few minutes for the process to complete
    •  make 
  • This'll place the compiled binaries in system path. By default this'll be installed in /usr/local/bin/node
    •  make install 
  • If you get the version number then awesome! you have installed the latest version of node on your system
    •  node -v 
  • Done!
installing_nodejs_in_centos.txt · Last modified: 2015/09/21 19:14 by speedbus