Tips & Tricks for Redhat Linux

Here are some tips and tricks I've found useful for running Redhat Linux systems over the years, from version 5.1 to 8.0. Some may be helpful to you. Some may be out of date. Some may be obvious in the manual, but who ever reads those? NOTE: You need to be root to do most of these!

RPM commands lock up or freeze

Sounds like the RPM database has been corrupted.

  1. cd /var/lib/rpm
  2. db_verify Packages (only salvagable if this is ok)
  3. rm -f __db.*
  4. rpm -vv --rebuilddb
  5. Cross your fingers!

Adding new TrueType fonts

  1. Make a new directory, say /usr/X11R6/lib/X11/fonts/MyTTFdir
  2. Copy your .ttf font files into there
  3. cd /usr/X11R6/lib/X11/fonts/MyTTFdir
  4. ttmkfdir to make the fonts.scale file
  5. mkfontdir to make the fonts.dir file (needed for TTF fonts?)
  6. chkfontpath --add=/usr/X11R6/lib/X11/fonts/MyTTFdir (or manually by editing /etc/X11/fs/config)
  7. service xfs restart (or /etc/init.d/xfs restart)
  8. chkfontpath --list to see if MyTTFdir was added
  9. xfontsel to browse/view available fonts

CD Burning

The /etc/profile.d/ directory

Most people know about /etc/profile script which gets run for each new shell, setting up 'global' environmental variables etc.

Well, the /etc/profile.d/*.sh (for sh-style shells: sh, bash, bash2) and /etc/profile.d/*.csh (for csh-style shells: csh, tcsh) are also run. It's a nice clean way to easily plug settings (like $PATH) in and out for new programs you can't get RPMs for.