在新安装的CentOS 5.3机器上禁用服务?

我最近安装了一个CentOS 5.3机器,我在无头环境下locking了服务器的使用(机器上不会使用GUI)。 该服务器将用作组合的Web和数据库服务器。

我禁用了xfs和portmap,因为这些在计算机上显然是不需要的。

下面是一个chkconfig日志,显示了机器上运行的服务。

问题: 超越xfs和portmap – 你认为哪些服务会被禁用? 为什么?

chkconfig --list | grep 3:on

 acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off irqbalance 0:off 1:off 2:on 3:on 4:on 5:on 6:off kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off mcstrans 0:off 1:off 2:on 3:on 4:on 5:on 6:off messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off microcode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off readahead_early 0:off 1:off 2:on 3:on 4:on 5:on 6:off restorecond 0:off 1:off 2:on 3:on 4:on 5:on 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off yum-updatesd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 

我会禁用像anacron和netfs通常不会使用的所有服务。 如果服务器不需要防火墙规则,iptables和ip6tables将被禁用。

我唯一想要禁用的东西是yum-updatesd(因为我会在需要的时候手动运行yum update,而且可能用cron编写脚本),autofs,kudzu(因为我认为你是硬件的不太可能改变)和netfs(假设你没有使用NFS等)。 如果性能是一个大问题,可能值得禁用auditd。 大多数其他人可以被禁用,但在pipe理员生活更容易的间隙,我通常会让他们跑步。

实际上,列表中没有任何东西可能会导致你的性能问题,如果你closures它,你很可能会尝试启用一些东西,因为它已经closures了。 “研究它们,只打开你需要的东西”的一般build议是好的,但不完全符合成本效益。

如果您只关心性能和/或安全性,那么有更有效的地方去寻找。

一般的build议是研究每个服务,确切地说,确定每个服务的function(查看使用hdparam的性能增益,或者在禁用它们之前提供的syslogd)。 如果某个特定的服务在您的特定设置中certificate是无用的,请将其禁用。 但是,谨慎使用您决定禁用的服务对于日常function来说非常重要。 😉

也许这篇文章可能对你有帮助 – “在启动时禁用不需要的服务” http://www.imminentweb.com/technologies/centos-disable-unneeded-services-boot-time