Last Updated: February 25, 2016
·
984
· tumf

Throw away unused service of CentOS in the trashcan

I always uninstall unnecessary services of CentOS5 like below:

acpid auditd autofs avahi-daemon avahi-dnsconfd bluetooth conman cpuspeed cups dnsmasq dund gpm hidd ip6tables irda lvm2-monitor mcstrans mdmonitor multipathd pand pcscd psacct rawdevices readaheadearly readaheadlater restorecond saslauthd smartd wpa_supplicant ypbind yum-updatesd

I wrote about this task to Chef recipe.

%w[acpid auditd autofs avahi-daemon avahi-dnsconfd bluetooth conman cpuspeed cups dnsmasq dund gpm hidd ip6tables irda lvm2-monitor mcstrans mdmonitor multipathd pand pcscd psacct rawdevices readahead_early readahead_later restorecond saslauthd smartd wpa_supplicant ypbind yum-updatesd].each { |name|
  service name do
    ignore_failure true
    action [:disable, :stop]
  end
}

Then, I wrote in a cookbook below:

https://github.com/tumf/centos5-cookbook

If you use Berkshelf, install as below:

echo "cookbook 'centos5', github: 'tumf/centos5-cookbook'" >> Berksfile
berks berks install --path cookbooks