Book Image

Oracle Linux Cookbook

By : Erik Benner, Erik B. Thomsen, Jonathan Spindel
Book Image

Oracle Linux Cookbook

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)

Installing with and without Automation Magic

While you can manually install Oracle Linux from a USB or an ISO image, at an enterprise level, it is more common to automate the installation. The Appendix – kickstart options at the end of this chapter covers the manual installation, which is easier to do when you have occasional installs.

Most data center installs use an automated method, as this allows you to scale quickly.

This chapter provides different recipes to help build an operational Preboot Execution (PXE; pronounced pixie) system.

PXE booting is a technology developed by Intel. It allows systems with the appropriate ISO (or OS RPMs) to boot from the network, downloading all the required files from a server. While there are older methods, such as the bootstrap protocol (BOOTP), the industry has rapidly adopted PXE boot as the most common standard. While PXE booting started with Intel systems, ARM systems can also boot using TFTP. For the PXE boot process to work, you would normally have a DHCP server and a PXE server on the network. A high-level summary of the process can be seen in the following diagram:

Figure 2.1 – PXE boot process

Figure 2.1 – PXE boot process

The following are each of the steps described at a high level:

  1. The PXE client will request an IP address from an available DHCP server.
  2. The first DHCP server on the network to respond to the client will provide it with an IP address, network mask, DNS information, default route, and other required network parameters.
  3. The PXE client will do a boot service discovery, looking for a PXE server. Optionally, the DHCP server can be configured to point to the PXE server to boot from.
  4. The PXE server sends the client the network bootstrap program and IP information on where to download the files. This enables the client to boot from the network to install an OS.
  5. The PXE client requests media (RPMs and control files) as needed from an HTTPS server. HTTPS is not the only protocol required; NFS and FTP servers can also be used, although HTTPS is the most common method. The PXE system also sends the kickstart parameters to the client via the kickstart file. These parameters contain the specifics to configure the system’s storage, network, and packages to be installed.
  6. The media server sends the files requested to the PXE client, allowing an OS to be installed.

When configuring the PXE server in this example, there are three components required:

  • DHCP server: This assigns not only IP addresses to servers as they boot but also important parameters that enable PXE boot.
  • Trivial File Transfer Protocol Daemon (TFTPD): This service works as a TFTP server, allowing the bootloader to run on the client, starting the OS installation.
  • HyperText Transfer Protocol Daemon (HTTPD): This is a web server and is used to host config files and RPMs used for the installation.

Note

There are some other options, such as using dnsmasq as a combined server that works as a DHCP server, a TFTP server (most commonly TFTPD), and a DNS forwarder. However, in many enterprise environments, separate systems are needed. As an example, a Microsoft DHCP server may already be used on the network.

In this example, there are two logical servers running three different services, a DHCP server, a TFTP server on the first system. The second system is the PXE server and will also be the HTTP server used to serve up the Red Hat Package Manager (RPM) files and control files required for the installation. Both systems are multihomed and will be running DHCP and PXE on their secondary interface. The systems also have static IP addresses on the secondary interfaces.

We will cover the following main recipes, which make up the PXE feast, in this chapter:

  • Automating the OS install options with kickstart
  • DHCP server – more than just IPs
  • Setting up a web server – HTTPD
  • Serving up the boot – TFTPD
  • Back in the day – a manual installation

Note

A multihomed server is a system that is connected to multiple networks at the same time. This is often done in enterprise data centers to isolate systems, while at the same time allowing a controlled system that allows some data to pass. It is possible to set up a PXE server on a single network.