How to install NodeJS, Bower and Gulp on a CentOS 7 VPS

node.js bowerThe following article will guide you through the steps of installing NodeJS, Bower and Gulp on a CentOS 7 VPS.

What is NodeJS?

It is a platform built on Chrome’s JavaScript runtime (V8) for easily building fast, scalable network applications. NodeJS uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

What is Bower?

Bower is a package manager for managing web frameworks, libraries, utilities, assets etc. It is a must-have tool for any web-developer out there.

What is Gulp?

Gulp is a streaming build system. It is very fast, simple and efficient. It utilizes the power of node’s streams, so you get fast builds that don’t write intermediary files to disk, especially when developing on one of our blazing fast SSD VPS hosting plans.

UPDATE THE SYSTEM

OK, before proceeding any further, SSH to your server, initiate a screen session and make sure your CentOS VPS is up-to-date by issuing the following commands:

## screen -U -S node-screen
## yum update

INSTALL SOME PACKAGES

Since we are going to build NodeJS from source, we need to install some build dependencies as well as some useful packages, so go ahead and install these packages using the following yum commands:

## yum install yum-utils bzip2 bzip2-devel wget curl tar
## yum groupinstall "Development Tools"

INSTALL NODEJS

Make sure you always get the latest version of NodeJS. At the time of writing this article, the latest NodeJS version is v0.10.30. We are going to download and extract NodeJS archive within the /opt directory, so proceed using the commands below:

## cd /opt
## wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz
## tar zxf node-v0.10.30.tar.gz
## cd node-v0.10.30

Next, let’s configure NodeJS sources by setting the --prefix flag to /usr/local, so that NodeJS will be installed in this location and will be usable to all users on the VPS.

## ./configure --prefix=/usr/local

Once the configuration of the sources is finished, compile and install NodeJS using the following commands:

## make
## make install

Finally, check NodeJS version using:

## node -v

INSTALL BOWER

bower can be easily installed using NodeJS package manager known as npm. So, run the following command to install bower globally on the CentOS 7 system:

## npm install bower -g

check bower’s version using the command below:

## bower -v

INSTALL GULP

gulp, same as bower, can be easily installed using NodeJS package manager npm.

## npm install gulp -g

check gulp’s version using:

## gulp -v

WHAT’S NEXT?

Next, you may want to check NodeJS, Bower and Gulp official documentation to learn more about these great tools and get familiar with their operations. Recommended resources, besides many helpful articles on the Internet, are their official documentation pages available at:


LET US DO THIS FOR YOU?

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install NodeJS, Bower and Gulp for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment