简体   繁体   English

在Mac上如何使用pm2启动命令?

[英]How to use pm2 startup command on Mac?

My question is the same as How to use pm2 startup command on Debian platform? 我的问题与在Debian平台上如何使用pm2启动命令相同 but i need to make it start on Mac OS (darwin) 但我需要使其在Mac OS(darwin)上启动

I only found a very bref documentation $ pm2 startup <ubuntu|centos|gentoo|systemd> 我只找到了一个非常好的参考文献$ pm2 startup <ubuntu|centos|gentoo|systemd> pm2 $ pm2 startup <ubuntu|centos|gentoo|systemd>

What can I do? 我能做什么?

PM2 now has darwin option for startup, so running: PM2现在具有用于启动的darwin选项,因此运行:

pm2 startup darwin 

should work. 应该管用。

Also checkout this commit: 1. Make platform auto detecting. 还要检查此提交: 1.使平台自动检测。 2. Support darwin startup script. 2.支持darwin启动脚本。 So right now, you can just call: 因此,现在,您可以致电:

pm2 startup

and the script will recognise your OS. 脚本将识别您的操作系统。

NOTE: I'm currently having issues on Yosemite as the launchd gives me an error. 注意:我目前在优胜美地上遇到问题,因为启动程序给我一个错误。 You can find more info (and solution that works for me ) here: darwin startup script fix on yosemite #989 您可以在此处找到更多信息(以及适用于我的解决方案): 优胜美地上的darwin启动脚本修复#989

Also if you can test it in your environment and support this pull request, it would be great:) 另外,如果您可以在您的环境中对其进行测试并支持该请求请求,那就太好了:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM