Based on some commands used in the project
- Restart the service:
pm2 reload xxx
- Display the current file:
ls
- Delete file command:
rm -rf xxx
- Modify a file:
vim ./xxx
- drop out:
:q
- Exit without saving:
:q!
- Save and exit:
:wq
- Display the path of the current location:
pwd
- Copy the files on the server and use them as backup:
sz xxx
- Full deployment code:
10.1: Code backup:cd /opt/web
Enter the project file and execute the backup commandtar -cvf xxxx.tar i8Community || i8WorkflowNode
10.2: Enter the root directory:cd /
--> Enter the script directory:cd script
--> Execute the update script:./release_community.sh || ./release_workflow.sh
- PM2 common commands
11.1: Start -->pm2 start app.js
11.2: View -->pm2 list
11.3: Restart -->pm2 restart app.js
11.4: Stop -->pm2 stop xxx;pm2 stop all
11.5: Delete -->pm2 delete xxx;pm2 delete all
11.6: View log -->pm2 ls;pm2 info xxx;view /test/pm2_logs/i8workflow.log
11.7: View history -->history | grep xxx
11.8: Stop /Restart nginx on the server:/opt/tengine/sbin/nginx -s stop | ~/nginx -s start