How to Install Node.js On CentOS 7

Unpack node.xxx.tar.xxx

  1. cp node-v8.11.1-linux-x64.tar.gz /usr/local/
  2. cd /usr/local/
  3. tar zxvf node-v8.11.1-linux-x64.tar.gz

Add Node Path

  1. vim /etc/profile
  2. export NODE_HOME=/usr/local/node-v8.11.1-linux-x64
  3. export PATH=$NODE_HOME/bin:$PATH
  4.  
  5. source /etc/profile

Leave a Reply

Your email address will not be published. Required fields are marked *