| 229 번 글의 답장글: [linux] CentOS 5.x init.d 불필요한 서비스데몬 |
| 글쓴이: 산이
[홈페이지]
|
글쓴날: 2010년 04월 29일 17:18:34 목(오후) |
조회: 3868 |
CentOS 5.x init.d 불필요한 서비스데몬 off
# runlevel
chkconfig --del NetworkManager
chkconfig --del NetworkManagerDispatcher
chkconfig --del acpid
chkconfig --del auditd
chkconfig --del autofs
chkconfig --del bluetooth
chkconfig --del cpuspeed
chkconfig --del cups
chkconfig --del dhcdbd
chkconfig --del diskdump
chkconfig --del firstboot
chkconfig --del gpm
chkconfig --del haldaemon
chkconfig --del hidd
chkconfig --del hplip
chkconfig --del ip6tables
chkconfig --del irda
chkconfig --del kudzu
chkconfig --del mdmpd
chkconfig --del messagebus
chkconfig --del netdump
chkconfig --del netfs
chkconfig --del netplugd
chkconfig --del nfs
chkconfig --del nfslock
chkconfig --del nscd
chkconfig --del pcmcia
chkconfig --del portmap
chkconfig --del psacct
chkconfig --del rdisc
chkconfig --del readahead_later
chkconfig --del readahead_early
chkconfig --del rhnsd
chkconfig --del rpcgssd
chkconfig --del rpcidmapd
chkconfig --del rpcsvcgssd
chkconfig --del saslauthd
chkconfig --del sysstat
chkconfig --del wpa_supplicant
chkconfig --del xfs
chkconfig --del ypbind
chkconfig --del yum-cron
chkconfig --del yum-updatesd
------------------------
#!/bin/sh
##
## -- CentOS 5.x init.d
## -- san2@2010.04.28
FORCEOFF="NetworkManager NetworkManagerDispatcher acpid auditd autofs
bluetooth
cpuspeed cups dhcdbd diskdump gpm haldaemon hidd hplip ip6tables irda kudzu mdmpd
messagebus netdump netfs netplugd nfs nfslock nscd pcmcia portmap psacct
rdisc readahead_early readahead_later rhnsd rpcgssd rpcidmapd rpcsvcgssd
saslauthd sysstat wpa_supplicant xfs ypbind yum-cron yum-updatesd"
FORCEON="crond syslog"
for SERVICE in ${FORCEOFF} ; do
echo -n "$SERVICE force to off: "
[ -x /etc/rc.d/init.d/${SERVICE} ] || { echo 'skip'; continue; }
/sbin/chkconfig ${SERVICE} off && echo 'off' || echo 'fail'
/etc/rc.d/init.d/${SERVICE} status | grep running >/dev/null && \
/etc/rc.d/init.d/${SERVICE} stop
done
for SERVICE in ${FORCEON} ; do
echo -n "$SERVICE force to on: "
[ -x /etc/rc.d/init.d/${SERVICE} ] || { echo 'skip'; continue; }
/sbin/chkconfig ${SERVICE} on && echo 'on' || echo 'fail'
/etc/rc.d/init.d/${SERVICE} status | grep stop >/dev/null && \
/etc/rc.d/init.d/${SERVICE} start
done
exit $?
---------------------------------
|
이전글 : [linux] init.d 불필요한 서비스데몬
다음글 : [php] socket 함수 예제
|
from 114.111.62.248
JS(Redhands)Board 0.4 +@
|