There are two main types of service installations:
RPM Installation and source package compilation installation:
1.RPM package View: Rpm-qa | grep Package Name
Use Chkconfig--list to view service self-start commands only the service that is installed on the RPM package does not take effect
Ps-aux (view all initiated processes in the system) PS aux | grep service Name If there is a return then the service is running
Netstat-tlun (daemon does not have a port to see)
2. Source Package View Installation Services
All of the source packages are placed in the installation directory if the directory is deleted then the service will disappear cleanly on the server.
SOURCE package Start-up service is generally placed in a specified location such as Apache:/usr/local/apache2/bin/apactl restart
3.chkconfig command is in the/ETC/RC.D/INIT.D so I can let the source package support method Ln-s/USR/LOCAL/APACHE2/BIN/APACTL/ETC/RC.D/INIT.D/HTTPD
However, this is not recommended: Chkconfig--add httpd turn on self-priming chkconfig--level 345 httpd off
1[Email protected] ~]# Chkconfig-- Help2Chkconfig version1.3.49.3-Copyright (C)1997- -Red Hat, Inc.3 under the terms of the GNU Public License, the software may be freely distributed. 4 5Usage: chkconfig [--list] [--type <type>] [name]6Chkconfig--add <name>7Chkconfig--del <name>8Chkconfig--Override<name>9Chkconfig [--level <levels>] [--type <type>] <name> <on|off|reset|reset
Main: RPM Package installation default location:
1./ETC/INIT.D and/ETC/RC.D/INIT.D Two directories are hard-linked directories
2./etc/sysconfig/initializing the Environment configuration file location
3./etc/Configuration file Location
4./etc/xinetd.conf xinetd configuration file
5./etc/xinetd.d/startup script based on XINETD service
6. The data generated by the/var/lib/service is placed here
7./var/log/Log
2, the start of independent services
/etc/init.d/Standalone Service name Start|stop|restart|status (view the running status of the service)
Start with service command
Service Standalone name strat|....| Service is a specific version of the tired Rhel release
Add: View all RPM package installation service operation status
[[Email protected] ~]# service--status-ALLABRT-ccpp Hook isINSTALLEDABRTD (PID1582) running ... abrt-dump-oops has stopped acpid (PID1378) running ... ATD (PID1601) running ... auditd (PID1124) running ... automount (PID1454) running ... certmonger (PID1614) is running ... Stoppedcgred stopped Cpuspeed crond (PID1590) running ... cupsd (PID1353) running ... hald (PID1387) is running ... Table: Filterchain INPUT (policy ACCEPT) num Target prot opt source destination1ACCEPT All::/0::/0State related,established2ACCEPT ICMPv6::/0::/0 3ACCEPT All::/0::/0 4ACCEPT TCP::/0::/0State NEW TCP DPT: A 5REJECT All::/0::/0Reject-with icmp6-adm-prohibited Chain FORWARD (policy ACCEPT) num Target prot opt source destination1REJECT All::/0::/0Reject-with icmp6-adm-prohibited Chain OUTPUT (policy ACCEPT) num Target prot opt source destination form: Filterchai N INPUT (policy ACCEPT) num Target prot opt source destination1ACCEPT All--0.0.0.0/0 0.0.0.0/0State related,established2ACCEPT ICMP--0.0.0.0/0 0.0.0.0/0 3ACCEPT All--0.0.0.0/0 0.0.0.0/0 4ACCEPT TCP--0.0.0.0/0 0.0.0.0/0State NEW TCP DPT: A 5REJECT All--0.0.0.0/0 0.0.0.0/0Reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) num Target prot opt source destination1REJECT All--0.0.0.0/0 0.0.0.0/0Reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) num Target prot opt source destination Irqbalance stopped Kdump isOperationallvmetad has stopped checking forMcelogmcelog (PID1470running ... mdmonitor stopped Messagebus (PID1336) is running ... Module Netconsole not loaded configuration device: Lo eth0 current active device: Lo ETH0RPC.SVCGSSD stopped rpc.mountd stopped nfsd Rpc.rquotad stopped RPC.STATD (PID1209running ... ntpd stopped Numad ODDJOBD stopped Portreserve stopped master (PID1558) is running ... Process accounting is disabled. QUOTA_NLD stopped Rdisc Restorecond stopped Rngd stopped Rpcbind (PID1191running ... rpc.gssd stopped RPC.IDMAPD (PID1241running ... rpc.svcgssd stopped RSYSLOGD (PID1149) running ... sandbox isSTOPPEDSASLAUTHD has stopped SMARTD has stopped OpenSSH-daemon (PID1482running ... sssd stopped winbindd ypbind stopped
Second, the RPM package installs the service to manage:
Based on XINETD: The service itself is not installed in the current Linux kernel version based on xinetd service less
Telnet-server services are strongly not recommended to be installed on the server online
1 [[email protected]~]#yuminstall xinetd2 [email protected]~]#Yum Install telnet-server
The XINETD service-based command will appear at the bottom of the Chkconfig--list after you install xinetd
1 XINETD-Based services:2chargen-Dgram: Off3chargen-stream: Off4daytime-Dgram: Off5daytime-stream: Off6discard-Dgram: Off7discard-stream: Off8 Echo-Dgram: Off9 Echo-stream: OffTen rsync: Off Onetcpmux-server: Off A Time-Dgram: Off - Time-stream: Off
If you want to start the Telnet service, the default startup is/etc/xinetd.d/telnet instead of/etc/rc.d/init.d/
Linux Server Management: RPM Package