Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Oracle Linux Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Oracle Linux Cookbook

Oracle Linux Cookbook

By : Erik Benner, Erik B. Thomsen, Jonathan Spindel
5 (4)
close
close
Oracle Linux Cookbook

Oracle Linux Cookbook

5 (4)
By: Erik Benner, Erik B. Thomsen, Jonathan Spindel

Overview of this book

Discover the power of Oracle Linux 8, the free and enterprise-grade Linux distribution designed for use in any environment, with this recipe-style book. Starting with instructions on how to obtain Oracle Linux for both X86 and ARM-based platforms, this book walks you through various installation methods, from running it as a Windows service to installing it on a Raspberry Pi. It unravels advanced topics such as system upgrades using Leapp for major version transitions and using a PXE server and kickstart files for more advanced installations. The book then delves into swapping kernels to take advantage of Oracle’s UEK, exploring boot options, managing software with DNF, and achieving high availability. Detailed recipes involving security topics will assist with tasks such as data encryption, both at rest and in motion. For developers, it offers guidance on building RPM files, using Docker and Podman in a containerized environment, working with AppStreams, and more. For large-scale deployments, the book introduces Oracle Linux Automation Manager for enterprise-level Ansible utilization, from setting up the Ansible server to basic playbook writing. Finally, you’ll discover strategies for cloud migration. By the end of this book, you’ll possess a comprehensive toolkit that will elevate your skills as a Linux administrator.
Table of Contents (16 chapters)
close
close

Setting up the web server – HTTPD

The next step for the PXE server is to install a web server. In this example, we will use Apache. Other web servers will also work, but Apache is one of the most common.

Getting ready

To set up an HTTP server, you will need an Oracle Linux 8 VM running in your environment. The server’s IP address should be routable to the subnets the VMs are using, and the firewall ports should allow HTTP/HTTPS traffic. Ideally, you should also have enough space for several ISO files. Normally, 20-30 GB is enough data space.

How to do it…

Starting the install of the Apache HTTPD server is simple; just run yum install -y httpd.

Once the web server is installed, copy the full ISO file to the server into a directory of your choice. In our example, OracleLinux-R8-U5-x86_64-dvd.iso is copied into /root, as seen in Figure 2.9.

Figure 2.9 – Oracle Linux ISO in /root

Figure 2.9 – Oracle Linux ISO in /root

The next step is to mount the ISO file in a directory under docroot. With the standard install of Apache, docroot is in /var/www/html, so a directory named OL8 is created. When the ISO is mounted, it is more efficient to use a loopback mount method. This allows an ISO file to be mounted as a normal filesystem. Next, using a loopback mount, mount the ISO file using /var/www/html/OL8 as the mount point using the following command:

mount -o ro,loop /root/OracleLinux-R8-U5-x86_64-dvd.iso /var/www/html/OL8

Once mounted, a df command will show the mounted filesystem. The entire chain of commands can be seen in the following screenshot, Figure 2.10.

Figure 2.10 – ISO mounted

Figure 2.10 – ISO mounted

Now that the filesystem is mounted, let’s open up ports 80 and 443 in the firewall. This is easily done with firewall-cmd, adding both the http and https ports opened and saved as permanent changes to the firewall. Once the ports are opened, the firewall rules are reloaded. The following three commands are run to perform these tasks:

firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload

Now that the firewall is opened, Apache is installed, and the ISO is mounted via a loopback, we can start the Apache server with the systemctl start httpd command.

You can verify that all is working as expected by pointing your browser to the server’s IP address and the OL8 directory, as seen in the following screenshot. This will show the contents of the ISO, including the release notes and the RPMs under the BaseOS directory, as seen in Figure 2.11.

Figure 2.11 – ISO file accessible via httpd

Figure 2.11 – ISO file accessible via httpd

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY