nvm centos 7 node install

[root@localhost ~]# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12819  100 12819    0     0  15335      0 --:--:-- --:--:-- --:--:-- 15352
=> 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
[root@localhost ~]# nvm --version
bash: nvm: command not found...
[root@localhost ~]# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12819  100 12819    0     0  23639      0 --:--:-- --:--:-- --:--:-- 23651
=> nvm is already installed in /root/.nvm, trying to update the script

=> nvm source string already in /root/.bashrc
=> bash_completion source string already in /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

open other terminal 

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

multiple nvm versions

[root@worker1 ~]# nvm install --lts
Installing latest LTS version.
Downloading and installing node v12.13.1...
Downloading https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v12.13.1 (npm v6.12.1)
[root@worker1 ~]# nvm install 8.12.0
Downloading and installing node v8.12.0...
Downloading https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v8.12.0 (npm v6.4.1)
[root@worker1 ~]# nvm ls
->      v8.12.0
       v12.13.1
        v13.2.0
         system
default -> node (-> v13.2.0)
node -> stable (-> v13.2.0) (default)
stable -> 13.2 (-> v13.2.0) (default)
iojs -> N/A (default)
lts/* -> lts/erbium (-> v12.13.1)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.2 (-> N/A)
lts/dubnium -> v10.17.0 (-> N/A)
lts/erbium -> v12.13.1



To be able to build native modules from npm we will need to install the development tools and libraries:
[root@worker1 ~]# yum install gcc-c++ make
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.praction.in
 * epel: repos.del.extreme-ix.org
 * extras: mirrors.praction.in
 * updates: mirrors.praction.in
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.8.5-39.el7 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64
--> Processing Dependency: libstdc++ = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64
--> Processing Dependency: gcc = 4.8.5-39.el7 for package: gcc-c++-4.8.5-39.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-c++-4.8.5-39.el7.x86_64
---> Package make.x86_64 1:3.82-23.el7 will be updated
---> Package make.x86_64 1:3.82-24.el7 will be an update
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-39.el7 will be installed
--> Processing Dependency: libgomp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: libgcc >= 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-39.el7.x86_64
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libstdc++.x86_64 0:4.8.5-28.el7 will be updated
---> Package libstdc++.x86_64 0:4.8.5-39.el7 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.5-39.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-39.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-292.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-292.el7 for package: glibc-devel-2.17-292.el7.x86_64
--> Processing Dependency: glibc = 2.17-292.el7 for package: glibc-devel-2.17-292.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-292.el7.x86_64
---> Package libgcc.x86_64 0:4.8.5-28.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-39.el7 will be an update
---> Package libgomp.x86_64 0:4.8.5-28.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-39.el7 will be an update
--> Running transaction check
---> Package glibc.x86_64 0:2.17-222.el7 will be updated
--> Processing Dependency: glibc = 2.17-222.el7 for package: glibc-common-2.17-222.el7.x86_64
---> Package glibc.x86_64 0:2.17-292.el7 will be an update
---> Package glibc-headers.x86_64 0:2.17-292.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-292.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-292.el7.x86_64
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-222.el7 will be updated
---> Package glibc-common.x86_64 0:2.17-292.el7 will be an update
---> Package kernel-headers.x86_64 0:3.10.0-1062.4.3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch        Version                    Repository    Size
================================================================================
Installing:
 gcc-c++              x86_64      4.8.5-39.el7               base         7.2 M
Updating:
 make                 x86_64      1:3.82-24.el7              base         421 k
Installing for dependencies:
 cpp                  x86_64      4.8.5-39.el7               base         5.9 M
 gcc                  x86_64      4.8.5-39.el7               base          16 M
 glibc-devel          x86_64      2.17-292.el7               base         1.1 M
 glibc-headers        x86_64      2.17-292.el7               base         687 k
 kernel-headers       x86_64      3.10.0-1062.4.3.el7        updates      8.7 M
 libmpc               x86_64      1.0.1-3.el7                base          51 k
 libstdc++-devel      x86_64      4.8.5-39.el7               base         1.5 M
Updating for dependencies:
 glibc                x86_64      2.17-292.el7               base         3.6 M
 glibc-common         x86_64      2.17-292.el7               base          11 M
 libgcc               x86_64      4.8.5-39.el7               base         102 k
 libgomp              x86_64      4.8.5-39.el7               base         158 k
 libstdc++            x86_64      4.8.5-39.el7               base         305 k

Transaction Summary
================================================================================
Install  1 Package (+7 Dependent packages)
Upgrade  1 Package (+5 Dependent packages)

Total size: 57 M
Total download size: 41 M
Is this ok [y/d/N]: y
Downloading packages:
(1/7): glibc-headers-2.17-292.el7.x86_64.rpm               | 687 kB   00:01     
(2/7): glibc-devel-2.17-292.el7.x86_64.rpm                 | 1.1 MB   00:02     
(3/7): libstdc++-devel-4.8.5-39.el7.x86_64.rpm             | 1.5 MB   00:01     
(4/7): kernel-headers-3.10.0-1062.4.3.el7.x86_64.rpm       | 8.7 MB   00:05     
(5/7): cpp-4.8.5-39.el7.x86_64.rpm                         | 5.9 MB   00:08     
(6/7): gcc-4.8.5-39.el7.x86_64.rpm                         |  16 MB   00:58     
gcc-c++-4.8.5-39.el7.x86_64.rp FAILED                                           
http://mirrors.vhost.vn/centos/7.7.1908/os/x86_64/Packages/gcc-c%2B%2B-4.8.5-39.el7.x86_64.rpm: [Errno 12] Timeout on http://mirrors.vhost.vn/centos/7.7.1908/os/x86_64/Packages/gcc-c++-4.8.5-39.el7.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
(7/7): gcc-c++-4.8.5-39.el7.x86_64.rpm                     | 7.2 MB   00:01     
--------------------------------------------------------------------------------
Total                                              622 kB/s |  41 MB  01:07     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libgcc-4.8.5-39.el7.x86_64                                  1/20 
  Updating   : glibc-2.17-292.el7.x86_64                                   2/20 
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
  Updating   : glibc-common-2.17-292.el7.x86_64                            3/20 
  Installing : libmpc-1.0.1-3.el7.x86_64                                   4/20 
  Updating   : libstdc++-4.8.5-39.el7.x86_64                               5/20 
  Installing : libstdc++-devel-4.8.5-39.el7.x86_64                         6/20 
  Installing : cpp-4.8.5-39.el7.x86_64                                     7/20 
  Updating   : libgomp-4.8.5-39.el7.x86_64                                 8/20 
  Installing : kernel-headers-3.10.0-1062.4.3.el7.x86_64                   9/20 
  Installing : glibc-headers-2.17-292.el7.x86_64                          10/20 
  Installing : glibc-devel-2.17-292.el7.x86_64                            11/20 
  Installing : gcc-4.8.5-39.el7.x86_64                                    12/20 
  Installing : gcc-c++-4.8.5-39.el7.x86_64                                13/20 
  Updating   : 1:make-3.82-24.el7.x86_64                                  14/20 
  Cleanup    : libstdc++-4.8.5-28.el7.x86_64                              15/20 
  Cleanup    : 1:make-3.82-23.el7.x86_64                                  16/20 
  Cleanup    : libgomp-4.8.5-28.el7.x86_64                                17/20 
  Cleanup    : glibc-2.17-222.el7.x86_64                                  18/20 
  Cleanup    : glibc-common-2.17-222.el7.x86_64                           19/20 
  Cleanup    : libgcc-4.8.5-28.el7.x86_64                                 20/20 
  Verifying  : glibc-devel-2.17-292.el7.x86_64                             1/20 
  Verifying  : glibc-common-2.17-292.el7.x86_64                            2/20 
  Verifying  : glibc-2.17-292.el7.x86_64                                   3/20 
  Verifying  : kernel-headers-3.10.0-1062.4.3.el7.x86_64                   4/20 
  Verifying  : gcc-c++-4.8.5-39.el7.x86_64                                 5/20 
  Verifying  : cpp-4.8.5-39.el7.x86_64                                     6/20 
  Verifying  : libgcc-4.8.5-39.el7.x86_64                                  7/20 
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                   8/20 
  Verifying  : libgomp-4.8.5-39.el7.x86_64                                 9/20 
  Verifying  : 1:make-3.82-24.el7.x86_64                                  10/20 
  Verifying  : gcc-4.8.5-39.el7.x86_64                                    11/20 
  Verifying  : libstdc++-devel-4.8.5-39.el7.x86_64                        12/20 
  Verifying  : glibc-headers-2.17-292.el7.x86_64                          13/20 
  Verifying  : libstdc++-4.8.5-39.el7.x86_64                              14/20 
  Verifying  : glibc-common-2.17-222.el7.x86_64                           15/20 
  Verifying  : libgomp-4.8.5-28.el7.x86_64                                16/20 
  Verifying  : libstdc++-4.8.5-28.el7.x86_64                              17/20 
  Verifying  : 1:make-3.82-23.el7.x86_64                                  18/20 
  Verifying  : glibc-2.17-222.el7.x86_64                                  19/20 
  Verifying  : libgcc-4.8.5-28.el7.x86_64                                 20/20 

Installed:
  gcc-c++.x86_64 0:4.8.5-39.el7                                                 

Dependency Installed:
  cpp.x86_64 0:4.8.5-39.el7                                                     
  gcc.x86_64 0:4.8.5-39.el7                                                     
  glibc-devel.x86_64 0:2.17-292.el7                                             
  glibc-headers.x86_64 0:2.17-292.el7                                           
  kernel-headers.x86_64 0:3.10.0-1062.4.3.el7                                   
  libmpc.x86_64 0:1.0.1-3.el7                                                   
  libstdc++-devel.x86_64 0:4.8.5-39.el7                                         

Updated:
  make.x86_64 1:3.82-24.el7                                                     

Dependency Updated:
  glibc.x86_64 0:2.17-292.el7           glibc-common.x86_64 0:2.17-292.el7      
  libgcc.x86_64 0:4.8.5-39.el7          libgomp.x86_64 0:4.8.5-39.el7           
  libstdc++.x86_64 0:4.8.5-39.el7      

Complete!

[root@worker1 ~]# 

Comments

Popular posts from this blog

ansible redhat cluster qorum qdevice

PE 3.9.0 on centos 6

gfs2 cluster