如何在Mac上使用pm2启动命令? [英] How to use pm2 startup command on Mac?

查看:672
本文介绍了如何在Mac上使用pm2启动命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题与>如何使用pm2启动相同在Debian平台上执行命令?但我需要使其在Mac OS(darwin)上启动

My question is the same as How to use pm2 startup command on Debian platform? but i need to make it start on Mac OS (darwin)

我只找到了一个非常好的参考文献$ pm2 startup <ubuntu|centos|gentoo|systemd>

I only found a very bref documentation $ pm2 startup <ubuntu|centos|gentoo|systemd>

我该怎么办?

推荐答案

PM2现在具有用于启动的darwin选项,因此运行:

PM2 now has darwin option for startup, so running:

pm2 startup darwin 

应该工作.

也请检查此提交: 1.使平台自动检测. 2.支持darwin启动脚本.现在,您可以调用:

Also checkout this commit: 1. Make platform auto detecting. 2. Support darwin startup script. So right now, you can just call:

pm2 startup

,脚本将识别您的操作系统.

and the script will recognise your OS.

注意:我目前在优胜美地上遇到问题,因为发布会给我一个错误.您可以在此处找到更多信息(以及对我有用的解决方案): darwin优胜美地#989上的启动脚本修复

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

如果您可以在您的环境中对其进行测试并支持该请求请求,那就太好了:)

Also if you can test it in your environment and support this pull request, it would be great:)

这篇关于如何在Mac上使用pm2启动命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆