The current choices for installing RPMs are: (listed by convience)
- rpm --install: can only install a single remote rpm
- up2date: you probably need an RedHat EL subscription
- yum: the better up2date, still terrible to use
- apt: ported from Debian, lastly a tool which does it right
Useful options to rpm are -vh, which give you verbose output and a progress bar when doing package installation/removal.
If you install a kernel using one of the tools above, better check /boot and /etc/grub.conf afterwards. At present, updating these files is job of the package manager, and not of the kernel rpm postinst script. Of course, all tools have implemented this differently and you simply can't rely on it to work.
Also, always install kernels (rpm -ivh) instead of updating (rpm -Uvh) them. Updating will not preserve the old version ...
Building your own RPMs
Never build RPMs as root. Spec files are free to specify any command they want, and can leave files around in your /-filesystem or, even worse, cause real damage to your installation. If you must build as root, better do it on a machine which you can reinstall/reimage quickly.
rpmbuild --rebuild foo.src.rpm is the command of your choice. If you have a spec file instead, try with rpmbuild -ba foo.spec.
FIXME: tell about setting up non-root rpmbuild
The best thing you can do is to pass a kickstart file to the installer. This way you don't need graphics support and you don't get the whole crap of packages you won't need. Have a look at the possible kickstart options (for RHEL4).
Remote booting the installer using PXE works; you can use CDs, HTTP, FTP or NFS as the package source.
Anaconda (the RedHat installer) leaves the config it used in /root/anaconda-ks.cfg after installation. You can use that as a starting point for your ks.cfg, or write one from scratch.
For %packages you probably want at least:
- @ text-internet (which gets you links, wget, etc).
For serious servers, also install:
- @ development-tools (so you rebuild SRPMS)
- kernel-devel/kernel-smp-devel (needed for custom drivers)
- net-snmp (gets you snmpd)
If you want to make your life a bit easier, also get:
- xorg-x11 (this is just the base, so X11 forwarding over ssh works)