1.4 Configuring a Network Installation Server

1.4.1 Setting up a New NFS Server
1.4.2 Configuring an Existing NFS Server
1.4.3 Setting up a New HTTP Server
1.4.4 Configuring an Existing HTTP Server
1.4.5 Setting up a Network Installation Server

If you use a Boot ISO to install systems, you can set up a network installation server to host the RPM packages. This server must have sufficient storage space to host the full Oracle Linux Release 6 installation DVD image (approximately 3.5 GB), and you must configure it to use either HTTP or NFS to serve the image files to the target systems on which you want to install Oracle Linux 6.

Perform one of the procedures in the following sections to set up an HTTP or NFS server on the system that will act as the network installation server:

You can then set up the network installation server. See Section 1.4.5, “Setting up a Network Installation Server”.

1.4.1 Setting up a New NFS Server

Note

This procedure assumes that you are setting up an Oracle Linux 6 system as an NFSv4 server. Using NFSv4 greatly simplifies firewall configuration as you need only configure a single rule for TCP port 2049.

To set up an NFS server:

  1. Install the nfs-utils package.

    # yum install nfs-utils
  2. Create the directory where you will copy the full Oracle Linux Release 6 Media Pack DVD image, for example /var/OSimage/OL6.5:

    # mkdir -p /var/OSimage/OL6.5
  3. Edit the configuration file, /etc/exports, as follows.

    1. Add an entry for the directory where you will copy the DVD image.

      The following example allows read-only access to the directory /var/OSimage/OL6.5 for any NFS client on the 192.168.1 subnet:

      /var/OSimage/OL6.5 192.168.1.0/24(ro)
    2. Save your changes to the file.

  4. Start the NFS server, and configure it to start after a reboot.

    # service rpcbind start
    # service nfs start
    # service nfslock start
    # chkconfig rpcbind on
    # chkconfig nfs on
    # chkconfig nfslock on
  5. If you have configured a firewall on your system, configure it to allow incoming NFSv4 requests from NFS clients.

    For example, use the following commands to configure iptables to allow NFSv4 connections and save the change to the firewall configuration:

    # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
    # service iptables save

1.4.2 Configuring an Existing NFS Server

To configure an existing NFS server:

  1. Create the directory where you will copy the full Oracle Linux Release 6 Media Pack DVD image, for example /var/OSimage/OL6.5:

    # mkdir -p /var/OSimage/OL6.5
  2. Use the exportfs command to export the directory.

    # exportfs -i -o options client:export_dir

    For example, to allow read-only access to the directory /var/OSimage/OL6.5 for any NFS client on the 192.168.1 subnet:

    # exportfs -i -o ro 192.168.1.0/24:/var/OSimage/OL6.5

1.4.3 Setting up a New HTTP Server

Note

These instructions assume that you are setting up an Oracle Linux 6 system as an Apache HTTP server.

To set up an HTTP server:

  1. Install the Apache HTTP server package.

    # yum install httpd
  2. Create the directory where you will copy the full Oracle Linux Release 6 Media Pack DVD image, for example /var/www/html/OSimage/OL6.5:

    # mkdir -p /var/www/html/OSimage/OL6.5
    Note

    If SELinux is enabled in enforcing mode on your system, create the directory under the /var/www/html directory hierarchy so that the httpd_sys_content_t file type is set automatically on all the files in the repository.

  3. Edit the HTTP server configuration file, /etc/httpd/conf/httpd.conf, as follows:

    1. Specify the resolvable domain name of the server in the argument to ServerName.

      ServerName server_addr:80

      If the server does not have a resolvable domain name, enter its IP address instead. For example, the following entry would be appropriate for an HTTP server with the IP address 192.168.1.100.

      ServerName 192.168.1.100:80
    2. If the directory to which you will copy the DVD image in not under /var/www/html, change the default setting of DocumentRoot.

      In this example, the DVD image will be copied to /var/www/html/OSimage/OL6.5 so the setting of DocumentRoot can remain unchanged.

      DocumentRoot "/var/www/html"
    3. Verify that the <Directory> setting points to the same setting as DocumentRoot.

      #
      # This should be changed to whatever you set DocumentRoot to.
      #
      <Directory "/var/www/html">
    4. If you want to be able to browse the directory hierarchy, verify that the Options directive specifies the Indexes option, for example:

      Options Indexes FollowSymLinks
      Note

      The Indexes option is not required for installation.

    5. Save your changes to the file.

  4. Start the Apache HTTP server, and configure it to start after a reboot.

    # service httpd start
    # chkconfig httpd on
  5. If you have enabled a firewall on your system, configure it to allow incoming HTTP connection requests on TCP port 80.

    For example, the following command configures iptables to allow incoming HTTP connection requests and saves the change to the firewall configuration:

    # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
    # service iptables save

1.4.4 Configuring an Existing HTTP Server

Note

This procedure assumes that the system is already configured as an Apache HTTP server. For other types of HTTP server, you will need to modify the steps for the server's configuration.

To configure an existing Apache HTTP server:

  1. Under the DocumentRoot hierarchy that is defined in the HTTP server configuration file (/etc/httpd/conf/httpd.conf), create the directory where you will copy the full Oracle Linux Release 6 Media Pack DVD image, for example /var/www/html/OSimage/OL6.5:

    # mkdir -p /var/www/html/OSimage/OL6.5
  2. Edit the HTTP server configuration file, /etc/httpd/conf/httpd.conf, and add a <Directory> section, for example:

    <Directory "/var/www/html/OSimage/OL6.5">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Place this section after the closing </Directory> statement for the <Directory DocumentRoot> section.

    Note

    The Indexes option is not required for installation. Specify this option if you want to be able to browse the directory hierarchy.

1.4.5 Setting up a Network Installation Server

Note

This procedure assumes that you have set up the system as an NFS or HTTP server.

To set up a network installation server:

  1. Download the full Oracle Linux Media Pack DVD image (for example, V41362-01.iso for x86_64 (64 bit) Oracle Linux Release 6 Update 5 from the Oracle Software Delivery Cloud at http://edelivery.oracle.com/linux.

  2. Mount the DVD image on a suitable mount point (for example, /mnt):

    # mount -t iso9660 -o loop V41362-01.iso mount_dir
  3. Use the following command to extract the contents of the DVD image into a directory (output_dir) whose contents are shareable using NFS or HTTP:

    # cp -a -T mount_dir output_dir

    For example, to copy the DVD image mounted on /mnt to /var/OSimage/OL6.5:

    # cp -a -T /mnt /var/OSimage/OL6.5

    or to /var/www/html/OSimage/OL6.5:

    # cp -a -T /mnt /var/www/html/OSimage/OL6.5
  4. Unmount the DVD image:

    # umount mount_dir
  5. If SELinux is enabled in enforcing mode on your system and you have configured the system as an HTTP server but you did not copy the DVD image to a directory under /var/www/html:

    1. Use the semanage command to define the default file type of the directory hierarchy as httpd_sys_content_t:

      # /usr/sbin/semanage fcontext -a -t httpd_sys_content_t "/var/OSimage(/.*)?"

    2. Use the restorecon command to apply the file type to the entire directory hierarchy.

      # /sbin/restorecon -R -v /var/OSimage
    Note

    The semanage and restorecon commands are provided by the policycoreutils-python and policycoreutils packages.

To customize a network installation server that allows the installation of a system with a btrfs root file system, you must modify the images directory to support the Unbreakable Enterprise Kernel (UEK) instead of the Red Hat Compatible Kernel as the installation kernel. See Section 2.4.1, “Customizing a Network Installation Server”.