Updated 1 January 2020
© 2020 Logiqwest, Inc. All rights reserved.
Linux Logo

Building an OS Image HTTP Server

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

Prequisit:
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.

ApacheGUI.png

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

# wget http://linux.mirrors.es.net/centos/5.9/isos/x86_64/CentOS-5.9-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.9_x86_64_Final.iso /mnt
[root@kickstart ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       18G   16G  824M  96% /
/dev/sda1              99M   20M   75M  21% /boot
tmpfs                 501M     0  501M   0% /dev/shm
/ISO_IMAGES/CentOS_5.9_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.9_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.9_x86_64
Click for more info