Now that we have a kickstart VM, we can start the webserver configuration. Once configured we will be able to add content for remote installations and host installation patterns.
Bootstraping the Installations
First, we must install software to allow us to install software. Yes, that's right, a circular dependency. So we will need to fake it until we finish hosting the packages.
-
Re-mount the ISO/DVD.
mount /dev/sr0 /mnt
-
Make a repository for a ISO/DVD copy.
mkdir -p /var/www/html/x86_64/8/2
-
Take a look at the ISO/DVD contents.
ls /mnt
Some interesting items are listed below with their purpose:
file / dir Purpose BaseOS Server and core RPMS AppStream Application and extra RPMS media.repo repository file for local RPM-GPG-KEY-redhat-release GPG key for Red Hat installs -
Clone the DVD into the webserver file system.
cp -pr /mnt/AppStream /var/www/html/x86_64/8/2/ cp -pr /mnt/BaseOS /var/www/html/x86_64/8/2/
-
Import the Red Hat GPG key.
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
-
Make a local dnf repository configuration.
vi /etc/yum.repos.d/local.repo
Contents:
[BaseOS] name=baseos baseurl=file:///var/www/html/x86_64/8/2/BaseOS enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [AppStream] name=appstream baseurl=file:///var/www/html/x86_64/8/2/AppStream enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Configure HTTPD
- Install the webserver.
dnf install httpd httpd-devel httpd-tools -y
Installed:
apr-1.6.3-9.el8.x86_64 apr-devel-1.6.3-9.el8.x86_64 apr-util-1.6.1-6.el8.x86_64 apr-util-bdb-1.6.1-6.el8.x86_64 apr-util-devel-1.6.1-6.el8.x86_64 apr-util-openssl-1.6.1-6.el8.x86_64 cyrus-sasl-2.1.27-1.el8.x86_64 cyrus-sasl-devel-2.1.27-1.el8.x86_64 expat-devel-2.2.5-3.el8.x86_64 httpd-2.4.37-21.module+el8.2.0+5008+cca404a3.x86_64 httpd-devel-2.4.37-21.module+el8.2.0+5008+cca404a3.x86_64 httpd-filesystem-2.4.37-21.module+el8.2.0+5008+cca404a3.noarch httpd-tools-2.4.37-21.module+el8.2.0+5008+cca404a3.x86_64 libdb-devel-5.3.28-37.el8.x86_64 mod_http2-1.11.3-3.module+el8.2.0+4377+dc421495.x86_64 openldap-devel-2.4.46-11.el8.x86_64 perl-Carp-1.42-396.el8.noarch perl-Errno-1.28-416.el8.x86_64 perl-Exporter-5.72-396.el8.noarch perl-File-Path-2.15-2.el8.noarch perl-IO-1.38-416.el8.x86_64 perl-PathTools-3.74-1.el8.x86_64 perl-Scalar-List-Utils-3:1.49-2.el8.x86_64 perl-Socket-4:2.027-3.el8.x86_64 perl-Text-Tabs+Wrap-2013.0523-395.el8.noarch perl-Unicode-Normalize-1.25-396.el8.x86_64 perl-constant-1.33-396.el8.noarch perl-interpreter-4:5.26.3-416.el8.x86_64 perl-libs-4:5.26.3-416.el8.x86_64 perl-macros-4:5.26.3-416.el8.x86_64 perl-parent-1:0.237-1.el8.noarch perl-threads-1:2.21-2.el8.x86_64 perl-threads-shared-1.58-2.el8.x86_64 redhat-logos-httpd-81.1-1.el8.noarch
- Verify the basic configuration.
egrep "^DocumentRoot|^ServerRoot" /etc/httpd/conf/httpd.conf
Returns:
ServerRoot "/etc/httpd" DocumentRoot "/var/www/html"
- Start HTTPD.
systemctl start httpd.service
- Check the status.
systemctl status httpd.service -l
Returns:
● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2020-07-24 16:15:21 CDT; 42s ago Docs: man:httpd.service(8) Main PID: 27224 (httpd) Status: "Running, listening on: port 80" Tasks: 213 (limit: 10891) Memory: 21.4M CGroup: /system.slice/httpd.service ├─27224 /usr/sbin/httpd -DFOREGROUND ├─27225 /usr/sbin/httpd -DFOREGROUND ├─27226 /usr/sbin/httpd -DFOREGROUND ├─27227 /usr/sbin/httpd -DFOREGROUND └─27228 /usr/sbin/httpd -DFOREGROUND Jul 24 16:15:21 kickstart systemd[1]: Starting The Apache HTTP Server... Jul 24 16:15:21 kickstart httpd[27224]: AH00558: httpd: Could not reliably determine the server's fully > Jul 24 16:15:21 kickstart systemd[1]: Started The Apache HTTP Server. Jul 24 16:15:21 kickstart httpd[27224]: Server configured, listening on: port 80
- Open the firewalld service for 80.
firewall-cmd --zone=public --permanent --add-service=http firewall-cmd --reload
Returns:
success
- Verify from a web browser. http://${VM IP address}/x86_64/8/2/
- In Provision a Kickstart Server with RHEL8 - Part 3, we will define the kickstart pattern for the
rhel8
VM. Before we do that, we will need to define the VM in our virtualization platform.
Define a Virtual Machine for the RHEL8 Install
Using the platform of your choice, construct a VM. This VM must have an optical drive or the ability to mount DVD/ISOs as optical media. The VM must also have a virtual console. Here are the requirements:
Option | Value |
---|---|
bios | bios/uefi |
vcpu | 1 |
vmem | 1024MB |
network | internet capable |
storage | 20GB (*da/disk0) |
disk | any type |
cdrom | RHEL8 Binary DVD or RHEL8 Boot DVD |
Once configured, leave the VM powered off. In the next part of this article, we will build this VM with an automated kickstart.
Conclusion
Now that the web service is installed and the installation is available on the local network, we can start defining the kickstart resources. Continue reading in Provision a Kickstart Server with RHEL8 - Part 3.
Examples in this post can be found on GitHub