Step 1: Prerequisites
First, I will begin this process by logging into the server as the root user. Next, as best-practice dictates, we will ensure that all packages are up to date:
[root@host ~]# apt-get update -y
After this, we will ensure we have a C++ Compiler to work with, by installing the build-essential package:
[root@host ~]# apt-get install build-essential libssl-dev -y
Step 2: Install NVM
Run The Node Version Manager Installation Script
After getting our C++ Compiler installed, running this curl command will pull down and run the NVM installation script:
[root@host ~]# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
At the time of this publication, NVM v0.34.0 was the latest version available.
You can check for the newest release of NVM. This link will always take you to the most recent release version of NVM. After this, you will want to adjust the above command to point to the newest version of NVM.
Once the installation process is complete, you should see output that looks something like this:
Close and then re-open your terminal to start using nvm
Instead of closing and re-opening your terminal, run the following command in the same terminal session:
[root@host ~]# source ~/.profile
or, you can log out and log back into your server if you wish.
Step 3: Verify the Installation
The last thing you will want to do is verify that NVM was installed and is working correctly. To accomplish this, run the following command:
[root@host ~]# nvm --version
The output will show:
[root@host ~]# 0.34.0
which is the latest version of NVM
For more information on how to use nvm, you can use the following command to get started:
[root@host ~]# nvm help
or visit NVM's GitHub page for more info.
How can we help?
Our Support Teams are standing by with knowledgeable admins with an intimate knowledge of these and other web hosting technologies, especially those discussed in this article. If you are uncomfortable walking through the steps outlined above, feel free to contact us. If you’re running on one of our fully managed servers, we will be happy to assist, directly implementing the changes in this article that you require.
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.