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.