| 关键词: 服务 service 服务器 SERVICES 系统 avahi NetworkManager restorecond 不适 脚本 |
#!/bin/bash #该脚本用于关闭服务器上非必须的系统服务项,并不适用于所有服务器,比如如果是文件服务器则NFS相关服务则不能关闭 #定义所要停止的服务,可以根据实际服务器应用更改 SERVICES="acpid atd auditd autofs avahi-daemon avahi-dnsconfd NetworkManager capi bluetooth cpuspeed cups dund firstboot haldaemon hidd ip6tables irda isdn mcstrans messagebus netfs netplugd nfs nfslock pand pcscd portmap rawdevices restorecond xfs sendmail yum-updatesd" for service in $SERVICES do #关闭服务随系统启动 chkconfig $service off #停止选择服务 service $service stop done |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|