Skip links

Setting up Centos Web Panel & Installing Node & Express on centos

Step 1: Install Centos Web Panel

yum -y install wget
yum -y update
reboot 

centos 6:  
cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest
reboot

centos 7: 
cd /usr/local/src
wget http://centos-webpanel.com/cwp-el7-latest
sh cwp-el7-latest
reboot

Step 2: Install Node

yum groupinstall 'Development Tools' -y
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
yum install -y nodejs

// check version
node -v
npm -v

Step 3: Install Express

npm install express --save

Step 4: Install Express Generator APP

npx express-generator

//install dependencies
npm install

npm start

npm install pm2 -g
npm install nodemon -g

Run your app via pm2

pm2 start ./bin/www --name="app"

Reference urls: 

  • http://centos-webpanel.com/cwp-installation
  • https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp
  • https://expressjs.com/en/starter/generator.html

Leave a comment