mqnamesrv
[root@localhost system]# cat /etc/systemd/system/mqnamesrv.service [Unit] Description=rocketmq - nameserver Documentation=http://mirror.bit.edu.cn/apache/rocketmq/ After=network.target [Service] Type=sample User=lin ExecStart=/srv/rocketmq/bin/mqnamesrv ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID #ExecStop=/srv/rocketmq/bin/mqshutdown namesrv Restart=0 LimitNOFILE=65536 [Install] WantedBy=multi-user.target
mqbroker
[root@localhost system]# cat /etc/systemd/system/mqbroker.service [Unit] Description=rocketmq - mqbroker Documentation=http://mirror.bit.edu.cn/apache/rocketmq/ After=network.target [Service] Type=sample User=lin ExecStart=/srv/rocketmq/bin/mqbroker -c /srv/rocketmq/conf/2m-2s-async/broker-a.properties ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID #ExecStop=/srv/rocketmq/bin/mqshutdown broker Restart=0 LimitNOFILE=65536 [Install] WantedBy=multi-user.target
systemctl daemon-reload