16.4. Setting Up an FTP-Based Fedora Installation Server

You want your own local Fedora installation server so you can plug-in and provision new systems with a minimum of fuss, and you prefer running an anonymous FTP server.

First, download the Fedora DVD ISO. Visit Fedoraproject.org (http://fedoraproject.org/get-fedora.html) to find a download site. If you use BitTorrent, it will verify file integrity for you; otherwise, be sure to compare the checksum manually when the download is finished:

	$ sha1sum F-7-i386-DVD.iso
	96b13dbbc9f3bc569ddad9745f64b9cdb43ea9ae  F-7-i386-DVD.iso

The correct checksum is posted in the same download directory as the ISO.

You may write the ISO to a DVD as a backup, but you won't need the DVD to operate your installation server, just the ISO.

Install vsftpd, the Very Secure FTP server, to power your nice installation server. On Debian, install it with this command:

	# aptitude install vsftpd

On Fedora:

	# yum install vsftpd# chkconfig vsftpd on

Debian uses /etc/vsftpd.conf and Fedora uses /etc/vsftpd/vsftpd.conf. This configuration allows simple anonymous read-only access. Users may download files, but not upload:

	##vsftpd.conf
	listen=YES
	anonymous_enable=YES
	ftpd_banner=Welcome to your friendly Fedora installation server
	#Debian users default directory
	anon_root=/home/ftp/fedora
	#Fedora users default directory
	anon_root=/var/ftp/fedora

Debian users must create a directory to store their Fedora installation tree:

	# mkdir /home/ftp/fedora

Fedora users do this:

	# mkdir /var/ftp/fedora

You can store your Fedora ISO anywhere on this server, but you need to mount it in the anon_root directory. That is the default directory that users see when they connect to the server. Use the loopback device to mount it in this directory:

	# mount -o loop F-7-i386-DVD.iso /var/ftp/fedora

You should see files in here, instead of a single giant ISO file:

	$ ls /var/ftp/fedora
	Fedora      isolinux         RPM-GPG-KEY  RPM-GPG-KEY-fedora-test
	fedora.css  README-BURNING-ISOS-en_US.txt RPM-GPG-KEY-beta    RPM-GPG-KEY-rawhide
	GPL         RELEASE-NOTES-en_US.html      RPM-GPG-KEY-fedora  stylesheet-images
	images      repodata                      RPM-GPG-KEY-fedora-rawhide  TRANS.TBL

Next, restart the server, which is the same command on both Debian and Fedora:

	# /etc/init.d/vsftpd restart

Connect to the server with your favorite FTP client, and you're in business.

Now, you can use the installation boot media we created in the previous recipes and install new systems from your own local Fedora installation server.

You can test your server with telnet:

	$ telnet stinkpad 21 
	Trying 192.168.2.74...
	Connected to stinkpad.alrac.net.
	Escape character is '^]'.
	220 Welcome to your friendly Fedora installation server
listen=YES

Run vsftpd in daemon mode.

anonymous_enable=YES

Allow anonymous logins.ftp and anonymous are recognised as anonymous logins.

ftpd_banner=

Your message here.

anon_root=

The default FTP data directory that will be displayed when users log in. This can go anywhere you want.

This is a quick way to make a single copy of Fedora Linux available to your network, which should be a lot faster than an installation over the Internet, and kinder to the official download mirrors.

Your clients should run yum update immediately after installation to bring their systems up-to-date.