Add commands to register the host with your RHEL satellite, for example:
rpm -Uvh http://<YOUR_SATELLITE_SERVER_IP>/pub/katello-ca-consumer-latest.noarch.rpm
subscription-manager register --org="<YOUR_ORGANIZATION>" --activationkey="RHEL_Base" --force
subscription-manager repos --enable rhel-7-server-rpms
In the example unattend file, specify the IP address of your satellite server and your organization based on our subscription service configuration.
Add commands to update the host and to install and configure apache and php packages, for example:
%packages
@base
@core
@fonts
@gnome-desktop
@internet-browser
@multimedia
@x11
@print-client
-gnome-initial-setup
#Add the Apache and PHP packages
httpd
mod_ssl
openssl
php
php-mysql
php-gd
%end
yum -y update
systemctl enable httpd.service
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
echo "<?PHP
echo 'Hello World !! ';
?>" | tee /var/www/html/index.php
sudo cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.original
sudo sed -i -e 's/^[ \t]*//' /etc/httpd/conf/httpd.conf
sudo sed -i "s|IncludeOptional|#IncludeOptional|" /etc/httpd/conf/httpd.conf
sudo sed -i "s|#ServerName www.example.com:80|ServerName localhost|" /etc/httpd/conf/httpd.conf
sudo sed -i "s|DirectoryIndex index.html|DirectoryIndex index.html index.php|" /etc/httpd/conf/httpd.conf
echo "AddType application/x-httpd-php .php" | tee -a /etc/httpd/conf/httpd.conf
The example unattend file modifies the default packages that are being installed with the kickstart file. It specifies the Apache and PHO packages as part of the %packages section.
For ESXi and RHEL only, XClarity Administrator provides the #predefined.unattendSettings.networkConfig# macro, which adds all network settings that are defined in the UI to the unattend file, and the #predefined.unattendSettings.storageConfig# macro, which adds all storage settings that are defined in the UI to the unattend file. The example unattend file already contains these macros.
XClarity Administrator also provides some basic convenience macros, such as OOB driver injection, status reporting, post-install scripts, custom software. However, to take advantage of these predefine macros, you must specify the following macros in the custom unattend file. The example file already contains the required macros.
#predefined.unattendSettings.preinstallConfig#
#predefined.unattendSettings.postinstallConfig#
The example file already contains the required macros and additional predefined macros for dynamically specifying network settings for the target server and timezone. For more information about adding macros to unattend files, see Injecting predefined and custom macros to an unattend file.
You can also add commands to send custom messages to the jobs log in XClarity Administrator. For more information, see Adding custom status reporting to installation scripts.
To import the custom installation script, complete these steps. For more information, see Importing custom installation scripts.
To import the custom unattend file, complete these steps.
Click the Unattend Files tab.
Click the Import icon ().
Click Local Import.
Select RHEL for the operating system.
Click Browse to find and select the software file to import (for example, RHEL_installSoftware_customUnattend.cfg).
Click Import to upload the file to the OS-images repository.