-
Install Nodejs
sudo apt-get install nodejs
-
Install npm
sudo apt-get install npm
-
Config Taobao registry
npm config set registry https://registry.npm.taobao.org
-
Update Nodejs
npm i -g n
n latest
Reload cmd shell
-
Install pm2
npm i -g pm2
-
Install Mongodb
sudo apt-get install mongodb-server
-
Install Nginx
sudo apt-get install nginx
-
Install certbot
sudo apt install -y nginx certbot python-certbot-nginx
-
Restore Database
cd src
ls
like thisThen:
mongorestore
-
cd
admin
anddesktop
andweb
andserver
thennpm i
andnpm run build
cd admin
npm i
npm run build
-
run web in localhost://3000
cd server
pm2 index.js
vist your server public ip + port3000
ip:3000
-
Config Nginx
-
choose Nodejs
-
Domain
-
Disable Https
-
Download config file
-
Extract
-
Cp
cp sites-available/ieee-rcar.org.conf /etc/nginx/sites-available/
cd /etc/nginx/sites-avaible
sudo ln -s ../sites-available/ieee-rcar* /etc/nginx/sites-enabled/
!! Change me@example.com to your email
sudo certbot --non-interactive --redirect --agree-tos --nginx -d ieee-rcar.org -m me@example.com
after nginx domain ieee-rcar.org
visit : www.ieee-rcar.org/admin
username : jiang
password : jiang666