- 1 CentOS Node.js / Express.js / Derby.js / Meteor.js is EASY!
- 2 Install Database engine
- 3 Install Node.js / Express.js / Derby.js / Meteor.js
- 4 Node.js + NPM
- 5 NPM
- 6 Summary
- 7 Install Calipso CMS on Centos 6.3
- 8 Meteor.js
- 9 Conclusion
- 10 Read More
- 11 Installing nginx on Centos 6.3
CentOS Node.js / Express.js / Derby.js / Meteor.js is EASY!
I am using CentOS minimal 6.5, but the following instructions have been tested on 6.3+ and probably works on earlier versions also.
Note: this article was updated in 02, march, 2014.
Install Database engine
Before we start, if you need, make sure you have database server installed. most modern web application will probably use one. there are many good (and even free!) solutions. choose whats fits you best. if you unsure, you can do it later.
If you need help installing your favorite DB engine on your CentOS server, follow this tutorial for installation guide.
Install Node.js / Express.js / Derby.js / Meteor.js
and now, for what we’ve came in for:
Node.js + NPM
there are several options to install node.js:
- Using YUM
- Compile from source
(1 – RECOMMENDED) Using YUM
There are several repos to help you install Node.js easily.
If you don’t have EPEL repository yet, follow this instructions. and then:
yum install nodejs npm
to get the isntalled node.js version.
(2) Compile from source
Check here to see if there is newer version of node.js.
To compile from source:
yum -y groupinstall "Development Tools" cd /usr/src wget http://nodejs.org/dist/v0.11.9/node-v0.11.9.tar.gz tar zxf node-v0.10.4.tar.gz cd node-v0.10.4 ./configure make make install
To be able to run an executable in /usr/local/bin using sudo, you have to add the folder /usr/local/bin to your secure_path using:.
Look for secure_path, and append to it: “:/usr/local/bin”.
(2) Compile from source – GitHub
You can also compile the nightly build (updated with the latest code written) using Git.
You have all the instuctions on the GitHub page if you would like to.
We have finished installing Node.js and npm. npm is a packaging manager for node.js.
Global vs normal install
install npm module to current directory:
npm install <package>
modules will be installed to ‘node_modules’ folder inside the current directory.
install npm module to global directory
npm install -g <package>
The package will be installed to /usr/lib/~node_modules.
Most of the time you’d want to install the packages locally, but sometimes you want to install globally to use the package to run from command.
example for package you’d want to install globally is express.js for it’s command line.
npm install -g express
express myapp cd myapp node app
npm install -g derby
derby new derbyapp cd derbyapp node server
if you searching for a CMS (Content Managment System) Like WordPress/Joomla/drupal for Node.js, visit:
another speaked of HTTP Server is Meteor. here link to installation manual: http://meteorserver.org/installation/
Meteor works only with MongoDB.
note from the Derby Team: Our take on Derby vs. Meteor
as you can see, it’s easy to install using npm new packages for Node.
Have fun with your new shiny Node.js , Express.js , Derby.js & Meteor.js on your Centos server.
many devs are using nginx server to reverse proxy multiple Node.js applications on the same port.
Have fun with your centos node.js