3. Building an OS Image HTTP Server

From $1

The OS HTTP server is requires to deliver the OS install images using http protocol. 

Edit section

  1. You must have a function httpd web server
  2. Have an OS image ISO file or DVD attached to the server

Enable the web server by using the GUI's (system-config-httpd) or by using the services to start the httpd service.


You can use wget to obtain the latest OS ISO from http://www.centos.org  Example:

# wget http://linux.mirrors.es.net/centos/5.8/isos/x86_64/CentOS-5.8-x86_64-bin-DVD-1of2.iso

You can then mount the image by using the mount command with the loop option under the /mnt directory. Assuming you have the iso image in a directory /ISO_IMAGES called CentOS_5.8_x86_64_Final.iso.

[root@kickstart ~]# mount -o loop /ISO_IMAGES/CentOS_5.8_x86_64_Final.iso /mnt
[root@kickstart ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
                       18G   16G  824M  96% /
/dev/sda1              99M   20M   75M  21% /boot
tmpfs                 501M     0  501M   0% /dev/shm
/ISO_IMAGES/CentOS_5.8_x86_64_Final.iso                       4.3G  4.3G     0 100% /mnt
[root@kickstart ~]# 

Create a OS_IMAGES directory
Edit section

Create a OS_IMAGES OS Name directory in the public htdocs directory of tha web server (e.g. /var/www/html)

[root@kickstart ~]# mkdir /var/www/html/OS_IMAGES/CentOS_5.8_x86_64_Final

Copy OS Image Contents
Edit section

Copy the OS image contents to the OS_IMAGES directory

[root@kickstart ~]# cp -av /mnt/. /var/www/html/OS_IMAGES/CentOS_5.8_x86_64