linux系统开机启动软件,本人常用两种方式:
- 加入 systemctl、service 中,配置开机启动。
//systemctl
systemctl enable serviceName
//service
chkconfig serviceName on
- 加入到 /etc/rc.local 文件中
echo '
# start kafka
/usr/local/kafka/bin/kafka-server-start.sh -daemon /usr/local/kafka/config/server.properties
' >> /etc/rc.local