Cleaning up default services in CentOS/RHEL

A freshly installed CentOS or RHEL runs many daemons which you don’t really want on a server, especially on a VPS where memory and CPU are usually more valuable resources.

Here’s what I usually do on a fresh server (tested with CentOS 5.x):

# stop unneeded services
chkconfig gpm off
chkconfig yum-updatesd off
chkconfig xfs off
chkconfig autofs off
chkconfig portmap off
chkconfig nfslock off
chkconfig rpcidmapd off
chkconfig hidd off
chkconfig bluetooth off
chkconfig netfs off
chkconfig pcscd off
chkconfig cups off
chkconfig smartd off 
chkconfig avahi-daemon off
chkconfig hplip off
chkconfig messagebus off
chkconfig iscsi off
chkconfig iscsid off

# disable graphical login screen
vi /etc/inittab
id:3:initdefault:

# disable SE Linux if necessary
vi /etc/selinux/config
SELINUX=disabled

reboot



 

 

Advertisements

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: