{"id":4236,"date":"2014-08-19T06:58:09","date_gmt":"2014-08-19T11:58:09","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=4236"},"modified":"2023-08-01T02:28:16","modified_gmt":"2023-08-01T07:28:16","slug":"how-to-install-nodejs-bower-and-gulp-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-nodejs-bower-and-gulp-on-a-centos-7-vps\/","title":{"rendered":"How to install NodeJS, Bower and Gulp on a CentOS 7 VPS"},"content":{"rendered":"
<\/div>

\"node.jsThe following article will guide you through the steps of installing NodeJS, Bower and Gulp on a CentOS 7 VPS<\/a><\/strong>.<\/p>\n

What is NodeJS?<\/strong><\/p>\n

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

What is Bower?<\/strong><\/p>\n

Bower<\/a> is a package manager for managing web frameworks<\/strong>, libraries<\/strong>, utilities<\/strong>, assets<\/strong> etc. It is a must-have tool for any web-developer out there.<\/p>\n

What is Gulp?<\/strong><\/p>\n

Gulp<\/a> is a streaming build system. It is very fast<\/strong>, simple<\/strong> and efficient<\/strong>. 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<\/a> plans<\/strong>.<\/p>\n

<\/p>\n

UPDATE THE SYSTEM<\/b><\/h4>\n

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

## screen -U -S node-screen\n## yum update<\/pre>\n

INSTALL SOME PACKAGES<\/b><\/h4>\n

Since we are going to build NodeJS<\/strong> 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<\/code> commands:<\/p>\n

## yum install yum-utils bzip2 bzip2-devel wget curl tar\n## yum groupinstall \"Development Tools\"<\/pre>\n

INSTALL NODEJS<\/b><\/h4>\n

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

## cd \/opt\n## wget http:\/\/nodejs.org\/dist\/v0.10.30\/node-v0.10.30.tar.gz\n## tar zxf node-v0.10.30.tar.gz\n## cd node-v0.10.30<\/pre>\n

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

## .\/configure --prefix=\/usr\/local<\/pre>\n

Once the configuration of the sources is finished, compile and install NodeJS<\/strong> using the following commands:<\/p>\n

## make\n## make install<\/pre>\n

Finally, check NodeJS version<\/strong> using:<\/p>\n

## node -v<\/pre>\n

INSTALL BOWER<\/b><\/h4>\n

bower<\/code> can be easily installed using NodeJS package manager known as npm<\/code>. So, run the following command to install bower<\/code> globally on the CentOS 7<\/strong> system:<\/p>\n

## npm install bower -g<\/pre>\n

check bower’s version<\/strong> using the command below:<\/p>\n

## bower -v<\/pre>\n

INSTALL GULP<\/b><\/h4>\n

gulp<\/code>, same as bower<\/code>, can be easily installed using NodeJS package manager npm<\/code>.<\/p>\n

## npm install gulp -g<\/pre>\n

check gulp’s version<\/strong> using:<\/p>\n

## gulp -v<\/pre>\n

WHAT’S NEXT?<\/b><\/h4>\n

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:<\/p>\n