有什么方法可以在 Mac OS 系统启动时自动启动 activemq 服务器?我希望它在我启动系统时启动。
在官方文档中找过,没找到。
最佳答案
这取决于你如何安装它。
如果您做了明智的事情并通过 homebrew 安装了它,那么您可以立即启动它,并在以后所有重新启动时使用:
brew services start activemq
此信息会在您安装 activemq
时显示给您,但如果您忘记了它,您可以使用以下命令重新获取它(具体请参见最后 3 行):
brew info activemq
示例输出
activemq: stable 5.15.6
Apache ActiveMQ: powerful open source messaging server
https://activemq.apache.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/activemq.rb
==> Requirements
Required: java >= 1.7 ✔
==> Caveats
To have launchd start activemq now and restart at login:
brew services start activemq
Or, if you don't want/need a background service you can just run:
activemq start
如果您决定以困难的方式做事,并从源代码安装它,您将需要使用 launchctl
与 Apple 的 launchd
交互。一个例子是 here .
关于macos - 如何在 Mac OS 系统启动时启动 ActiveMq,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52403616/