#!/bin/bash ## Author: Colin Wong ## 由於想使用KVM虛擬化技術,想把父系統搞得乾淨一點,所以關閉一些無用的服務器 ## 值得注意的是:該腳本並不適合所有人,操作前請慎重選擇。 Service="blk-availability acpid atd auditd avahi-daemon avahi-dnsconfd bluetooth conman cpuspeed cups dnsmasq firstboot httpd ibmasm ip6tables kdump mcstrans microcode_ctl netconsole netfs netplugd nfs nfslock nscd ntpd oddjobd pand pcscd portmap psacct rdisc restorecond mdmonitor rpcgssd rpcidmapd rpcsvcgssd saslauthd sendmail vncserver wpa_supplicant xfs ypbind" for i in $Service do ### 關閉所選服務自啓動 chkconfig $i off ### 停止所選的服務 service $i stop done #### 服務詳解 #blk-availability lmv2相關,啓用lvm就開啓 #acpid 電源的開關等檢測管理,常用在Laptop上 #auditd 審覈守護進程,selinux需要開啓它 #bluetooth 藍牙無線通訊 #cups 通用unix打印服務 #cpuspeed 調節cpu速度用來省電,常用在Laptop上 #dnsmasq dns cache #ip6tables 用到ipv6網絡的就用,一般關閉 #restorecond 如果開啓了selinux,就需開啓 #rpcgssd NFS相關服務,可選
關閉無用的服務
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.