How To Install Multiple Instance of Node using NVM on Centos 7

To Install Multiple Instance of Node using NVM on Centos 7

NVM stands for Node version manager & as you might have guessed with name, its used to control Nodejs versions installed on our system. It is a command line utility, which allows us to use & switch between multiple versions of Nodejs. In this tutorial, you' ll be briefed about the method install multiple instances of Node using NVM on CentOS 7 is covered here.

Installation
Download and install NVM using the following command

[root@linuxhelp11 ~]# curl -o-  https://raw.githubusercontent.com/creationix/nvm/v0.33.8/ins tall.sh | bash
  % Total    % Received % Xferd  Average Speed   Time     
Time     Time  Current
                                 Dload  Upload   Total   Spent    Left   
Speed
100 12540  100 12540    0     0  49274      0 --:--:-- --:--:--  
--:--:-- 49370
=>  Downloading nvm as script to ' /root/.nvm' 

=>  Appending nvm source string to /root/.bashrc
=>  Appending bash_completion source string to /root/.bashrc
=>  Close and reopen your terminal to start using nvm or run  
the following to use it now:

export NVM_DIR=" $HOME/.nvm" 
[ -s " $NVM_DIR/nvm.sh"  ] & &  . " $NVM_DIR/nvm.sh"   #  
This loads nvm
[ -s " $NVM_DIR/bash_completion"  ] & &  .  
" $NVM_DIR/bash_completion"   # This loads nvm  
bash_completion

Now, execute the following command for making the NVM work properly

[root@linuxhelp11 ~]# source ~/.bashrc

In order to check NVM version use the following command

[root@linuxhelp11 ~]# nvm --version
0.33.8

In order to Check Node versions available run the following command

[root@linuxhelp11 ~]# nvm ls-remote
        v0.1.14
        v0.1.15
        v0.1.16
        v0.1.17
        v0.1.18
        v0.1.19
        v0.1.20
        v0.1.21
        v0.1.22
        v0.1.23
        v0.1.24
.
.
.
       v9.10.0
        v9.10.1
        v9.11.0
        v9.11.1

Now, to install node version 6.14.1 use the following command

[root@linuxhelp11 ~]# nvm install v6.14.1 
Downloading and installing node v6.14.1...
Downloading https://nodejs.org/dist/v6.14.1/node-v6.14.1- 
linux-x64.tar.xz...
############################################## 
########################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v6.14.1 (npm v3.10.10)
Creating default alias: default ->  v6.14.1

To check installed versions of the node use the following command

[root@linuxhelp11 ~]# nvm list
->       v6.14.1
default ->  v6.14.1
node ->  stable (->  v6.14.1) (default)
stable ->  6.14 (->  v6.14.1) (default)
iojs ->  N/A (default)
lts/* ->  lts/carbon (->  N/A)
lts/argon ->  v4.9.1 (->  N/A)
lts/boron ->  v6.14.1
lts/carbon ->  v8.11.1 (->  N/A)

Now, to install node version 8.11.1 use the following command

[root@linuxhelp11 ~]# nvm install v8.11.1
Downloading and installing node v8.11.1...
Downloading https://nodejs.org/dist/v8.11.1/node-v8.11.1- 
linux-x64.tar.xz...
############################################## 
########################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v8.11.1 (npm v5.6.0)

Check installed versions of the node using the following command

[root@linuxhelp11 ~]# nvm list
        v6.14.1
->       v8.11.1
default ->  v6.14.1
node ->  stable (->  v8.11.1) (default)
stable ->  8.11 (->  v8.11.1) (default)
iojs ->  N/A (default)
lts/* ->  lts/carbon (->  v8.11.1)
lts/argon ->  v4.9.1 (->  N/A)
lts/boron ->  v6.14.1
lts/carbon ->  v8.11.1

Now, To use node version 6.14.1 give the following command

[root@linuxhelp11 ~]# nvm use v6.14.1
Now using node v6.14.1 (npm v3.10.10)

To check node and npm version give the following command

[root@linuxhelp11 ~]# node -v
v6.14.1
[root@linuxhelp11 ~]# npm -v
3.10.10

To use node version 8.11.1 give the following command

[root@linuxhelp11 ~]# nvm use v8.11.1
Now using node v8.11.1 (npm v5.6.0)

To check node and npm version give the following command

[root@linuxhelp11 ~]# node -v
v8.11.1
[root@linuxhelp11 ~]# npm -v
5.6.0

You can verify it from the below screen.

With this, the method to Install Multiple Instance of Node using NVM on Centos 7 comes to an end.

Tag : CentOS
FAQ
Q
What industries can benefit from NVM Express?
A
NVMe is a scalable technology that spans from mobile phones, desktop computing, enterprise and cloud storage, all the way to data center fabrics, with a core set of features and framework that keeps it efficient while providing optional features for adding differentiated value for segments and applications.
Q
Does an agent have to negotiate with me first if I make the first offer?
A
No. The vendor’s agent will determine the sale procedure with the vendor. He/she is obliged to inform you of this procedure. However, if you are seriously interested, always make this clear t
Q
If I offer the asking price, is the vendor obliged to sell?
A
No. The Supreme Court of the Netherlands has ruled that the asking price should be seen as an invitation to make an offer. Even if you offer the asking price, the vendor may decide either to
Q
Is an NVM agent permitted to change the method of sale during negotiations?
A
Yes, this is permitted. If more than one interested party is willing to pay the asking price (or above), the vendor’s agent – in consultation with the vendor – may decide to discontinue the c
Q
Is an NVM agent entitled to ask an unrealistically high price for a property?
A
The asking price is determined after consultations between the vendor and his or her agent. A prospective buyer is entitled to negotiate, but the final decision rests with the vendor.