Skip to content

Instantly share code, notes, and snippets.

@piyushrajput
Created August 3, 2016 09:41
Show Gist options
  • Save piyushrajput/44e2ea06aa46bb232645df00f0cc6068 to your computer and use it in GitHub Desktop.
Save piyushrajput/44e2ea06aa46bb232645df00f0cc6068 to your computer and use it in GitHub Desktop.
How to install NVM on CentOS
Pre-Flight Check
These instructions are intended specifically for installing NVM (Node Version Manager) on a single CentOS 7 node.
I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.
Step #1: Install NVM (Node Version Manager)
Use the following curl command to kick-off the install script:
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash
At the time of publication, NVM v0.25.0 was the most recent version available. You should check the GitHub project page for the latest release of NVM, and adjust the above command to include the newest version. For example, if the most recent version was 0.30.2, then your command would be similar to:
curl https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
After running the above command, you may receive output similar to the following:
Close and reopen your terminal to start using nvm
Either do as the output suggests, and close and reopen your terminal session, or run the following command:
source ~/.bashrc
Step #2: Verify the Installation
We can quickly verify that NVM is now installed and working properly with the following command:
nvm --version
Which in this case would yield a result of:
0.25.0
Another very useful command to get you started on node.js management is:
nvm help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment