Chinaunix首页 | 论坛 | 博客
  • 博客访问: 384016
  • 博文数量: 87
  • 博客积分: 2810
  • 博客等级: 少校
  • 技术积分: 825
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 22:34
文章分类

全部博文(87)

文章存档

2010年(25)

2009年(43)

2008年(19)

分类: LINUX

2009-06-26 11:46:07

禁用系统里不需要的服务
 
#!/bin/bash
#
# This script is used to del some service is not used on the server
# Create by kevinadmin
# Date 2009-06-23
# Mail
#
# use to the netfs or NFS
echo "Stop the Portmap service and dell it..."
service portmap stop
chkconfig --level 0123456 portmap off
# use to the netfs or NFS
echo "Stop the Nfslock service and dell it..."
service nfslock stop
chkconfig --level 0123456 nfslock off
# use to the netfs or NFS
echo "Stop the netfs service and dell it..."
service netfs stop
chkconfig --level 0123456 netfs off
# use to the netfs or NFS
echo "Stop the rpcgssd service and dell it..."
service rpcgssd stop
chkconfig --level 0123456 rpcgssd off
# use to the netfs or NFS
echo "Stop the rpcidmapd service and dell it..."
service rpcidmapd stop
chkconfig --level 0123456 rpcidmapd off
# use to the print server
echo "Stop the cups service and dell it..."
service cups stop
chkconfig --level 0123456 cups off
# the bluetooth
echo "Stop the bluetooth service and dell it..."
service bluetooth stop
chkconfig --level 0123456 bluetooth off
# use to the bluetooth
echo "Stop the hidd service and dell it..."
service hidd stop
chkconfig --level 0123456 hidd off
#
echo "Stop the avahi-daemon service and dell it..."
service avahi-daemon stop
chkconfig --level 0123456 avahi-daemon off
echo "Stop the ip6tables service and dell it..."
service ip6tables stop
chkconfig --level 0123456 ip6tables off
# at program
echo "Stop the atd service and dell it..."
service atd stop
chkconfig --level 0123456 atd off
#to monitor the lvm
echo "Stop the lvm2-monitor service and dell it..."
service lvm2-monitor stop
chkconfig --level 0123456 lvm2-monitor off
echo "Stop the firstboot service and dell it..."
service firstboot stop
chkconfig --level 0123456 firstboot off
#to find new hardware
echo "Stop the kudzu service and dell it..."
service kudzu stop
chkconfig --level 0123456 kudzu off
#used to monitor the hard ware
echo "Stop the lm_sensors service and dell it..."
service lm_sensors stop
chkconfig --level 0123456 lm_sensors off
#if you use selinux you need to enable mctrans
echo "Stop the mcstrans service and dell it..."
service mcstrans stop
chkconfig --level 0123456 mcstrans off
#if you use selinux you need to enable mctrans
echo "Stop the restorecond service and dell it..."
service restorecond stop
chkconfig --level 0123456 restorecond off
#if you use selinux you need to enable mctrans
echo "Stop the setroubleshoot service and dell it..."
service setroubleshoot stop
chkconfig --level 0123456 setroubleshoot off
# use to monitor the Soft RAID and SCSI device
echo "Stop the mdmonitor service and dell it..."
service mdmonitor stop
chkconfig --level 0123456 mdmonitor off
# use to the smart card
echo "Stop the pcscd service and dell it..."
service pcscd stop
chkconfig --level 0123456 pcscd off
echo "Stop the apmd service and dell it..."
service apmd stop
chkconfig --level 0123456 apmd off
# to update something to the kernel
echo "Stop the microcode_ctl service and dell it..."
service microcode_ctl stop
chkconfig --level 0123456 microcode_ctl off
#use to the X windows
echo "Stop the xfs service and dell it..."
service xfs stop
chkconfig --level 0123456 xfs off
#
service yum-updatesd stop
chkconfig --level 0123456 yum-updatesd off
阅读(2094) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~