线上环境
- 服务器稳定性
- 充分利用服务器硬件资源,以便提高性能
- 线上日志记录
PM2
- 进程守护,系统崩溃自动重启
- 启动多进程,充分利用cpu和内存
- 自带日志记录功能
PM2介绍
下载安装
npm install pm2 -g
pm2 --version
基本使用
解决服务器无法克隆GitHub代码的问题
修改克隆地址 GitHub: github.com/150098399/b…
修改后: gitclone.com/github.com/…
执行 git clone gitclone.com/github.com/…
nginx 常用命令
启动 sudo systemctl start nginx
重启 sudo systemctl restart nginx
停止 sudo systemctl stop nginx
重新加载配置文件 sudo systemctl reload nginx
查看Nginx服务状态 sudo systemctl status nginx
查看Nginx配置文件语法是否正确 sudo nginx -t