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).
- change owner of
/usr/localso thatnpm install -gwill Just Work. I think this has to go before installing node so that everything works properly.
sudo chown -R $USER /usr/local- install nvm to manage node versions source
curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | shNeed to check that .bashrc contains the line source ~/.nvm/nvm.sh (add it if not)
vim /home/damason/.bashrcThen restart the terminal
- install node 10
nvm install 0.10- set node 10 as default
nvm alias default 0.10- check node and npm versions
node -v
npm -v