Node.JS+MongoDB on CentOS

Another selling point is that if you use node.js with a database server like mongodb, it allows to code the whole web application in Javascript. Though most developers have a love/hate relationship with Javascript that varies depending on the day, it simplifies code writing by using javascript all the way from the Server side to the client Side.

Because it is relatively recent, it does not run out of the box on Centos Installs. Here are the steps I used:

#Install the EPEL/ IUS repositories from
yum localinstall epel-release-6-5.noarch.rpm
yum localinstall ius-release-1.0-11.ius.centos6.noarch.rpm
#Install Mongo DB:
yum install mongodb-server
#install build tools
yum install openssl-devel gcc-c++ gcc
#Download node.js
tar xzvf node-latest.tar.gz
#change to node directory – version 0.10.5 as of this writing
#your actual directory name may be slightly different
cd node-v0.10.5
#build node
make install

Leave a Reply

Your email address will not be published. Required fields are marked *