VnLamp

Go Back   VnLamp > Linux Resources > Linux Forums - Press Releases

Trả lời
 
LinkBack Ðiều Chỉnh Xếp Bài
Disable unneed CentOS services
Old
  (#1 (permalink))
 
Status: Offline
Posts: 601
Tham gia: Dec 2007
^..^
 
hautp's Avatar
Default Disable unneed CentOS services - 20-08-2008, 11:20 20-08-2008

After performing a minimal installation, the machine reboots. When you login disable as many services as possible with the following commands:

HTML Code:
chkconfig anacron off
chkconfig apmd off
chkconfig atd off
chkconfig autofs off
chkconfig cpuspeed off
chkconfig cups off
chkconfig cups-config-daemon off
chkconfig gpm off
chkconfig isdn off
chkconfig netfs off
chkconfig nfslock off
chkconfig openibd off
chkconfig pcmcia off
chkconfig portmap off
chkconfig rawdevices off
chkconfig readahead_early off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig smartd off
chkconfig xfs off
chkconfig ip6tables off
chkconfig avahi-daemon off
chkconfig firstboot off
chkconfig yum-updatesd off 
chkconfig sendmail off
chkconfig mcstrans off
chkconfig pcscd off
chkconfig bluetooth off
chkconfig hidd off
The next group of services is more useful to servers in some circumstances.

xinetd
may be needed for some servers

acpid
needed for power button to shut down server gently

microcode_ctl
not needed on AMD machines

irqbalance
not needed unless running SMP

multiple cores, multiple processors, hyperthreading
haldaemon and messagebus
support for plug and play devices

mdmonitor
not needed unless running software RAID

Evaluate their worth even more closely before disabling them.

HTML Code:
chkconfig xinetd off
chkconfig acpid off
chkconfig microcode_ctl off
chkconfig irqbalance off
chkconfig haldaemon off
chkconfig messagebus off
chkconfig mdmonitor off
Run the following to see what else is enabled:

chkconfig --list |grep "3:on" |awk '{print $1}' |sort

If you want to compare the list before and after, you can:

chkconfig --list |grep "3:on" |awk '{print $1}' |sort > before

and

chkconfig --list |grep "3:on" |awk '{print $1}' |sort > after

run the block of chkconfig commands, then

diff before after

On one machine the above command lists:

auditd
crond
iptables
kudzu
network
restorecond
sshd
syslog
anacron and kudzu only run at startup and will not stay loaded when finished.

Virtual Terminals
You may also minimize on virtual terminals. The default is six virtual terminals. You can probably do with two. To disable them, edit the /etc/inittab file and comment out the ones that you don't want running like this:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6

Updating and Rebooting
On any new install, it is a good idea to run "yum update" and then reboot the machine to apply the latest security and software updates.

It's a good idea to reboot after the update to make sure that the system comes up properly.
   
Trả Lời Với Trích Dẫn
Old
  (#2 (permalink))
 
Status: Offline
Posts: 222
Tham gia: Jan 2008
Senior Member
 
mice's Avatar
Default 20-08-2008, 18:20 20-08-2008

thanks ><


mice2503
  Send a message via Yahoo to mice Send a message via Skype™ to mice 
Trả Lời Với Trích Dẫn
Trả lời


Ðiều Chỉnh
Xếp Bài

Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt
Trackbacks are Mở
Pingbacks are Mở
Refbacks are Mở


Múi giờ GMT. Hiện tại là 03:21 21-05-2012.