28 December 2010

FTP Installation Server - RHCE

One of the oldest protocols still in common use on the Internet is FTP, the File Transfer Protocol. It's efficient and 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 those for the NFS server. I'm assuming that you've already installed the vsFTP server. 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. Here are the detailed steps:
  1. Create a directory for your installation files. With the following command, create the /var/ftp/pub/inst directory. (If you get an error message, vsFTP may not be properly installed.)
    # mkdir /var/ftp/pub/inst
  2. Insert the first Red Hat Enterprise Linux installation CD/DVD into its drive. In many cases, it'll get mounted automatically, using the name of the media; for example, my RHEL DVD is automounted in the /media/RHEL-5 i386 Disc 1 directory. Otherwise, you can run a command such as mount /dev/cdrom /media. (If all you have are the ISO files, say in the /tmp directory, substitute mount -ro loop /tmp/firstcd.iso /media.)

  3. Copy the required files from the first Red Hat Enterprise Linux installation CD. Use the cp -ar /source/. /var/ftp/pub/inst command, where source is the mount directory (such as /media/RHEL 5 i386 Disc 1). Don't forget the dot (.); it makes sure to copy hidden files, including the .discinfo file from the first Red Hat Enterprise Linux installation CD.

  4. Unmount the first Red Hat Enterprise Linux installation CD. If it's an installation DVD, skip to step 6. Use the umount /source command.

  5. Repeat steps 2, 3, and 4 with the remaining Red Hat Enterprise Linux installation CDs.

  6. Make sure there's nothing blocking access to your vsFTP server. If you're using SELinux, you'll also have to use the SELinux Management Tool to allow access to appropriate directories, and reboot your system to activate the changes. While inelegant, the following command "flushes," or turns off, the standard Linux firewall from the local computer.
    # iptables -F
  7. Now you can activate the FTP server, vsFTP. The following commands assume that it's already running (which you can check using 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/inst; therefore, the correct directory is /pub/inst.


biOos

No comments: