Installing Node on CentOS

Installing Node on CentOS

Justin Tallant

The Inactive Record

Stack Overflow GitHub Twitter Linked In RSS Feed




Things I’ve Built

You are here:Home Web Development Installing Node on CentOS

Justin Tallant September 16, 2012

Installing Node on CentOS

I’ve recently installed NodeJS on CentOS so I can make use of it on my web server. It took a decent amount of googling and I came across a couple good resources that I’ve decided to combine here in hopes to save someone else time. Some of this information is taken from other blog posts in which case I have linked to the source. You’ll need command line access and basic Unix skills.

Node requires Python 2.6+

python -V make sure that is a capital V

If you are less than 2.6 then you need to install a newer version of Python but don’t worry it’s easy.

First off you need to recognize yum’s dependency on Python 2.4. Simply replacing this will break your passing semblance of a package manager. We will be using this later so not breaking is the preferred path. Python versions can live in relative harmony together. Download the Python source and untar it to some directory. I use /opt or ~/source for all of my non-native additions. You can choose whatever you want.

– Joshua Kehn

cd /opt


tar -xf Python-2.7.3.tgz

cd Python-2.7.3

yum install gcc



make altinstall

The altinstall part is key, as it will resist installing the binary to the default /usr/bin/python path, overriding the needed 2.4 version of Python. On my CentOS installation it put it in /usr/local/bin/python2.7. Now you have a fully functional installation of Python residing happily on your system. It should be accessible by using python2.7 wherever you use python.

– Joshua Kehn

Now to install Node


yum localinstall –nogpgcheck nodejs-stable-release.noarch.rpm

yum install nodejs-compat-symlinks npm

rm nodejs-stable-release.noarch.rpm

If the following two commands work then you are good to go.

node –version

npm –version

Filed Under: Web Development Tagged With: NodeJS, Unix 11 Comments

Related Posts

Tweeting from the command line

Basic Unix and Git Basics – Pulling From and Pushing to Github

Author Info

Justin Tallant

An ENTJ personality type. Educational Deviant. Addicted to Hacker News. Follow me @jtallant.

Find Something

Recent Posts

WordPress is not a web application framework

Reflecting on 2012

Project Euler Problem 8 in Ruby

Project Euler Problem 5 in Ruby

Project Euler Problem 6 in Ruby

Popular Tags

Ruby Programming WordPress Unix php Genesis Chicago Code Academy



Project Euler

Web Development


Latest Tweets

about 16149 days ago

Bits of Wisdom

“It is not because things are difficult that we do not dare, it is because we do not dare that they are difficult.” — Seneca

© 2014 Justin Tallant • Balance Theme on the Genesis Framework

via Installing Node on CentOS.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s