Linux Boot from boot

Source: Internet
Author: User
Tags zookeeper

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.