Introduction to Linux system services
In a Windows system, we can open Task Manager to open or close some services. There are also requirements under Linux, so how does Linux open "task Manager" like Windows?
There are two ways to tune service startup and non-booting under Linux systems:
1. NTSYSV command
If this command does not exist
Yum Install-y Ntsysv
After installation, the following is done:
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/8F/18/wKioL1jTj__S-VJAAAA20WJYl-k003.png-wh_500x0-wm_ 3-wmp_4-s_548995200.png "title=" NN. PNG "alt=" Wkiol1jtj__s-vjaaaa20wjyl-k003.png-wh_50 "/>
After entering this interface, space bar to change * and empty, empty means not to start
Turn off some of the less frequently used services
Disable:
Atd
Auditd
Haldaemon
Ip6tables
Mdmonitor
Massagebus
Netfs
Nfslock
Postfix
Rpcbind
Rpcgssd
Udev-post
TAB key to determine
Complete the adjustment service list, and you must restart the system if you want to take effect !!
2. chkconfig--list
Note: The chkconfig command changes the service can be effective on the spot without rebooting the system!!
List what services you have, as shown in:
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/8F/1A/wKiom1jTkWvRAYrJAAAuRVbdQc4116.png-wh_500x0-wm_ 3-wmp_4-s_2987935230.png "title=" TT. PNG "alt=" Wkiom1jtkwvrayrjaaaurvbdqc4116.png-wh_50 "/>
3. Example
If you want the Crond service to not start
Chkconfig Crond off
Chkconfig--list Crond
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/8F/1B/wKiom1jTkiegJAVgAAATGXrC_94092.png-wh_500x0-wm_ 3-wmp_4-s_1896225717.png "title=" SS. PNG "alt=" Wkiom1jtkiegjavgaaatgxrc_94092.png-wh_50 "/>
Note: The meaning of the 0 to 6 representation here is RunLevel Run Level
(0 shutdown, 1 single user off, multi-user mode 2,3 off, 4 reserved off, 5 graphical interface off, 6 restart off)
Chkconfig Crond off/on
This off/on works on 2, 3, 4, 5.
Open a runlevel: Chkconfig--level 3 Crond on
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8F/18/wKioL1jTk3CTrCM1AAATB75ufbg721.png-wh_500x0-wm_ 3-wmp_4-s_457276267.png "title=" yy. PNG "alt=" Wkiol1jtk3ctrcm1aaatb75ufbg721.png-wh_50 "/>
Open multiple RunLevel: chkconfig--level 245 Crond on
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8F/18/wKioL1jTlACypkjsAAAMUnmjfzY974.png-wh_500x0-wm_ 3-wmp_4-s_2582789631.png "title=" SS1. PNG "alt=" Wkiol1jtlacypkjsaaamunmjfzy974.png-wh_50 "/>
4. The list of services generated by the system is in this directory
cd/etc/init.d/"Green section"
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/8F/18/wKioL1jTlF_wnuBWAAAavd9ox_s771.png-wh_500x0-wm_ 3-wmp_4-s_137148860.png "title=" vv. PNG "alt=" Wkiol1jtlf_wnubwaaaavd9ox_s771.png-wh_50 "/>
5. Add service Items
Grammar: Chkconfig--add servername, do an experiment:
(1) first CP Crond WTF
(2)ls-l wtf (this WTF must have execute permission, otherwise cannot join to the system service list)
(3)chkconfig--list |grep wtf not found in the list WTF
(4)chkconfig--add wtf
As follows:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8F/19/wKioL1jTlgrSICJcAAA19J3WO64424.png-wh_500x0-wm_ 3-wmp_4-s_1670766789.png "title=" NN. PNG "alt=" Wkiol1jtlgrsicjcaaa19j3wo64424.png-wh_50 "/>
6. Delete Service Items
Syntax: chkconfig--del servername #只能cd到该目录下操作
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8F/1B/wKiom1jTl1vjce4pAAAu6BCjGmA706.png-wh_500x0-wm_ 3-wmp_4-s_3882717668.png "style=" Float:none; "title=" TT. PNG "alt=" Wkiom1jtl1vjce4paaau6bcjgma706.png-wh_50 "/>
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/8F/19/wKioL1jTl1uTBCrLAAAjwrvz-Xg933.png-wh_500x0-wm_ 3-wmp_4-s_1306983519.png "style=" Float:none; "title=" SS. PNG "alt=" Wkiol1jtl1utbcrlaaajwrvz-xg933.png-wh_50 "/>
This article is from the "Hand of the Paladin Control" blog, please make sure to keep this source http://wutengfei.blog.51cto.com/10942117/1909748
Introduction to Linux system services