Use rc. local On debian

Source: Internet
Author: User
Debian uses rc. local -- Debian information of the Linux release. The following is a detailed description. I am used to the Automatic startup of the/etc/rc. local Custom Service on FreeBSD and RedHat. Recently I am not used to Debian. The following information is collected: Create the rc. local file On debian.

Create a file:
Sudo touch/etc/init. d/rc. local
Set executable:
Sudo chmod + x/etc/init. d/rc. local
Set startup level with update-rc.d:
Sudo update-rc.d rc. local start 20 2 3 4 5. stop 20 0 1 6.

For ease of editing, create a link:
Sudo ln-s/etc/init. d/rc. local/etc/rc. local

Cat/etc/rc. local
# Start apache
/Home/apache/bin/apachectl start

Restart. No problem.

Note: There is no rc. local In Debian, but there is a substitute: the/etc/init. d/bootmisc. sh file (you can link/etc/rc. local to the previous file)

What do you need to run after startup.

Similarly, you can use the update-rc.d to set the corresponding service to startup.

Recently, a new server has been installed, and the operating system must be familiar with the following commands when using debian:
Apt-get install [packagename]
Apt-cache search [string]

Upgrade later:
Apt-get update
Apt-get dist-upgrade
Apt-get upgrade
You can.

Currently installed package:
Apt-get install kernel-image-2.6.8-2-686 (2.4.x does not support 1 GB memory by default)
Apt-get install libgdbm-dev
Apt-get install zlib1g-dev
Apt-get install libcurl3-dev
Apt-get install php4-domxml
Apt-get install libxml2-dev
Related Article

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.