1.全局安装
管理员cmd窗口运行:
npm install pm2 -g
安装windows自启动包
npm install pm2-windows-startup -g
执行命令
pm2-startup install
查看是否安装成功
pm2 status
2.支持 Windows 的 PM2 Web 界面
https://github.com/countnazgul/pm2-winweb
使用 npm install -g pm2-winweb
全局安装模块
运行命令 pm2-winweb
从浏览器浏览http://localhost:3190
注意:PM2-WINWEB 需要将 pm2 安装为全局模块。
3.pm2用法
pm2 start artisan --name laravel-worker --interpreter php -- queue:work --daemon