[CentOS] Looking for a list of default services to disable in centos 5

Wed Mar 25 22:29:52 UTC 2009
nate <centos at linuxpowered.net>

Martin Suehowicz wrote:
> I am looking for a list of services that you disable by default on your
> server.

For the packages I install on my systems this is what I disable
by default on CentOS 5.2 in kickstart -

cat <<EOF;
###############################################################################
## Turn off unneeded services in advance                                     ##
###############################################################################
EOF

export SERVICES="anacron atd auditd avahi-daemon cpuspeed cups gpm haldaemon
ip6tables iptables iscsi iscsid iscsid kudzu lm_sensors mcstrans mdmonitor
mess
agebus pcscd readahead_early restorecond rpcgssd rpcidmapd xfs yum-updatesd"

for service in $SERVICES; do
        chkconfig --level 12345 $service off;
        chkconfig --list $service;
done



For CentOS 4.6 -

cat <<EOF;
###############################################################################
## Turn off unneeded services in advance                                     ##
###############################################################################
EOF

export SERVICES="anacron atd auditd autofs cpuspeed cups gpm haldaemon
iptables kudzu lm_sensors mdmonitor messagebus rawdevices rhnsd rpcgssd
rpcidmapd xfs
"

for service in $SERVICES; do
        chkconfig --level 12345 $service off;
        chkconfig --list $service;
done


Depending on what the server does, the service may get re-enabled
again automatically by cfengine after the system boots up, of the
services above the only one I recall that ever gets re-enabled is
iscsi(only on a few systems). I also have cfengine force shut down
all of those services every day at around 2PM in case someone were
to start one up by accident and forget about it.

Of course there are many more services available in CentOS, the
above just comes from the package list I install.

nate