Linux boot Script

Source: Internet
Author: User

Linux boot script linux boot script

User-defined Boot program (/etc/rc.d/rc.local)

The simplest and most convenient operation. Each time you start PHP ah, nginx ah bored to death, other ways to get shell Ah, connection ah, too cumbersome.

The operating examples are as follows:

    vim /etc/rc.d/rc.local
#!/bin/sh##This script is executed *after* all and the other init scripts.#You can put your own initialization stuff  in here if you don' t #Want to does the full Sys V style init stuff.Touch/var/lock/subsys/local#Add execute command/usr/local/nginx/sbin/nginx/usr/local/sbin/php-fpm/usr/local/mysql/support-files/mysql.server start

Redis boot requires point processing

Access to the Redis source package

$cp/utils/redis_init_script/etc/init.d #/utils/redis_init_script Copy to/etc/init.d $cp/etc/init.d/redis_6379 #重命名 (This is done in preparation for possible future cluster) $vi/etc/init.d/redis_6379 #第六行 redisport Modify the same port number 
chmod 0777 /etc/init.d/redis_6379chkconfig redis_6379 on

Add to boot vi/etc/rc.d/rc.local

Add the following line

Service Redis Start

Finally, restart reboot to complete all service startup.

Linux boot Script

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.