Preparing an Apache Web Server

In this section, we ll look at configuring an Apache web server with the Red Hat installation files from the CDs. Once you ve completed these steps, you ll be able to use a directory on your website after Red Hat Linux is installed for the RPM packages that you may need in the future.

In this section, we assume that you have a Linux or Unix computer, with the appropriate Apache ( httpd ) services already installed. We ll look at the basic commands that you need to set up an Apache ( httpd ) installation server; however, we don t address the details of how Apache is configured. To learn more about Apache, read Chapter 30 .

Once again, we assume that you re making changes as the root user .

Copying Files

The first step is to set up a directory with the Red Hat Linux installation files. You ll need a /RedHat directory, with base and RPMS subdirectories. Copy the files in the /RedHat/base directory from the first Red Hat installation CD. Then, copy the RPM packages from all three installation CDs to the /RedHat/RPMS directory.

This is actually a fairly easy process:

  1. Find room for the Red Hat installation files, preferably associated with the /var directory. You ll need nearly 2GB of space.

  2. Create a separate directory. Make sure it s in a partition with sufficient space. For more information on managing partitions, see Chapter 07 . For the purpose of this exercise, I ve named the directory /var/www/html/inst .

     # mkdir /var/www/html/inst 
  3. Mount the first Red Hat Linux 9 installation CD: (this will probably take several minutes)

     # mount /dev/cdrom /mnt/cdrom 
  4. Copy the applicable files from the CD:

     # cp -ar /mnt/cdrom/RedHat /var/www/html/inst 
  5. Unmount the first installation CD. Mount the second Red Hat installation CD. Copy the applicable files from that CD:

     # umount /mnt/cdrom # mount /dev/cdrom /mnt/cdrom # cp -ar /mnt/cdrom/RedHat /var/www/html/inst 
  6. Repeat step 5 with the third Red Hat installation CD:

     # umount /mnt/cdrom # mount /dev/cdrom /mnt/cdrom # cp -ar /mnt/cdrom/RedHat /var/www/html/inst 

Now you re ready with a Red Hat Linux installation source.

Unlike with NFS or a hard disk “based installation, you can t use an Apache server to install Red Hat Linux from .iso files.

Sharing Directories

If you ve installed the Apache web server on your computer, you can now share the associated directory. By default, standard files are stored in /var/www/html . Assuming you used the directories cited in the previous section, all you need to cite during the Red Hat Linux installation process is the /inst directory.

The process is simpler than for NFS. All you need to do is make sure Apache is started with the command

 # service httpd start 

and then check to see if you get the Test Page when you navigate to http://localhost in the web browser of your choice.

Once you ve created the share, you ll be able to download individual Red Hat RPM packages via your web server. Figure 4.2 shows how this is possible. Navigate to http://yourwebserver/inst/RedHat , and then click on the RPMs directory, and then you can click on the RPMs that you ve loaded in the previous section. You should be able to download the RPMs to your local computer.

click to expand
Figure 4.2: Accessing RPMs through a browser

As with NFS, make sure that a firewall on the local computer isn t blocking access to your web server. The easiest way to do this is to flush the current rules in your firewall with the following command:

 # iptables -F 

If you have a slightly older Linux, you may need to use the ipchains -F command.

Now you ve set up a directory with Red Hat Linux installation files, and have shared it using the Apache web server.

Note  

If you want to continue running Apache the next time you boot Linux, use the chkconfig --level 2345 httpd on command. See Chapter 13 for more information on chkconfig .

Installation Parameters

To use the Apache directory that you ve configured, you ll need two things: the address of Apache web server and the location of the /RedHat directory. The address of the Apache web server could be a computer name , such as Webserver , or a fully qualified domain name, such as www.example.com . However, this requires a working DNS (Domain Name Service) server, which may not apply to all networks.

Instead, you can use the IP address of the web server. If you don t know that address, run the ifconfig command. Find the IP address information for your computer as described earlier with Figure 4.1 .

For more information on IP addressing and the other concepts in this section, see Chapter 20 . To summarize, once you ve set up shared directories on a running web server, you need the following bits of information during the installation process:

The IP address of the Apache web server If you have a working DNS server on your network, you could substitute the computer name or fully qualified domain name of the server.

The location of the /RedHat directory Based on the actions taken in the previous section, that is /inst .

You ll get a chance to see how this works in the section Text Mode: Step by Step.

 


Mastering Red Hat Linux 9
Building Tablet PC Applications (Pro-Developer)
ISBN: 078214179X
EAN: 2147483647
Year: 2005
Pages: 220

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