Installing Node.js on Centos 5

2013/12/22 11:28

Nothing's ever straightforward in the world of CentOS, especially for CentOS 5 now in mid-sunset.

Commands

  1. Make sure you have python 2.6 installed. Do not uninstall python 2.4 as everything seems to need it. yum install python26. This should give you an executable python26 while leaving python as the 2.4 version.
  2. Download the latest and greatest node package: wget http://nodejs.org/dist/node-latest.tar.gz; tar zxvf node-latest.tar.gz
  3. cd into the new node dir (this will be unique to the current version).
  4. vi configure
  5. Change #!/usr/bin/env python to #!/usr/bin/env python26
  6. ./configure; make; sudo make install
  7. Have fun with node!