This post shows how to install a minimal CentOS server with no GUI and how to remove unneeded services.
Single CD Install
You only need CD or DVD #1 to do the basic install.
No graphics needed either.
You can also use the small netinstall CD, if you prefer. Sometimes it seems that it's faster to just start with the netinstall CD than to download all the updates.
Minimal Install Steps
- Boot to CD #1
- At the Boot: prompt, type in "linux text" to get the text installation setup
- Proceed normally with the installation until it asks which packages to install
- Deselect all of the packages and then click on the "customize package selection" check box
- Hold down the "-" (dash) key, which scrolls through all of the package options and deselects them all
- Finish the installation
- Do a "yum update" to get latest versions of everything
- Do a "yum install " for what ever other packages you need
Run the following to see what is enabled:
then save it to a file, a “before” file.
After performing a minimal installation, the machine reboots. When you login disable as many services as possible with the following commands: 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.
After you disabled the services you don’t need save the “after”file
If you see anacron and kudzu, they only run at startup and will not stay loaded when finished.
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: