Installing gulp on CentOS 6.5 / RHEL6

As a bit of background, the server used in this example is a 64 bit, 1GB Rackspace Performance with CentOS 6.5 & SELinux enabled.

If you're not running as a production box or are on a fresh install, always start with yum update -y to get the most recent packages.

node.js is available from the EPEL repository. This is not enabled by default, and if you have not already done so it can be done so rather easily.

To check if you have EPEL already, run yum repolist. If you need to enable it:

sudo rpm --import https://fedoraproject.org/static/0608B895.txt
sudo rpm -Uvh http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Now to install node.js, npm, and gulp:

# Install node.js:
yum install nodejs npm --enablerepo=epel

# Install gulp globally
npm install gulp -g

To ensure you have matching versions of your globally installed gulp and the local project version, navigate to the directory with your gulpfile.js and (re)run npm install gulp --save-dev.

Overall this should only take a few minutes to get gulp up and running. For an example gulpfile.js that handles tasks such as SCSS compiling, autoprefixer, live reload, jshinting and more, take a look at this example gulpfile.js I have created and use.

Comments

rice's picture

rice

Good way of explaining, and fastidious article to obtain data on the topic of my presentation topic, which i am going to present in institution of higher education.

Peter's picture

Peter

Don't know if it's possible but I would prefer to just do:

yum install nodejs npm gulp --enablerepo=epel

But after doing a quick search I don't think there is a gulp RPM. Too bad.