In Linux, you can start the instance at startup, and in linux, you can start the instance at startup.

Source: Internet
Author: User

In Linux, you can start the instance at startup, and in linux, you can start the instance at startup.
Starting the instance solves the problem of server restart, such as breakpoint, resulting in service failure. sort out the services running on the machine and compile them into sh scripts. The file is/home/rc/exec. sh # load the environment variable source/etc/profileecho 'Environment variable added successfully' # Start web/usr/local/tomcat-web/restart. sh & echo 'tomcat-web started successfully' pay attention to loading environment variable 2. run the chmod 755 + Script Name. Command: chmod 755/home/rc/exec. sh 3. modify rc. load file, vim/etc/rc. localtouch/var/lock/subsys/local/home/rc/exec. sh>/home/rc. out & 4. reboot 5. check the process ps-ef | grep tomcat to see if it takes effect. If it takes effect, OK is completed. If it does not take effect, continue 6. check the startup system level. Command: runlevel here is N 3, which indicates that the startup level is 3. Run the command ll/etc/rc3.d/normally. Here S99local-> .. /rc. A shortcut such as local, which is loaded when the system is started. local shortcut. If not, rc. local will not be called. 7. start rc. load is executed under rc3.d: ln-s .. /rc. local S99local execution: chmod + x S99local 8. restart is for reference only. Please forgive me for your shortcomings. please correct me! Indicate the source for reprinting. If you have any questions, please comment or contact my mailbox 1034570286@qq.com

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.