I'm having a frustrating time with customizing my initial CentOS 5.5 installation. I want to have a specific set of the packages installed (e.g. I want Java and httpd but not OpenOffice or NewsServer) but each time I carefully go through all the customization screens on installation it seems to somewhat randomly select and deselect other options. I'm trying to write up a repeatable step-by-step doc but something isn't right.
I've tried picking just "Desktop - Gnome" or "Server GUI" or even none of them. Then I choose the "Customize now" option and go through each of the packages that I want. What's odd is what comes out after the reboot is different each time. Does it matter which default package group I choose if I'm going to customize the lists?
Another oddity happens if I try to customize after the fact. For instance, if I try to just remove OpenOffice, it removes Gnome as a side-effect. I didn't uncheck the Gnome box but it appears that since OpenOffice is dependent upon Gnome, it gets removed as well. This implies that I need to do a minimal install and build it up as needed.
Am I missing some core metaphor that the installer is using? I'm using the exact same DVD image each time so I'm confused why I'm having such different results. Also I'm using the graphical installation mode. Ideally I'd be able to create a kickstart config from a good install.
Any pointers would help. I tried this Q on unix.stackexchange.com but I don't think there is as much traffic there.
There is a slightly less documented option for kickstart that will install the minimum required packages (--nobase). After the option you can specify the packages you want and anaconda will find the dependencies.
more tricks and tips are available at: http://wiki.centos.org/TipsAndTricks/KickStart
The random selection of other packages is likely due to dependency resolution. Without knowing exactly what is being selected it is hard to say.
I too have a frustration with
yum erase <package>
/yum groupremove <group>
wanting to remove packages that I think should remain installed. I don't know how to help you there, but hope someone else chimes in."Also I'm using the graphical installation mode. Ideally I'd be able to create a kickstart config from a good install."
I would try running
system-config-kickstart
and see if you can get a good file to start from here. If not, just install the OS with groups Base, X Window System, and Gnome Desktop and then see what you need to install using yum. From there, edit your Kickstart file and then test it until you are satisfied.I really like that you're trying to make this repeatable!
My rule is this:
Kickstart partitions the OS drive (if there are multiple) and installs enough to run the configuration management system of your choosing. Nothing more. Your config mgmt system takes care of adding the required packages. Start with
system-config-kickstart
and remove all packages except for your config mgmt system. This way it will install everything necessary for it to run, but nothing more (it may require some trial and error to get it perfect.)This way your 'repeatable step-by-step doc' is actually programmatic.
If you are looking for a repeatable install, use kickstart.
To define your kickstart, do a manual install on your reference system, installing only the minimum (I believe Base is the minimum). Then use yum to install only the components, and resulting dependencies, that you actually need.
Finally, take a listing of the RPMs installed in your system as so:
Take that list, and specify those packages to be installed in the %packages section of your kickstart.
I specify the ARCH for the RPM list because if you are installing a x86_64 system, it is quite possible that you'll end up with both 64- and 32-bit packages of the same thing, and for some things, 32-bit only.
The installer uses the repo metadata included on the disk and in the online repos in order to build the screens and determine dependencies. Examination of the metadata (perhaps with
repoquery
) will give you the information you seek.