Here is what I did:
-
Installed
nvmin/opt/nvmas root. Seemed like an appropriate location.# git clone git@github.com:creationix/nvm.git /opt/nvm -
Created the directory
/usr/local/nvm. This is where the downloads will go ($NVM_DIR)# mkdir /usr/local/nvm -
Create the directory
/usr/local/node. This is where the NPM global stuff will go:# mkdir /usr/local/node -
Created a file called
nvm.shin/etc/profile.dwith the following contents:export NVM_DIR=/usr/local/nvm source /opt/nvm/nvm.sh export NPM_CONFIG_PREFIX=/usr/local/node export PATH="/usr/local/node/bin:$PATH" -
Re-login to a shell session, then set the default node version.
# nvm install 0.10 # nvm alias default 0.10
The node binaries should now be in the PATH for all users the next time you login to a shell session. NPM will install global things to the /usr/local/node prefix.