4.2 Setting up Kickstart Trees

To set up the Kickstart tree for a distribution on the Spacewalk server:

  1. If the root for all Kickstart trees (typically, /var/distro-trees) does not already exist, create this directory and, if required, set its SELinux file type as httpd_sys_content_t so that httpd and tomcat6 can make the files available:

    1. Create the root directory for the Kickstart tree, for example:

      # mkdir -p /var/distro-trees/ol6-x86_64-server
    2. If SELinux is enabled in enforcing mode on your system:

      1. Use the semanage command to define the default file type of the Kickstart tree as httpd_sys_content_t:

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

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

        # /sbin/restorecon -R -v /var/distro-trees

        Note

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

  2. Download the full Oracle Linux Media Pack DVD image for the Oracle Linux release and system architecture from the Oracle Software Delivery Cloud at http://edelivery.oracle.com/linux and mount it on a suitable mount point, for example:

    # mount -o loop /var/ISOs/DVDimage.iso /var/distro-trees/olNun-arch-server 

    The following table lists some of the full Oracle Linux Media Pack DVD image files that are available for Oracle Linux releases:

    Release

    Architecture

    DVD Image File

    Oracle Linux 5 Update 11

    x86 (32-bit)

    V47134-01.iso

    Oracle Linux 5 Update 11

    x86_64 (64-bit)

    V47133-01.iso

    Oracle Linux 6 Update 6

    x86 (32-bit)

    V52221-01.iso

    Oracle Linux 6 Update 6

    x86_64 (64-bit)

    V52218-01.iso

    Oracle Linux 7 Update 1

    x86_64 (64-bit)

    V74844-01.iso

  3. Create an entry in /etc/fstab so that the system always mounts the DVD image after a reboot, for example:

    /var/ISOs/V74844-01.iso  /var/OSimage/OL7u1-x86_64-server  iso9660  loop,ro  0 0

  4. If SELinux is enabled in enforcing mode on your system:

    1. Set the public_content_t file type on the /var/distro-trees directory hierarchy.

      # /usr/sbin/semanage fcontext -a -t public_content_t "/var/distro-trees/.*"

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

      # /sbin/restorecon -R -v /var/distro-trees

      Note

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

  5. If you want to associate a Kickstart tree with a software channel or to be able to boot iPXE clients, create a symbolic link from /var/www/html to /var/distro-trees.

    # ln -s /var/distro-trees /var/www/html/distro-trees

    The installation images will then be available at a URL such as https://swksvr_FQDN/distro-trees/olNun-arch-server/images, where swksvr_FQDN is the FQDN of the Spacewalk server or proxy.

    Using a browser, you should be able to see the contents of the mounted installation image listed at the URL. If you cannot see the files:

    1. Edit /etc/httpd/conf/httpd.conf and enable support for directory indexing and symbolic links by specifying Options Indexes FollowSymLinks in the <Directory "/var/www/html"> section.

    2. Reload the httpd service.

      # service httpd reload