Preparing an FTP Server

In this section, you ll learn how to configure an FTP server with the Red Hat installation files from the CDs. You ll also learn how to connect to the same FTP server after Red Hat Linux is installed for the RPM packages that you may need in the future.

We assume that you already have a Linux or Unix computer, with the appropriate FTP services installed. On Red Hat Linux, that includes the vsftpd-* or (for older versions of Red Hat Linux) wu- ftpd -* and anonftp-* RPM packages. We don t delve into the details of how FTP servers are configured in this chapter; to learn more about that process, read Chapter 27 .

In this section, 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 a fairly easy process:

  1. Find room for the Red Hat installation files, preferably associated with the /var directory. You ll need a partition with 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/ftp/pub/inst .

     # mkdir /var/ftp/pub/inst 
  3. Mount the first Red Hat Linux 9 installation CD:

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

     # cp -ar /mnt/cdrom/RedHat /var/ftp/pub/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/ftp/pub/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/ftp/pub/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 FTP server to install Red Hat Linux from .iso files.

Sharing Directories

If you ve installed the FTP server packages on your computer, you can now share the associated directory. By default, standard files are stored in /var/ftp/pub . 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. Just make sure the FTP server is started with the command

 # service vsftpd start 

and then check to see if you get the appropriate directories after logging into that FTP server.

Note  

Prior to Red Hat 9, vsftpd was an xinetd service, which you can activate as described in Chapter 23 .

Once you ve created the share, you ll be able to download individual Red Hat RPM packages from the FTP server. For more information, see Chapter 10 .

As with the other servers, 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 version of Linux with a version 2.2. x kernel, you may need to use the ipchains -F command.

Note  

The ipchains command is most closely associated with Linux kernel version 2.2. However, there are computers with Linux kernel version 2.4 that run ipchains . This includes the default versions of Red Hat Linux 7.1 and 7.2.

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

Note  

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

Installation Parameters

To use the FTP directory that you ve configured, you ll need two things: the address of the FTP server computer and the location of the /RedHat directory. The address of the FTP 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 FTP 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 FTP server, you need the following bits of information during the installation process:

The IP address of the FTP 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 /pub/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

Similar book on Amazon

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