Linux self-starting service check

Source: Internet
Author: User
Linux self-starting service check-Linux Enterprise Application-Linux server application information. The following is a detailed description. In linux, each service has a corresponding running script, which can be used to set the startup, stop, restart, and query service information. All the service scripts are written in "/etc/rc. d/init. d ", the script name corresponds to the server name, which are described in most cases. You can view it on your own. The directory of the script at each running level is located at:/etc/rc. d, you can see 0 ~ 6. After RC, a script directory of the running level is formed. You can enter the script directory of the corresponding level to view its settings. For example, we enter Level 3 with a script directory:

# Ls/etc/rc. d/rc3.d/
K05saslauthd K68ipsec K96pcmcia S17keytable S55sshd

Here, only one row is listed for analysis. We can see that each service directory has some obvious characteristics. The previous "K" indicates that the service is stopped at this level. if "s" indicates "Start", the service is started at this level. there are some numbers behind K or S. This is the service serial number. When the service is started, it is started from small to large. when the service is stopped, it is stopped from large to small.

Use SHELL commands to stop or run services --- service
# Service xinetd stop // stop running the xinetd service
Stopping xinetd:
# Service xinetd start // start the xinetd service

Tip: Sometimes we can't connect to the Internet when we use LINUX to access the Internet. In fact, sometimes we may close the firewall because of the LINUX firewall. Use this command: # service iptables stop

Configuration command for service startup status:
1. ntsysv
2. chkconfig. This command has powerful functions. Let's take a look:
View the service startup status: # CHKCONFIG -- LIST [SERVICES]
E. G .:
# Chkconfig -- list // view the startup status of all services in the system.
# Chkconfig -- list syslog // view the startup status of the syslog service.
Set the startup status of an independent service: # chkconfig -- level
E.g .:
# Chkconfig -- level 123 syslog off // indicates that the syslog service stops running at 1, 2, and 3.
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.