The first place to look for problems is in your logs. Go to /var/log and see if there is a directory named for the application that’s giving you problems. For instance, Apache has a log at /var/log/httpd.
The Red Hat Package Manager (RPM) handles software installation, verification and removal under both Red Hat family and SUSE family distributions.
One of the first things to do if you suspect software failure, corruption or hacking is to verify the suspect package’s installation and files. First you will likely have to find the correct name for the package. This is probably most easily done using the RPM Search at http://rpm.pbone.net/. Or you can try trial and error:
rpm -q openoffice
rpm -q OpenOffice
rpm -q openoffice_org
rpm OpenOffice_org #bingo!
rpm -V OpenOffice_org #the actual verification
Under Debian distos, Synaptic (the apt utility) handles similar functionality.
This one is good if you know where your problem lies: Apache won’t run, for instance.
First, you’ll need (again) to know the name of the package: in this case, Apache is installed as the httpd package.
rpm -q httpd #is it installed?
whereis httpd #where is the binary?
ldd /usr/sbin/httpd #shows all libraries used by httpd
whereis libz #one at a time,
#confirm that these libraries are indeed present
If one is indeed missing, it’s time to find it. Once again, go to RPM Search at http://rpm.pbone.net/ and search for packages that contain the library for your distribution, your distro release version, and your processor architecture. It’s easier than it sounds:
In this case, for instance, searching on the term “libz” resulted in lots of incorrect results; I had to search on “libz.” to get the correct library.
Once you’ve got the package, install with RPM as usual:
rpm -Uvh libz.rpm
After installing, make sure that the list of shared library directories (/etc/ld.so.conf) and the list of shared libraries themselves (/etc/ld.so.cache) are updated using this command:
ldconfig
Note that when no installer is provided, for instance when you download a simple .tar.gz package, you must copy libraries to their default locations manually, and run the ldconfig command to add them to the conf and cache files.
This is a classic problem for Apache when you are running lots of virtual hosts. See the Apache.org page on this, http://httpd.apache.org/docs/2.0/vhosts/fd-limits.html.
By default, programs can open only up to 1024 files. On web servers in particular, use the ulimit command to change the upper limit, i.e. the maximum number of files:
ulimit -n 5000 #-n sets filehandle limit
You can experience a similar problem with the upper limit of child processes. Use:
ulimit -u 8000 #-u sets user processes limit
LILO:
Edit /etc/lilo.conf to change “compact” to “linear”.GRUB:
Typically GRUB errors result from missing files in /boot. (I TOLD you to back up this directory!)
Remember the boot disk I told you to make?