如何在系统启动时启动 ActiveMq Mac OS
How to start ActiveMq on system startup in Mac OS
在MacOS中有什么方法可以在系统启动时自动启动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中有什么方法可以在系统启动时自动启动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.