Linux Configuration Notes

Version: Red Hat 7.1  -  installed May 2001
Previous: Red Hat 6.0
Next: Red Hat 8.0
by Dennis G. Allard

This page contains tips and configuration notes for Linux Red Hat 7.1 (kernel 2.4) configured in May 2001.

Introduction

It is now May 2001. I have reconfigured oceanpark.com with Redhat 7.1, kernel 2.4.2-2, running an AMD K6-2/500MHz CPU equipped with 384MB of RAM. A small number of Web sites run on the server along with some experimental servers.

Overall Impression of Red Hat 7.1

What I liked and didn't like

  • I liked the new GUI installation. The system is much better about detecting video hardware and even picked off my Phillips 109S 19 inch Monitor Model correctly.
  • Networking detection and setup for two ethernet cards and configuration of DNS and IP numbers all worked flawlessly.
  • I am very happy to read that linuxconf will be removed. I have always had nothing but loathing for the linuxconf UI.
  • There is a lack of documenation about what files are used to configure what. Every single thing that is configured for you should be accompanied by a document that explains what config files and what config scripts are used to configure or reconfigure that thing.
  • The server configuration does not offer to configure the server as an LDAP or NIS server.
  • It is still unclear from the docs and the setup screens if swap memory can exceed 128MB. So I created a spare 256MB partition in case I want to add a second and third swap partition later.
  • For video, I was happy with the auto-detection and final result. Unlike Windows, for which I still so often see people with 32MB video cards running at 60Hz vertical refresh, in the case of Red Hat, the video setup actully makes reasonable choices. However, the GUI Xconfigurator (but not the command line Xconfigurator) gives you no choice and configures X to always restart at boot time. Worse, if you logout of GNOME or KDE, X automatically restarts. Worse still, there seems to be no way to turn off the automatic X restart. I say 'worse' since I am one of those people who sometimes like to get out of X and just work from a dumb terminal command line. Don't ask me why. The Control Panel would be a nice place to put such a on/off switch. Another thing the Control Panel needs is a way to change screen resolution.
  • The menus are still too complicated, with too many menu items that could mean the same thing.
  • The firewall setup was too restritive. The Red Hat installer should differentiate between a server that is open to the public internet and one that is used only for internal network service. As a result, I spent several days learning more about firewalls and configuring my own firewall.
  • SSH was changed to OpenSSH and I was unable to connect from my F-Secure SSH2 client. So I reinstalled my old SSH2 server and will assume that when I install Red Hat the next time, the dust will have settled. About one day lost on this issue.
  • I managed to finally install AbiWord. I downloaded abisuite-0.7.14-2-2GTK.i386.rpm from:
    http://www.abisource.org/dl_linux_intel.phtml.
    Note, you must edit /etc/X11/XF86Config-4 and uncomment the line:
      Load "type1" # Adobe Type 1 font handler
  • Very frustrating experience with sendmail, that seems to spin its own use of /etc/hosts.allow. See next.
  • inetd was replaced by xinetd, which caused me some frustration. I ended up setting ALL:ALL in hosts.allow, since I have a firewall which won't let much in I don't want anyway and since that was the only way I could figure out how to let sendmail work. /etc/hosts.allow, /etc/hosts.deny and tcpd could stand some seriously improved man pages. I do use xinetd, since imapd seems to require it. In the end, after finding an example xinetd config file for the IMAP service via Google, and guessing what the service entery for FTP must be, I'm happy.
  • man page writers -- PLEASE include examples

My firewall script:

After being hacked for the second time in seven years, I decided to beef up my firewall. My firewall script is http://oceanpark.com/notes/firewall_example.html

Useful commands and programs:

Very partial List of useful commands and programs. The difference between a command and a program is an 'advanced topic' (a UNIX anachronism, IMHO)

  • startx -- start the X Windows system graphical user interface.
  • Ctl-Alt-Backspace -- force X to exit, returning you to a command prompt.
  •      (default Red Hat setup automatically restarts X -- you can turn that off by using the Xconfigurator from the command line, since it asks you at the end of the config whether or not you wish for X to start automatically. Respond NO).
  • dir -- same as ls command below
  • ls -- list all files in the current directory whose name does not begin with . (a period)
  • ls -l -- ls output in long format, showing privleges and dates
  • ls -a -- ls output shows all files, including those whose names start with .
  • ls -t -- ls output sorted by time last modified
  • ls -lat -- all of the above
  • mv -- move (rename)
  • cp -- copy
  • cp -a -- copy a file and preserve attributs of the file
  • cp -ar foo bar -- recursively copy directory foo and all its subdirectories to bar
  • rm -- remove
  • rm -r foo -- recursively remove directory foo and all its subdirectories
  • rm -f foo -- force removal (don't prompt for permission) -- use with caution!
  • rm -fr foo -- recursively remove directory foo and all its subdirectories without prompting
  • man foo -- tell about the command foo
  • man -k foo -- tell about all man pages having the keyword foo
  • makewhatis -- update the man pages
  • /usr/bin/whereis foo -- tell where foo is (full pathnames)
  • /usr/bin/which -- tell which foo is first in the current path
  • printenv PATH -- show the current path
  • printenv -- show all environment variables
  • find . -name "foo*" -- find all files below the current directory whose name starts with foo
  • /usr/sbin/adduser -- to create a new user
  • /usr/sbin/useradd -- same as adduser
  • /usr/sbin/groupadd -- add a group (see /etc/group)
  • /usr/sbin/mouseconfig
  • /usr/sbin/smbd {start/stop} -- turns on/off Samba daemon
  • /usr/bin/free -- shows memory usage, including swap
  • fdisk -l -- compare the output of this to the content of /etc/fstab
  • ipchains -vnL -- show ipchain firewall rules

Configuration files:

Partial List of Configuration Files, Directories, and Programs.

  • /etc -- where almost all system configuration data resides
  • /etc/sysconfig/network -- the main network configuration file
  • /etc/resolv.conf -- network configuration of name server
  • /etc/rc.d/ -- startup files -- see rc.local and rc.sysinit programs, below
  • /etc/rc.d/rc -- script which starts everything
  • /etc/rc.d/rc.sysinit -- what kicks things off when Linux boots
  • /etc/rc.d/rc.local - local things to execute at boot time

  • /etc/issue -- dynamically rewritten by /etc/rc.d/rc.local
  • /etc/fstab -- directory mounts done at boot time - edit with caution
  • /etc/profile -- contains global environment variable settings (e.g. PERLLIB="/usr/local/lib/perl")
  • /etc/bashrc -- contains global alias commands (e.g. alias ll='ls -l')
  • /etc/hosts -- place entries for your LAN workstations
  • /etc/passwd -- adduser places new user here, edit manually to change name, shell, etc.
  • /etc/group -- add new groups and associate users with a group

  • /etc/sendmail.cf -- SMTP configuration -- touch with caution
  • /etc/xinetd.conf -- kind of replaces inetd, but see tcpd and hosts.deny and hosts.allow
  • /etc/smb.conf -- Samba configuration
  • /etc/crontab -- specification of what programs to automatically run at regular intervals
  • /etc/services -- tcp/ip services -- I don't modify this, but of interest
  • /etc/httpd/conf/httpd.conf/ -- The httpd web server configuration file (only need this one)

  • /var -- where much dynamic system data and logs are kept
  • /var/log -- various logs of interest
  • /var/log/messages -- various programs log things here -- worth taking a look at
  • /var/log/secure -- log of successful and refused attempts to access the system
  • /var/run -- where some (not all) server daemons place their pids (useful for kill -SIGHUP <pid>)
  • /var/spool/mail -- don't forget to copy over from old disk so users don't lose mail

  • /usr/local/bin -- where I put in-house programs and scripts of general interest
  • /usr/local/sbin -- where I put in-house system programs such as wwwstat, backup, etc.