activemq,redis开机自启动
1. 新建一个系统服务文件
vi /etc/systemd/system/activemq.service
复制粘贴以下内容:
[Unit]
Description=activemq-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/apache-activemq-5.15.11/bin/activemq start
ExecReload=/usr/local/apache-activemq-5.15.11/bin/activemq restart
ExecStop=/usr/local/apache-activemq-5.15.11/bin/activemq stop
PrivateTmp=true
[Install]
WantedBy=multi-user.target
注:上面的ExecStart改成你activemq安装的位置
2. 重载系统服务
systemctl daemon-reload
3. 设置activemq服务开机自启动
systemctl enable activemq.service
重启服务器试一下服务是否可以正常启动。
本文来自博客园,作者:程序猿网友666,转载请注明原文链接:https://www.cnblogs.com/chenghu/articles/17143884.html

浙公网安备 33010602011771号