Do the program from the start can be written into the startup script start-up script or into a service, this way to write boot script
Vi/etc/rc.local
Join the startup script
ZK joins power-on self-start
/opt/zookeeper-3.4.6/bin/zkserver.sh start
Restarting the machine
Shutdown-r now
Cd/opt/zookeeper-3.4.6/bin
./zkserver.sh Status
Or
/opt/zookeeper-3.4.6/bin/zkserver.sh status
See if it's up
If you don't get up, check to see if the file does not have Execute permissions
Centos7 need to change files and permissions
Cd/etc/rc.d
chmod 777 Rc.local
disconf to boot (start the service in Ftpuser mode)
Su-ftpuser-c ' sh/uat/disconf.iapi.ymatou.com/deployscript/restart.sh > 1.log '
Su-ftpuser-c ' sh/uat/disconfadmin.ymatou.cn/deployscript/restart.sh > 2.log '
Kafka joining the boot-up script
The Kafka startup script uses a relative path and needs to be changed to an absolute boot path
CD bin
VI kastart.sh
Nohup sh/opt/kafka_2.11-0.10.0.1/bin/kafka-server-start.sh/opt/kafka_2.11-0.10.0.1/config/server.properties > /opt/kafka_2.11-0.10.0.1/bin/kafka.log 2>&1 & (Message bus with Kafka)
jmx_port=9999 Nohup sh/opt/kafka_2.10-0.8.2.1/bin/kafka-server-start.sh/opt/kafka_2.10-0.8.2.1/config/ Server.properties >/opt/kafka_2.10-0.8.2.1/bin/kafka.log 2>&1 & (Kafka for Search)
Vi/etc/rc.local
sh/opt/kafka_2.10-0.8.2.1/bin/kastart.sh
sh/opt/kafka_2.11-0.10.0.1/bin/kastart.sh
Kafka-manager joining the boot-up script
Cd/opt/kafka-manager-1.3.0.7/bin
VI start.sh
Nohup sh/opt/kafka-manager-1.3.0.7/bin/kafka-manager-dhttp.port=9001
Vi/etc/rc.local
Rm-rf/opt/kafka-manager-1.3.0.7/running_pid
Nohup sh/opt/kafka-manager-1.3.0.7/bin/start.sh
Linux Boot from boot