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)

Creating a new RPM package

While Oracle provides a large number of RPMs, sometimes you just need to create a custom RPM package that allows you to easily deploy your own software. Creating an RPM file is easy to do!

Getting ready

To do this, you will need a development system, running Oracle Linux 8, with access to the Extra Packages for Enterprise Linux (EPEL) channel. It is highly recommended to have a dedicated system to build RPMs on, and to not build RPMs on production systems. You will also need a system to test installing the RPM on.

Note

Depending on the package being built, you may need additional channels, such as CodeReady or Distro Builder.

There are a few things we need to do first – mainly, installing the RPM developer tools. In order to do this, we also need to add the EPEL repo to the system.

While most of the recipes in this book use the root user for most of the work, this recipe will only use root for the installation of the software. Perform...