28 December 2010

HTTP Installation Server - RHCE

The most popular Web server on the Internet is Apache, which you can easily install with Red Hat Enterprise Linux. The basic steps are the same as those for the NFS server. The details are slightly different. I'm assuming that you've already installed the Apache Web server. The basic Apache share directory corresponds to the DocumentRoot variable, which is by default the /var/www/html directory. 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. Using the following command, create the /var/www/html/inst directory. (If you get an error message, Apache may not be properly installed.)
    # mkdir /var/www/html/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/www/html/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 Apache server. If you're using SELinux, you'll also have to use the SELinux Management Tool to allow access to appropriate directories-use chcon to change the security context of the target subdirectory 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 Apache service, httpd. The following commands assume that it's already running (which you can check using the service httpd status command):
    # service httpd stop
    # service httpd start
When you install Red Hat Enterprise Linux from an Apache HTTP server, you'll need to remember the directory with the Red Hat installation files. For an HTTP server, the right directory is relative to the DocumentRoot variable, /var/www/html. With these steps, the installation files are in /var/www/html/inst; therefore, the correct directory is /inst.



biOos

No comments: