Certification Objective 2.03: Configuring a Network Installation

 < Day Day Up > 



Most Linux users can install Red Hat Enterprise Linux from a CD-ROM. During the installation portion of the Red Hat exam, you'll probably want to save time by installing RHEL 3 over a network on an NFS, HTTP, or FTP server. As you'll want to practice network installations, you'll want to set up a network server. For completeness, you can also install RHEL from ISO images on a local hard disk.

Configuring a Network Installation Server

Once you have the Red Hat installation CDs, configuring a network installation server is a fairly easy process. All you need to do is copy the files from each CD's /RedHat directory to a common directory, configure sharing on the directory, and then activate the NFS, FTP, or HTTP network.

Before you set up a network installation source, you'll need a partition with about 2GB of free space (or more). I'll illustrate the process for an NFS server, and explain the variations for FTP and HTTP servers.

Creating an NFS Installation Server

In the following steps, I'll show you how to create a shared directory, copy the Red Hat installation files, and then set up the share through NFS. As NFS is the most efficient way to share files between Linux and Unix computers, I think it's the most likely option for network installations during the exam. You'll need the Red Hat Enterprise Linux installation CDs, or at least the ISO files associated with those CDs.

  1. Create a directory for your installation files. With the following command, I can create the /mnt/inst directory:

    # mkdir /mnt/inst
  2. Insert the first Red Hat Enterprise Linux installation CD into its drive. Mount it with the following command. (If all you have are the ISO files, say in the /tmp directory, substitute mount -t iso9660 -ro loop /tmp/firstcd.iso /mnt/cdrom.)

    # mount /mnt/cdrom
  3. Copy the required files from the first Red Hat Enterprise Linux installation CD.

    # cp -ar /mnt/cdrom/RedHat /mnt/inst
  4. Copy the .discinfo file from the first Red Hat Enterprise Linux installation CD. This is required if you want to use redhat-config-packages (also known as the Red Hat Package Management tool) to add software using this installation server after Linux is installed. (While there are a number of other files on the first RHEL 3 installation CD, .discinfo is the only file that's absolutely required for an installation server.)

    # cp /mnt/cdrom/.discinfo /mnt/inst
  5. Unmount the first Red Hat Enterprise Linux installation CD.

    # umount /mnt/cdrom
  6. Repeat steps 2, 3, and 5 with the remaining Red Hat Enterprise Linux installation CDs.

  7. Set up an NFS share. Add the following line to /etc/exports. You can do it with a text editor such as vi or the redhat-config-nfs utility (also known as the NFS Server Configuration tool) described in Chapter 9.

    /mnt/inst       *(ro,sync)
  8. Export the shared directory.

    # exportfs -a
  9. Make sure there's nothing blocking access to NFS. The default Red Hat Enterprise Linux firewall blocks access to an NFS server. While inelegant, the following command 'flushes,' or turns off the standard Linux firewall from the local computer. I'll describe the iptables command in more detail in Chapter 10.

    # iptables -F
  10. Now you can activate the NFS service. The following commands assume that it's already running (which you can check with the service nfs status command):

    # service nfs stop # service nfs start
  11. Finally, you can check the status of your share. If it's working, you should see the contents of the /etc/exports directory when you run the following command:

    # showmount -e

When you install Red Hat Enterprise Linux from an NFS server, you'll need the name of the installation directory, in this case, /mnt/inst.

On The Job 

For an NFS connection, you don't need to copy the files from a CD. If you've downloaded ISOs of the RHEL installation CDs, all you need to do is copy them to the shared NFS directory, in this case, /mnt/inst. However, this does not work for FTP or HTTP servers.

Configuring Another Network Installation Server

The Red Hat exams test your knowledge of Linux. The most efficient way to share files between Linux computers is NFS. If you have a choice on the exams, install Red Hat Enterprise Linux over a network connection, using NFS. However, it's possible that you'll want or need to install Red Hat Enterprise Linux using one of the two other available protocols: HTTP or FTP.

HTTP Installation Server

The most popular Web server on the Internet is Apache, which you can easily install with Red Hat Enterprise Linux. The basic steps are the same as for the NFS server. The details are slightly different. I'm assuming that you've already installed the Apache Web server as described in Chapter 7. The basic Apache share directory corresponds to the DocumentRoot variable, which is by default the /var/www/html directory. In other words, you'd copy the Red Hat Installation files to a subdirectory of this directory. For the purpose of this chapter, I've created the /var/www/html/test directory. Here are the detailed steps:

  1. Create a directory for your installation files. With the following command, I'm creating the /var/www/html/test directory. (If you get an error message, Apache may not be properly installed.)

    # mkdir /var/www/html/test
  2. Insert the first Red Hat Enterprise Linux installation CD into its drive. Mount it with the following command. (If all you have are the ISO files, say in the /tmp directory, you can mount the first Red Hat Enterprise Linux installation CD with the mount -t iso9660 -ro loop /tmp/firstcd.iso /mnt/cdrom command.)

    # mount /mnt/cdrom
  3. Copy the required files from the first Red Hat Enterprise Linux installation CD.

    # cp -ar /mnt/cdrom/RedHat /var/www/html/test/
  4. Copy the .discinfo file from the first Red Hat Enterprise Linux installation CD. This is required if you want to use redhat-config-packages (also known as the Red Hat Package Management tool) to add software using this installation server after Linux is installed. (While there are a number of other files on the first RHEL 3 installation CD, .discinfo is the only file that's absolutely required for an installation server.)

    # cp /mnt/cdrom/.discinfo /var/www/html/test/
  5. Unmount the first Red Hat Enterprise Linux installation CD.

    # umount /mnt/cdrom
  6. Repeat steps 2, 3, and 5 with the remaining Red Hat Enterprise Linux installation CDs.

  7. Make sure there's nothing blocking access to your Apache server. While inelegant, the following command 'flushes,' or turns off the standard Linux firewall from the local computer. I'll describe the iptables command in more detail in Chapter 10.

    # iptables -F 
  8. Now you can activate the Apache service, httpd. The following commands assume that it's already running (which you can check with the service httpd status command):

    # service httpd stop # service httpd start

When you install Red Hat Enterprise Linux from an Apache HTTP server, you'll need to remember the directory with the Red Hat installation files. For an HTTP server, the right directory is relative to the DocumentRoot variable, /var/www/html. With these steps, the installation files are in /var/www/html/test; therefore, the correct directory is /test.

FTP Installation Server

One of the oldest protocols still in common use on the Internet is FTP, the File Transfer Protocol. It's efficient, it's easy to use, and now that Red Hat has implemented the very secure FTP (vsFTP) service on its systems, it's relatively secure.

The basic steps are the same as for the NFS server. I'm assuming that you've already installed the vsFTP server, as described in Chapter 7. The basic FTP share directory is /var/ftp/pub. In other words, you'd copy the Red Hat Installation files to a subdirectory of this directory. For the purpose of this chapter, I've created the /var/ftp/pub/test directory. Here are the detailed steps:

  1. Create a directory for your installation files. With the following command, I'm creating the /var/ftp/pub/test directory. (If you get an error message, Apache may not be properly installed.)

    # mkdir /var/ftp/pub/test
  2. Insert the first Red Hat Enterprise Linux installation CD into its drive. Mount it with the following command. (If all you have are the ISO files, say in the /tmp directory, you can mount the first RHEL installation CD with the mount -t iso9660 -ro loop /tmp/firstcd.iso /mnt/cdrom command.)

    # mount /mnt/cdrom
  3. Copy the required files from the first Red Hat Enterprise Linux installation CD.

    # cp -ar /mnt/cdrom/RedHat /var/ftp/pub/test
  4. Copy the .discinfo file from the first Red Hat Enterprise Linux installation CD. This is required if you want to use redhat-config-packages (also known as the Red Hat Package Management tool) to add software using this installation server after Linux is installed. (While there are a number of other files on the first RHEL 3 installation CD, .discinfo is the only file that's absolutely required for an installation server.)

    # cp /mnt/cdrom/.discinfo /var/www/html/test/
  5. Unmount the first Red Hat Enterprise Linux installation CD.

    # umount /mnt/cdrom
  6. Repeat steps 2, 3, and 5 with the remaining Red Hat Enterprise Linux installation CDs.

  7. Make sure there's nothing blocking access to your Apache server. While inelegant, the following command 'flushes,' or turns off the standard Linux firewall from the local computer. I'll describe the iptables command in more detail in Chapter 10.

    # iptables -F
  8. Now you can activate the FTP server, vsFTP. The following commands assume that it's already running (which you can check with the service vsftpd status command):

    # service vsftpd stop # service vsftpd start

When you install Red Hat Enterprise Linux from an FTP server, you'll need to remember the directory with the Red Hat installation files. For an FTP server, the right directory is relative to the basic /var/ftp directory. With these steps, the installation files are in /var/ftp/pub/test; therefore, the correct directory is /pub/test.

Requirements for Network Installations

Now that you've set up the Red Hat Enterprise Linux installation files on a network server, let's look at what else you'll need on the computer where you'll be installing Linux. Once Linux detects your network card, you'll need to configure that card to be a part of your network. It'll be done by a DHCP (Dynamic Host Configuration Protocol) server or by static IP addressing.

Exam Watch 

A DHCP server is based on the Dynamic Host Configuration Protocol. If you're going to install RHEL over a network during the exam, your proctor will tell you that there's an DHCP server for your network, or should give you the static IP address information that you'll use.

If there's a DHCP server for your network, this process is easy. All you'll need to do is set the Linux installation program to ask for your IP address information from that DHCP server. As long as there are no active firewalls between your computer and the DHCP server, you should not have any problems.

Otherwise, you'll need to configure your computer with static IP addresses. In this case, you'll need a valid, unused IP address, the local network mask, the default gateway IP address (if the installation files are on a different LAN), and optionally, the primary DNS IP address, a domain name such as example.com, and the hostname to use for the local computer.

As you can see in Figure 2-2, Anaconda allows you to get your IP address information from a DHCP server or enter the static IP address information yourself.

click to expand
Figure 2-2: Configuring TCP/IP on your network card during installation

You'll also need the hostname or IP address of the Red Hat Enterprise Linux installation server. If you have the hostname, you'll also need the IP address of the DNS server for the network used for the exam. As shown in Figure 2-2, this is also known as the Primary nameserver. If the DNS server is not on the LAN, you'll also need the Default gateway IP address.

On The Job 

If you're installing Red Hat Enterprise Linux from files on a network server, check the firewall on that server. The standard RHEL 3 and Red Hat Linux 9 firewalls cut off network communication to whatever FTP, HTTP, or NFS server you might be using to store the /RedHat directory tree.



 < Day Day Up > 



RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
ISBN: 71765654
EAN: N/A
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net