Skip to content

Instantly share code, notes, and snippets.

@davidmason
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidmason/e50ec99e59bbd8d6ee1d to your computer and use it in GitHub Desktop.
Save davidmason/e50ec99e59bbd8d6ee1d to your computer and use it in GitHub Desktop.
Simple node setup on RHEL6

node setup on RHEL6

These are the steps I used today to get node installed and working on my Red Hat Enterprise Linux 6 machine. Note that the first step can cause potential issues, so you should understand and weigh those up. You can skip the first step, it just means you will have to run global module installs (npm install -g ...) with elevated permissions (sudo/su).

  1. change owner of /usr/local so that npm install -g will Just Work. I think this has to go before installing node so that everything works properly.
sudo chown -R $USER /usr/local

source

  1. install nvm to manage node versions source
curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh

Need to check that .bashrc contains the line source ~/.nvm/nvm.sh (add it if not)

 vim /home/damason/.bashrc

Then restart the terminal

  1. install node 10
nvm install 0.10
  1. set node 10 as default
nvm alias default 0.10
  1. check node and npm versions
node -v
npm -v

blog with versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment