CentOS Start and stop service detailed

Source: Internet
Author: User
Tags centos oracle database

CentOS Start and stop service detailed

Service Introduction

Linux system services are system tasks that are automatically loaded when Linux is started and are automatically stopped when Linux exits. In the Linux boot process, we can see a lot of "starting ... "The message indicates that the system service is starting, and when Linux exits, we can see the corresponding" stopping ... "Information indicating that the system service is stopping. Linux itself has a number of system tasks, such as the "network" service to support network connectivity. CAMS during the installation process, three system tasks are automatically added to ensure that the CAMS service starts automatically when Linux is started, and the CAMS service stops automatically when Linux is turned off. When these three services are separated:

oracled Oracle Database Services

CAMSD Cams Protocol Processing module Service

TOMCAT4 Tomcat Web Server Service for supporting CAMS Configuration console, self-service platform, Portal service platform and content billing certification platform;

All service script scripts for Linux systems can be found in the "/ETC/RC.D/INIT.D" folder, with each service corresponding to a script file. If CAMS is already installed, we can find the three files "oracled", "Camsd" and "TOMCAT4" under this folder.

Start and stop services

Service commands are used to start and stop a services, for example:

Service CAMSD Stop CAMSD Services

Service oracled Start oracled Services

Service TOMCAT4 Start TOMCAT4 Services

The three services introduced by CAMS are dependent on CAMSD services and TOMCAT4 service dependencies and oracled services, which do not start oracled services and CAMSD services until the TOMCAT4 service is started;

The CAMSD service and TOMCAT4 service must be stopped before the oracled service is stopped.

Add, delete, auto run and status of service

CAMS the related services are added automatically during the installation process, and the user is prompted to start the service (for the service to take effect) during the final process of installation. Note that when a service is added, it does not mean that the service will run automatically during system startup, only that the service command can be used to start and stop services.

1. Add Service

The steps for adding a service are:

(1) Copy the script file of the service into the "/ETC/RC.D/INIT.D" folder to ensure its status is "executable";

(2) Use the Chkconfig command to add a service to the list of services:

Chkconfig–add CAMSD (Note that there are two "-")

After the service has been added, the service can be started/stopped by using services.

2. Delete Service

If you want to delete a service, change the "add" of the above command to "del":

Chkconfig–del CAMSD (Note that there are two "-")

3. Set up the service to run automatically

Linux run There are 7 levels of operation, using 0-6 to indicate that the console interface run level of 3, the graphical interface run level of 5, to make a service automatically when the system starts, the row use Chkconfig to add the service to the corresponding level of the list of the self-boot service.

Chkconfig–level CAMSD On (note that there are two "-")

The above command adds the CAMSD service to the list of self-boot services at level 3 and 5, and the following command removes the service camsd from the list of boot services at level 3 and 5:

Chkconfig–level CAMSD Off (note that there are two "-")

If you need to view the startup status information for a service, use the following command:

Chkconfig–list CAMSD (Note that 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.