Addition and deletion of Linux services, automatic operation and status

Source: Internet
Author: User

CAMS in the installation process will automatically add the relevant services, in the final process of the installation will prompt the user whether to start the service to take effect, it should be noted that a service is added does not mean that the service will automatically run during system startup, only means that you can use service command to start the stop service.


1. Add a service
The steps to add a service are:

A. Copy the service's script file into the/ETC/RC.D/INIT.D folder to ensure its status is executable
B. Adding a service to the list of services using the Chkconfig command chkconfig--add camsd (note there are two-)


Once the service is added, the service can be used to start/stop the


2. Delete a service
If you want to delete a service change the add of the above command to Del
Chkconfig--del CAMSD (note there are two-)


3. Set the service to run automatically
Linux runs 7 different runlevel using 0-6 to indicate that the console interface is running at level 3, the graphical interface is running at 5, to enable a service to run automatically at system startup, and to use Chkconfig to add the service to the corresponding level of self-initiated services list.
Chkconfig--level + camsd on (note two-)
The above command adds the CAMSD service to the list of self-starting services at level 3 5, while the following command removes the service camsd from the list of self-starting services at level 3 5:
Chkconfig--level + camsd off (note two-)
If you need to view the self-boot status information for a service, use the following command:
Chkconfig--list CAMSD (note there are two-)
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.