Setup NodeJS ... Centos 7
How to install NodeJS?
- yum install -y gcc-c++ make
- curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
- yum install nodejs
- npm install yarn -g
- curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
yarn -v
node -v
npm -v
npm i -g forever (
npm install forever -g
)
cd /var/www/html
nano demo_server.js