Thursday, October 27, 2011

Installation of RedHat Linux 6.2

These instructions can be used to install and configure RedHat Linux 6.2 on a typical PC. They may need to be tweaked slightly, depending on the exact configuration of your PC.

  1. Install Linux
    1. Turn on computer and quickly insert disk 1 of RedHat Linux Professional 6.2
    2. If system fails to boot Linux, insert boot disk into floppy drive and restart
    3. At the boot prompt, press the 'Enter' key
    4. Make the following selections:
      1. Language Selection: English
      2. Keyboard Configuration:
        1. Model: Generic 101-key PC
        2. Layout: U.S. English w/ ISO9995-3
        3. Dead Keys: Disable dead keys
      3. Mouse configuration:
        1. Microsoft: IntelliMouse (PS/2)
        2. Uncheck 'Emulate 3 Buttons'
    5. Welcome to Red Hat Linux, click next
    6. Install options:
      1. Install: Custom
      2. Check 'use fdisk' only if you want full control over the partition layout
        Note: Only 4 primary partitions are allowed. One of these may be an extended partition, which can contain up to 12 logical partitions. Some older BIOS limitations require that the Linux /boot directory be contained in its own partition which does not extend beyond cylinder 1024. DOS/Windows requires a primary partition from which to boot, and additional drives must be logical partitions.
    7. Add the following partitions (sizes suggested):
      1. /boot 32MB
      2. swap 1024MB
      3. / 3072MB
      4. /usr 5120MB
      5. /home 8192MB
      6. /var 2048MB
      7. /scratch 1MB and Click 'grow to fill disk'
    8. Choose partitions to format: accept defaults
    9. Lilo configuration
      1. Lilo configuration: verify that 'Create boot disk' is checked
      2. Install Lilo Boot Record On: /dev/hda Master Boot Record
    10. Network Configuration
      1. Uncheck 'Configure using DHCP'
      2. Make the following settings: (talk to you network adminstrator for correct values)
        1. IP address: <ip_address>
        2. Netmask: <subnet_mask>
        3. Network: xxx.xxx.xxx.xxx (Fills in automatically)
        4. Broadcast: xxx.xxx.xxx.xxx (Fills in automatically)
        5. Hostname: <hostname>
        6. Gateway: <gateway>
        7. Primary DNS: <dns_server>
        8. Secondary DNS: <dns_server>
    11. Time Zone Selection:
      1. America/Detroit
      2. Leave 'System Clock uses UTC' unchecked for Linux/Windows dual boot systems
    12. Account Configuration:
      1. Set Root Password
      2. Add user accounts
    13. Authentication Configuration (accept defaults)
    14. Selecting Package Groups:
      1. Printer Support
      2. X Window System
      3. Gnome
      4. KDE
      5. mail/WWW/news/tools
      6. Graphics Manipulation
      7. Multimedia Support
      8. Networked Workstation
      9. SMB (Samba) Server
      10. Anonymous FTP Server
      11. Web Server
      12. Authoring/Publishing
      13. Emacs
      14. Development
      15. Utilities
    15. X Configuration
      1. Generic: Generic MultiSync
      2. Adjust sink rates as follows
        1. Horizontal sink: 30-64 kHz
        2. Vertical sink: 50-75 Hz
      3. Video Hardware: (Pick appropriate video card)
      4. Check Customize X Configuration
        1. Click next
        2. Choose 1024 by 768 @ 16 bits per pixel
      5. Click 'Test this configuration'
        NOTE: (Control + Alt + Backspace) exits X immediately
      6. Click 'Next'
    16. About to Install. Click Next, and wait a very long time. A log will be written to /tmp/install.log
    17. Congratuilations, Linux has been installed. Click exit
    18. Insert floppy and make boot disk
    19. Remove floppy and press Enter to reboot
  2. Verfify the date and time
    1. Login as root and type "date"
    2. Adjust the date and time if necessary with
      # date mmddhhmmyyyy
    3. Write the new date and time to the system's CMOS clock with
      # clock -w
  3. Verify Linux has correctly detected all of your machine's RAM
    1. Login and type "free"; verify that your machine's amount of RAM is correctly reported
    2. If Linux reports less RAM than is installed your system, following instructions
  4. Customize Linux
    1. Setup networking correctly. Login and startx to start windows, open a terminal, su to root,
      1. Run linuxconf, navigate to Config: Networking: Client tasks: Basic host information.
      2. On hostname tab, set hostname to <hostname>.
      3. On adapter 1 tab, set primary name plus domain to <hostname.domain>.
      4. Click accept. Click 'Act/Changes'. Click 'Activate the changes'. Quit
      5. Reactivate changes if necessary, then quit.
      6. Test network connectivity by browsing and telnetting to server.
    2. Create useful mount points
      # mkdir /mnt/zip
      # mount -t vfat /dev/hdd4 /mnt/zip
      # ls -alF /mnt/zip
      # umount /mnt/zip
      If the following line is added to /etc/fstab
      /dev/hdd4 /mnt/zip vfat noauto,owner 0 0
      then the mount command can be simplified to
      # mount /mnt/zip
    3. Scratch directory
      # cd /scratch
      # rm -r lost+found
      # chmod 777 /scratch
      # chmod +t /scratch
    4. Configure tcp_wrappers
      # vi /etc/hosts.deny
      Add the line,
      ALL: ALL
      # vi /etc/hosts.allow
      Add the line,
      ALL: <network>/<subnet_mask>
      where <network> can be determined from
      % ipcalc --network <ip_address> <subnet_mask>
    5. Change to a graphical login
      # vi /etc/inittab
      Change the line
      id:3:initdefault:
      to
      id:5:initdefault:
  5. Install additional packages from Red Hat CD's
    1. f2c
      Obtain f2c-19991109-2.i386.rpm from Linux Power Tools Applications CD-ROM, /redhat/i386. Insert CD-ROM. # mount /mnt/cdrom
      # cd /mnt/cdrom/i386
      # rpm -Uhv f2c-19991109-2.i386.rpm
      # umount /mnt/cdrom
    2. g77
      Obtain egcs-g77-1.1.2-30.i386.rpm from Linux installation CD-ROM disk 1, /RedHat/RPMS. Insert CD-ROM. # mount /mnt/cdrom
      # cd /mnt/cdrom/RedHat/RPMS
      # rpm -Uhv egcs-g77-1.1.2-30.i386.rpm
      # umount /mnt/cdrom
  6. Install update packages from RedHat
    • Option 1: Manually download selected updates and install them Visit Red Hat website and determine which RPMS need to be updated:
      http://www.redhat.com/support/errata/index.html
      The bare minimum update must include the following packages (or more recent versions):
      wu-ftpd-2.6.0-14.6x.i386.rpm
      nfs-utils-0.1.9.1-1.i386.rpm
      Earlier versions of the above packages have well-known and widely available remote root access security holes. This list is not guaranteed to be complete, as additional root access security holes may have been uncovered since the time this document was written.
      Create a directory for package updates:
      # mkdir /home/download/RPMS
      Download appropriate RPMS into the above directory. You can check to see whether a package is installed by using the following command:
      # rpm -qa | grep package
      Install the updates using the following command:
      # rpm -Fvh [filename(s)]
    • Option 2: Purchase Official Red Hat CD-ROM and automatically install updates # mount /mnt/cdrom
      # cd /mnt/cdrom
      # ./install-updates
      Answer 'y' to all prompts
      If the update fails during the dependency check due to krb5-configs, then this package must be installed manually with
      # rpm -ivh 6.2/krb5-configs*
      and ./install-updates must be run again
      After the update is complete, restart your computer with
      # shutdown -r now
      Note that the root file system fails to unmount during shutdown and is therefore automatically checked upon restart; several inodes have zero dtime and are deleted
      A log of the update may be found in /tmp/update.log, and any error messages or warnings may be found in /tmp/update.err
  7. Configure Samba
    # /sbin/chkconfig smb on
    # cd /etc
    # cp -p smb.conf smb.conf.000
    # vi smb.conf, make the following changes
    [global] section Set (uncomment if necessary)
    workgroup = <workgroup>
    server string = <hostname>
    Comment out
    ; printcap name = /etc/printcap
    ; load printers = yes
    Set (uncomment if necessary)
    guest account = nobody
    Add
    browseable = yes
    Set (uncomment if necessary)
    security = share
    Comment out
    ; log file = /var/log/samba/log.%m
    Set (uncomment if necessary)
    max log size = 50
    local master = no
    os level = 0
    domain master = no
    preferred master = no
    wins support = no
    wins server =
    preserve case = yes
    short preserve case = yes
    Restart Samba web server
    # /etc/rc.d/init.d/smb restart
    instructions.
  8. Configure Apache
    # cd /etc/httpd/conf
    # cp -p httpd.conf httpd.conf.000
    # vi httpd.conf, make the following changes
    Uncomment the section
    <Directory /home/*/public_html>
    ....
    </Directory> Uncomment the line
    AddHandler cgi-script .cgi
    Add the lines
    <Directory /home/*/public_html/cgi-bin>
    Options ExecCGI
    SetHandler cgi-script
    </Directory>
    To disable directory browsing (Recommended)
    Search for and delete any instances of "Indexes" within "Options" statement. For example, change
    Options Indexes Includes FollowSymLinks
    to
    Options Includes FollowSymLinks
    Important note: The users home directory must be set to mode 755 in order to access it through the web browser. Accounts created during setup are 700 (?), and are not accessible. To fix this, become root and do a chmod 755 on all /home/user directories.
    Restart Apache web server
    # /etc/rc.d/init.d/httpd restart
    Some administrators choose to install cgiwrap so that all cgi cripts run as the user in whose directory they are installed, instead of 'nobody'. If desired, cgiwrap can be installed using the following
  9. Cgiwrap is a program that allows cgi scripts run as the user in whose directory they are installed, rather than 'nobody'. This can be convenient both for security and practical reasons. If desired, cgiwrap can be installed using the instructions below.
    1. Obtain a copy of the cgiwrap source code
      Visit the cgiwrap download page and download the most recent version of cgiwrap (cgiwrap-3.6.4.tar.gz).
    2. Uncompress the cgiwrap archive
      % su
      # cd /download_dir
      # tar zxvf cgiwrap-3.6.4.tar.gz
    3. Configure and compile cgiwrap
      # cd cgiwrap-3.6.4
      # ./configure
      # make
      If httpd is running as a different user, e.g., User=web, then the --with-httpd-user=web option must be appended to the ./configure command
    4. Install cgiwrap
      # cp cgiwrap /home/httpd/cgi-bin/
      # cd /home/httpd/cgi-bin/
      # chown root:root cgiwrap
      # chmod 4755 cgiwrap
      # ln -s cgiwrap cgiwrapd
      # ln -s cgiwrap nph-cgiwrap
      # ln -s cgiwrap nph-cgiwrapd
    5. Update Apache configuration file
      # cd /etc/httpd/conf
      # cp -p httpd.conf httpd.conf.000
      # vi httpd.conf, make the following changes
      Add the lines RewriteEngine On
      RewriteRule ^/~(.*)/cgi-bin/(.*) /cgi-bin/cgiwrap/$1/$2 [PT]
    6. Restart Apache web server
      # /etc/rc.d/init.d/httpd restart

No comments:

Post a Comment