Sunday, September 13, 2009

Creating FTP installation server

In my previous post i have described how to setup NFS Installation server. Now, today i am going to describe how to sertup FTP Installation server and then i will show you a step how to install Linux from Network with these two servers.

Ok here basic steps are the same as NFS only. First of all let's assume that you have installed vsFTP server on your Linux Box. Main share directory for FTP is /var/ftp/pub. So, we will copy all installtion files here in the same 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.

No comments:

Post a Comment