Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Setup NodeJS, NPM, Gulp on RHEL 6.6

cedaradmin edited this page Mar 22, 2016 · 5 revisions

###Install Node and NPM Download NodeJS binary and install it:

cd /usr/local
wget https://nodejs.org/dist/v5.4.0/node-v5.4.0-linux-x64.tar.gz
tar xvf node-v5.4.0-linux-x64.tar.gz
ln –s node-v5.4.0-linux-x64 node
cd /usr/local/bin
ln –s /usr/local/node/bin/node
ln –s /usr/local/node/bin/npm

###Fix NPM permissions Use one of the methods described in the documentation (we are using the global prefix change method):

https://docs.npmjs.com/getting-started/fixing-npm-permissions

###Change global NPM prefix

/usr/local/bin/npm config get prefix
mkdir ~/.npm-global
/usr/local/bin/npm config set prefix '~/.npm-global'
/usr/local/bin/npm config get prefix

Open profile file:

vi ~/.bash_profile    

Add this line at the end:

export PATH=~/.npm-global/bin:$PATH

Load the changes into the current session:

source ~/.bash_profile

###Install Gulp

npm install --global gulp
Clone this wiki locally