First of all make sure you have SSH access to the server. (This is covered elsewhere online)
Install NVM And The Latest Stable Version Of Node.Js
- Navigate to the NVM repository and get the latest version number from there. Then put it in the command below by replacing VERSION_NUMBER with the most recent version number from Github and execute the command: curl https://raw.githubusercontent.com/creationix/nvm/VERSION_NUMBER/install.sh | bash
- If successful, you will see a bunch of messages showing how to initially configure NVM. Now you need to load NVM by issuing this command: source ~/.bashrc
- Finally installing Node JS is done by running nvm install --lts which will install the latest stable version of Node.JS and NPM.
- To test type nvm use --lts and then you can issue node -v to see the installed version.