Journal Articles

CVu Journal Vol 15, #2 - Apr 2003
Browse in : All > Journals > CVu > 152 (9)

Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.

Title: Installing Red Hat 8.0 (Psyche Linux)

Author: Administrator

Date: 03 April 2003 13:15:56 +01:00 or Thu, 03 April 2003 13:15:56 +01:00

Summary: 

Body: 

This article is an updated version of my Installing Red Hat 7.3 (Thread Linux) article, which can be found on my website's articles page [Grenyer], for Red Hat 8.0 (Psyche Linux).

Red Hat supply a reasonably comprehensive installation guide [Installation] which is more than most people will need to install Red Hat 8.0 Linux. However, although it explains what all the different options are, it is not always clear which should be used in what circumstance. My intention here is to describe each of the installation screens and explain what I think should be entered for the purposes of the Linux Server. For each screen I will give the page of the PDF version of the guide so that further information can be gained easily. From here on in The Official Red Hat 8.0 Installation Guide will be referred to as "the Installation Guide".

In my previous article [ServerArticle] I stated that "There is probably no point in buying a monitor for the server… …as it is unnecessary to use one after installation." In the final part of this article I will explain how to install OpenSSH [OpenSSH]. OpenSSH is a free version of the SSH protocol suite of network connectivity tools. It will allow you to control the Linux Server remotely and negate the need for a monitor or keyboard.

Installing the Linux Server

From this point forward I assume that you have a fully built and working PC, of a similar specification to that discussed in my previous article, and that it is ready to have Red Hat 8.0 Linux installed.

1. Booting from the CD and Selecting an Installation Option (p.33)

If your system is unable to boot from CDs please see section 1.4.1 on page 13 of the Installation Guide for alternative boot methods.

Set the computer's BIOS to boot from the CD-Rom, place the first Red Hat 8.0 installation disk in the drive and reboot. Let the machine go through the memory test and boot from the CD. A screen full of installation options should appear along with the Red Hat logo and version number.

The two listed installation options are:

Install or Upgrade Red Hat Linux in Graphical Mode

This is the default installation option and takes the user through the installation process with a high resolution GUI (Graphical User Interface). A reasonably good monitor and graphics card (capable of 800x600 resolution), keyboard and mouse are needed. To start this installation option simply press enter.

Install or Upgrade Linux in Text Mode

This takes the user through a text based installation process. It is ideal for people with very low resolution monitors and graphics cards or those who don't want to plug in a mouse. To start this installation process simply type text at the prompt and press enter.

Although it is not listed, the following installation option is also available:

Enable Low Resolution mode

This takes the user through a low resolution GUI installation process which is ideal for people who are using a low resolution monitor and graphics card that are capable of displaying the GUI, but not up to 800x600 (I'll be using this mode as my black and white monitor won't display 800x600). To start this installation process type lowres at the prompt and press enter.

All three processes have the same screens and request the same information. They are just displayed differently.

Select the mode you want and press enter. After the Kernel and your PC's hardware are initialised you may be asked whether you want to "...begin testing the CD media before installation..." If you want to test your CDs before the installation choose OK, otherwise choose skip.

Next, Anaconda, the installation program, is started and the user is first presented with a Red Hat splash screen and then the "Welcome to Red Hat Linux screen". Be patient as this can take a while and the screen may go blank for periods of 30 seconds or more.

2. Welcome to Red Hat Linux (p.40)

This screen just gives information about where to find installation documentation and information. Simply click next to move to the next screen.

3. Language Selection (p.40)

This screen allows the user to select the language that the installation process will be presented in. English is the default. If you want to use a different language simply select it.

Click next to move the next screen.

4. Keyboard Configuration (p.40)

This screen allows the user to select the keyboard layout they want to use. The default is U.S. English so is likely to need to be changed to United Kingdom.

Once you have configured your keyboard click next to move to the next screen.

5. Mouse Configuration (p.41)

This screen allows the user to configure their mouse. Simply select your mouse from the list, or the closest generic mouse, and put a tick in the Emulate Three Buttons check box if you want to emulate a three button mouse (with a non-three-button mouse).

Click next to move to the next screen.

6. Installation Options (p.42)

This screen allows the user to select the type of Red Hat Linux installation they want. For more information on what the individual options are see the Installation Guide. We want maximum control so that we can create our own partitions (if we want to) and install the minimum number of applications, so choose Custom.

Click next to move to the next screen.

7. Choosing Your Partition Strategy (p.43)

This screen allows the user to set up the various partitions that Linux uses. The easiest thing to do at this point is select "Have the installer automatically partition for you." This will even work if you already have a Windows partition you wish to keep on the disk. However, this option will create smaller partitions than the one I listed in the previous Linux Server article (Red Hat 8.0 recommends that some of the partitions should be bigger than were stated in my previous article, which was based on Red Hat 7.2). So in order to make good use of the large amount of space that is likely to be available to you, select "Manual partition with Disk Druid" and click next. Disk Druid (p.45) is very simple to use:

Your hard disk is likely to be labeled /dev/hdc in the list box at the bottom of the Disk Druid screen. If you already have a Windows partition this will be listed as type vfat or NTFS/HPFS. If you have a second disk this is likely be labeled /dev/hdd. To create the partitions follow the steps below:

  1. Swap partition (256MB)

    Click New to create a new partition. In the Allowable Drives list box make sure the hard disk you want to install the partition on is the only disk selected. For the swap partition ignore the Mount Point drop down box and select swap from the File System drop down box. Enter 256 into the Size (MB) edit box to create a partition of 256 MB. Make sure that Fixed Size is selected in the Additional Size Options group box and click OK.

  2. Boot partition (75MB)

    Click New to create a new partition. In the Allowable Drives list box make sure the hard disk you want to install the partition on is the only disk selected. For the boot partition select /boot from the Mount Point drop down box and select ext3 from the File System drop down box. Enter 75 into the Size (MB) edit box to create a partition of 75 MB. Make sure that Fixed Size is selected in the Additional Size Options group box and click OK.

  3. Root (3700MB)

    Click New to create a new partition. In the Allowable Drives list box make sure the hard disk you want to install the partition on is the only disk selected. For the root partition select / from the Mount Point drop down box and select ext3 from the File System drop down box. Enter 3700 into the Size (MB) edit box to create a partition of 3.7 GB. Make sure that Fixed Size is selected in the Additional Size Options group box and click OK.

  4. Usr (4000MB)

    Click New to create a new partition. In the Allowable Drives list box make sure the hard disk you want to install the partition on is the only disk selected. For the usr partition select /usr from the Mount Point drop down box and select ext3 from the File System drop down box. Enter 4000 into the Size (MB) edit box to create a partition of 4 GB. Make sure that Fixed Size is selected in the Additional Size Options group box and click OK.

  5. Var (385MB)

    Click New to create a new partition. In the Allowable Drives list box make sure the hard disk you want to install the partition on is the only disk selected. For the var partition select /var from the Mount Point drop down box and select ext3 from the File System drop down box. Enter 385 into the Size (MB) edit box to create a partition of 385 MB. Make sure that Fixed Size is selected in the Additional Size Options group box and click OK.

  6. Home (2500MB)

    Click New to create a new partition. In the Allowable Drives list box make sure the hard disk you want to install the partition on is the only disk selected. For the home partition select /home from the Mount Point drop down box and select ext3 from the File System drop down box. Enter 2500 into the Size (MB) edit box to create a partition of 2.5 GB. Make sure that Fixed Size is selected in the Additional Size Options group box and click OK.

    Click Next to move on from Disk Druid.

8. Boot Loader configuration (p.51)

This screen allows the user to change and configure the boot loader. GRUB is set as the default boot loader. it can be changed by clicking the Change Boot Loader button. Leave the default set to GRUB unless you particularly want to use LILO or a boot disk. See the installation guide for more details.

The user can also select which operating system is booted by default. This is only relevant if you already have another operating system installed, such as Windows. Put a tick in the box beside the operating system you would like to boot by default.

It is also possible to set a GRUB password from this screen. GRUB passwords provide a security mechanism in an environment where physical access to your server is available. If you are installing GRUB as your boot loader, you should create a password to protect your system. Without a GRUB password, users with access to your system can pass options to the kernel which can compromise your system security. With a GRUB password in place, the password must first be entered in order to select any non-standard boot options. To set a GRUB password, put a tick in the Use A Boot Loader Password box and enter a password.

Leave the tick out of the Configure Advanced Boot Loader Password box unless you particularly want to install the boot loader somewhere other than the Master Boot Record. See the Installation Guide for more information. Click next to move to the next screen.

9. Network configuration (p.55)

Take the tick out of Active On Boot tick box for DHCP as eventually the Linux Server will also be a DHCP server.

Click Edit to edit the eth0 interface, which is the servers network (card) interface. This brings up the Edit Interface eth0 dialog box. Take the tick out of the Configure Using DHCP tick box and put a tick into the Activate On Boot tick box. If you are planning to use the Linux server as part of an existing network you should know what IP Address and Network Mask settings to enter. If you are creating a new network or just connecting the Linux Server to another PC running Windows or Linux use the following settings:

IP Address: 192.168.1.1
   (use 192.168.1.2 for the other (client) PC)
Netmask: 255.255.255.0

We are not concerned with the other settings at this point so leave the other boxes blank.

Click Next to move to the next screen and ignore the warnings.

10. Firewall Configuration (p.57)

Leave the default firewall settings as we will be revisiting them when we set up OpenSSH later.

Click Next to move to the next screen.

11. Language Support (p.59)

Put a tick in the boxes for the language you want the Linux Server to support. Most people will probably only want to support one language (e.g. English (Great Britain)). Take the tick out of the English (USA) box and put it in the language of your choice.

Click Next to move to the next screen.

12. Time Zone (p.60)

Select your time zone (e.g. Europe/London).

Click Next to move to the next screen.

13. Root Password (p.61)

Setting up a root account and password is one of the most important steps during your installation. The root account is used to install packages, upgrade RPM packages, and perform most system maintenance. Logging in as root gives you complete control over your system. Use the root account only for system administration. Create a non-root account for your general use. These basic rules will minimize the chances of a typo or an incorrect command doing damage to your system.

The installation program will prompt you to set a root password for your system. You must enter a root password. The installation program will not let you proceed to the next section without entering a root password.

The root password must be at least six characters long; the password you type is not echoed to the screen. You must enter the password twice; if the two passwords do not match, the installation program will ask you to enter them again.

You should make the root password something you can remember, but not something that is easy for someone else to guess. Your name, your phone number, qwerty, password, root, 123456, and anteater are all examples of bad passwords. Good passwords mix numerals with upper and lower case letters and do not contain dictionary words: Aard387vark or 420BMttNT, for example. Remember that the password is case-sensitive. If you write down your password, keep it in a secure place. However, it is recommended that you do not write down this or any password you create.

Once you've entered the root password, set up a user account by clicking Add. Complete the User Name, Full Name, Password and Confirm (password) edit boxes and click OK to create the new user.

Click Next to move to the next screen.

14. Authentication Configuration (p.64)

Leave defaults. Consult the Installation Guide for further details.

Click Next to move to the next screen. The message "Reading Package Information" will be displayed for a short time before the next screen is displayed.

15. Select Package Groups (p.66)

Deselect all the packages as we want the most basic system possible onto which we can install the latest versions of only the software we want. Consult the Installation Guide for further details.

Click Next to move to the next screen.

16. About to Install (p.69)

You are now ready to install the Linux Server.

Click next to install. Only installation CD1 is required for our minimal installation. Installation on my system takes a little over 11 minutes according to the displayed counter.

17. Create Boot Disk (p.70)

Once the installation is complete you will be asked to create a boot disk.

To create a boot disk, insert a blank, formatted diskette into your 3.5 inch disk drive and click Next. It is highly recommended that you create a boot disk. If for some reason your system were not able to boot properly using GRUB, LILO, or a third-party boot loader, a boot disk would enable you to properly boot your Red Hat Linux system. After a short delay your boot disk will be created. Remove it from your drive and label it clearly.

Click Next to move to the next screen.

18. Congratulations, your Red Hat system is complete (p.73)

Click Exit. The installer exits and your machine should reboot.

Make sure you take the CD out of the CD-Rom drive. Allow the system to boot back into the Linux Server. Remember, if you have set the boot loader up to boot a different OS by default you must select "Red Hat Linux" from the boot menu. If you decided to use a boot disk to boot the Linux Server, remember to use that. The boot process may try to auto-configure an onboard sound card, if you have one, during the boot process. Allow it to do this. Once Linux has finished booting you should see something similar to the following:

Red Hat Linux release 8.0 (Psyche)
Kernel 2.4.18-14 on i586

localhost login:

Congratulations! You have installed the Linux Server.

19. Shutting Down

It is very important to shut down the Linux Server correctly. Just like Microsoft Windows, Red Hat Linux cannot just be 'switched off'. To shut down the Linux Server you must be logged in as root. It is not enough just to use the su command and enter the root password. If you are logged in as a user other than root type logout to logout.

To shutdown the Linux Server log in as root. At the login prompt enter root and press enter. Then enter the root password and press enter. At the prompt enter:

shutdown -h now

to shut down the Linux Server or:

shutdown -r now

to reboot the server. If you have an ATX motherboard the PC should power down automatically, if not you can turn it off manually when you receive the Power Down message.

Installing OpenSSH

This is the first package you should install on the Linux Server so that the monitor and keyboard can be removed permanently. I'm going to start as I mean to go on by explaining where to download the latest version of OpenSSH from and how to install it on the Linux Server. An older version of the two OpenSSH packages can be found on the first and second installation CDs in the /RedHat/RPMS directory, but I would highly recommend downloading the latest versions and using those.

The details of the SSH protocol are beyond the scope of this article, but it should be enough to say that SSH is a secure protocol that allows users to open consoles on remote computers and control the Linux Server via the command line. There are a number of SSH clients available. I will explain how to download and use one of the more popular Microsoft Windows SSH clients, PuTTY [PuTTY].

This section of the article is based on an article [SSH_FAQs] that is part of the RedHat Yahoo [Yahoo] groups FAQs [Redhat_FAQs].

From this point on I assume that the client PC, running Microsoft Windows has the correct IP address and is connected to Linux Server via some kind of network or cross over cable. This is quite a big assumption. If it is too big please let me know.

1. Downloading OpenSSH and the PuTTY SSH client.

Red Hat 8.0, unlike Red Hat 7.3, comes with version 3.4 of OpenSSH and the OpenSSH Server preinstalled. The firewall is also pre-configured to allow access to SSH. If you would prefer not to update to the latest version of OpenSSH jump straight to step 7 (below), however this is not recommended.

The two SSH packages that need to be downloaded from the OpenSSH ftp server [OpenSSH_FTP] are the OpenSSH package itself and the OpenSSH server, you may also like to download the OpenSSH client. The latest versions of the packages at the time of writing are as follows:

openssh-3.5p1-1.i386.rpm 
openssh-server-3.5p1-1.i386.rpm
openssh-clients-3.5p1-1.i386.rpm

You should download the most up-to-date package on the server. All the packages are less than 1MB in size and do not take long to download even over a 56k dial-up connection.

The PuTTY executable can be downloaded from the PuTTY website's download page [PuTTY_Download]. PuTTY is a standalone executable which does not require any installation.

2. Transferring the OpenSSH Packages to the Linux Server

As we did the most basic possible installation of the Linux Server there is no way to transfer the packages from the machine that they have been downloaded on to the Linux Server, other than using a floppy disk.

Assuming the packages have been downloaded on a Microsoft Windows PC, get a fresh floppy disk and reformat it as usual. Although most disks come pre-formatted these days, I suggest you reformat it because for some reason my Linux Server couldn't read a BASF floppy disk straight out of the box without reformatting it on Windows. Copy the OpenSSH packages onto the floppy disk, remove it from the Windows PC and place it in the Linux Servers floppy disk drive.

Before it can be used the floppy disk drive must be mounted. To do this log in as the non-root user that was set-up during the installation and type the following, followed by enter:

mount /dev/fd0

To view the contents of the floppy disk type the following and press enter:

ls /mnt/floppy

You should see a list of the OpenSSH packages that were copied onto the disk. It is very important that the floppy disk is not removed form the drive until after the drive has been un-mounted. To un-mount the floppy disk drive type the following and press enter:

umount /dev/fd0

However, there is no need to un-mount the floppy drive until after the packages have been installed. The packages can be installed directly from the floppy disk, so there is also no need to copy them to the Linux Server.

3. Installing the OpenSSH Packages

To install the packages, root permission is required. At this point the non-root user could be logged out and re-logged in as root, however there is an easier way. While logged in as a non-root user, type the following and press enter:

su

You will be prompted for a password. Enter the root password and press enter. You should now have root permissions. When you have finished type the following and press enter to relinquish root permissions:

exit

I found that the easiest way to install the latest OpenSSH was to remove the old one first. Do this by entering the following three commands one at a time at the command line and pressing enter:

rpm -e openssh-client
rpm -e openssh-server
rpm -e openssh

Assuming that the OpenSSH packages are on the floppy disk and the floppy disk drive has been successfully mounted, all that needs to be done to install the packages is type the following and press enter:

rpm -Uvh /mnt/floppy/openssh*

Evidence of the packages being installed will be displayed on the screen. The OpenSSH packages should now be installed and the floppy drive can be un-mounted (see above). Now would also be a good time to relinquish root permissions.

4. Configuring the Firewall

The firewall must be configured in order to allow remote computers to access the SSH Server that has just been installed on the Linux Server. To configure the firewall you must log in as root. Simply using the su command is not enough. If logged in as a non-root user, logout and re-login as root (see above). To run the firewall configuration program type the following and press enter:

lokkit

This will bring up the firewall configuration screen. Leave the Security Level as High and use the Tab key to select the Customize button and press enter. When the customize screen opens use the Tab key to select SSH and then use the space bar to put an asterisk (*) in the box next to it. Use the Tab key again to select the OK button and then press enter. This will take you back the first screen. Use the Tab key to select to select the OK button and leave the firewall configuration program.

The firewall must be restarted for the new settings to take effect. To do this type the following and press enter:

/etc/rc.d/init.d/ipchains restart

5. Starting OpenSSH

To start OpenSSH you must be logged in as root or have used su to get root permissions (see above). To start OpenSSH type the following at the command line and press enter:

/etc/rc.d/init.d/sshd start

You should receive a number of messages on the screen which indicate that OpenSSH has been setup and started successfully. You are now ready to access the Linux Server remotely and will soon be able to remove the monitor and keyboard.

6. Using PuTTY to Access the Linux Server

Assuming that OpenSSH has be started and is running successfully on the Linux Server and that the Windows client PC and Linux Server are correctly connected and configured, connecting to the Linux Server with PuTTY couldn't be easier!

Run the PuTTY executable by double clicking on it. Set the protocol to SSH, enter the IP address of the Linux Server and click open. You'll receive a PuTTY security alert. As this is a closed system (i.e. not connected to the internet), ignore the alert and click OK. When prompted to do so, login as you would on the Linux Server. You will now get a command prompt you can use in exactly the same was as you would directly on the Linux Server.

Putty Settings

Figure 1. Putty Settings

Putty Command Line Console

Figure 2. Putty Command Line Console

I would recommend practicing logging in and shutting the Linux Server down, as discussed above, a few times through PuTTY. Then when you are comfortable with it, remove the keyboard and mouse from the Linux Server.

References

[Grenyer] My website articles page: http://www.paulgrenyer.co.uk/articles

[Installation] The Official Red Hat Linux 8.0 Installation Guide: http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/pdf/rhl-ig-x86-en-80.pdf

[OpenSSH] OpenSSH: http://www.openssh.com

[GettingStarted] Red Hat Linux 8.0 Getting Started Guide: http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/pdf/rhl-gsg-en-80.pdf

[SSH_FAQs] RedHat Yahoo group FAQs SSH article: http://home.nyc.rr.com/computertaijutsu/ssh.html

[Yahoo] RedHat Yahoo group: http://groups.yahoo.com/group/redhat/

[Redhat_FAQs] RedHat Yahoo group FAQs: http://home.nyc.rr.com/computertaijutsu/linfaq.html

Notes: 

More fields may be available via dynamicdata ..