Mastering Linux System Administration. Richard Blum
different features (and bugs!) exist in the various kernel versions. To see this information, you'll need to type uname ‐r at the command‐line prompt. You can also view this information via the cat /proc/version command.Finally, look at the version of the Bash Shell running on the system. This is easy to accomplish by using the bash ‐‐version command.
Once you've completed your checks, celebrate! You worked hard to get this CentOS distribution installed correctly.
The Bottom Line
Review needed CentOS hardware resources. Determining the hardware resources required for a CentOS installation on a physical or virtualized server helps to ensure a successful completion of the install. It also avoids important project delays due to under‐resourced systems.Master It Imagine that you need to install the CentOS distribution on a physical server that has a dual‐core 2 GHz CPU, 200 GB hard drive, and 2 GB of RAM. Are the server's resources at the recommended level? Why or why not?
Determine the requirements for a virtual CentOS system. Installing the CentOS distribution as a VM on a host system has different requirements than a direct installation on a physical server. It is critical to evaluate the host system so that the installation is successful.Master It Your project team is planning on installing two CentOS VMs on a host system that has a quad‐core 2.8 GHz CPU, 200 GB of free disk space, and 32 GB of RAM. Are the host system resources sufficient? Why or why not?
Obtain CentOS software. To install the CentOS Linux distribution, you must have the proper ISO image file. This is true whether you are installing it directly on hardware or as a VM. Besides getting the ISO file, you need to ensure that it is not corrupted so that the installation proceeds well.Master It You've downloaded the CentOS ISO image file, but you are concerned that during the download process, file corruption occurred. What should you do to see whether the ISO image file is corrupt?
Conduct an installation of a CentOS distribution. There are several steps to successfully install a CentOS distribution, and it is critical to make sure you complete all of them. Skipping a step can cause problems immediately as well as problems later, if you can even get the system to boot.Master It Your sysadmin team has correctly installed the CentOS software from the ISO image file, and the system booted without any problems. What's the next step?
Audit the CentOS distribution's installation. If you had some problems while booting the system, there are a few commands you can use to look at helpful boot messages. But even a successful installation still requires a few additional checks.Master It At your company, you have completed the entire CentOS distro installation process on a new system without any problems, but you then ran into issues the last time the server was rebooted. You need to review the boot messages to track down the problem(s). What log file can you use to view these messages?
Chapter 5 Installing and Maintaining Software in Red Hat
Installing and maintaining software on Red Hat–based servers is similar to the Ubuntu server process, just with different tools. Just like Ubuntu, Red Hat uses a package management system to make installing and updating software easy, especially if your server is connected to the Internet. However, if your Red Hat server is not connected to the Internet, there's still a way for you to install and upgrade software using packages.
IN THIS CHAPTER, YOU WILL LEARN TO
Recognize Red Hat packages
Use automated Red Hat package managers
Manually install Red Hat packages
Install flatpack application containers
Exploring Red Hat Packages
Red Hat Enterprise Linux, CentOS, and Fedora use the Red Hat Package Manager (RPM) utility to install and manage software. Application files are bundled into an rpm package for distribution. rpm package files have an .rpm
file extension and use a specific naming format as follows:
name-version-release.architecture.rpm
Since software packages are compiled for specific architectures, there are usually multiple rpm packages for each software package. The version is the program's version number, so you can easily track what version of the software is currently installed and what version is available for download. The release is the distribution release identifier. Even though rpm packages can be installed on any Red Hat–based Linux system, sometimes packages are compiled for specific distribution environments. Packages created for CentOS normally have a release of el8
. Here's an example of listing some .rpm
files:
# ls -l *.rpm total 11920 drwxr-xr-x. 2 sysadmin sysadmin 253 Dec 5 10:23 . drwx------. 3 sysadmin sysadmin 74 Dec 5 10:21 .. -rwxr-x---. 1 sysadmin sysadmin 1621792 Dec 5 10:21 bash-4.4.19-10.el8.x86_64.rpm -rwxr-x---. 1 sysadmin sysadmin 5943540 Dec 5 10:21 binutils-2.30-73.el8.x86_64.rpm -rwxr-x---. 1 sysadmin sysadmin 361000 Dec 5 10:21 curl-7.61.1-12.el8.x86_64.rpm -rwxr-x---. 1 sysadmin sysadmin 507956 Dec 5 10:21 openssh-8.0p1-4.el8_1.x86_64.rpm -rwxr-x---. 1 sysadmin sysadmin 713708 Dec 5 10:21 openssl-1.1.1c-15.el8.x86_64.rpm -rwxr-x---. 1 sysadmin sysadmin 3039264 Dec 5 10:21 zsh-5.5.1-6.el8_1.2.x86_64.rpm #
Notice that the architecture for each is x86_64
, indicating that the software packages were compiled for a 64‐bit CPU environment.
There are two ways to install rpm packages.
Using an automated package management tool
Manually using the rpm command‐line tool
Using an automated package management tool is usually preferred. These tools have the ability to connect via the Internet to a software repository to find the requested package and install it, along with any dependent packages. However, there are times when a Red Hat server doesn't have Internet access, such as in secure environments. In those cases, you'll have to download the software rpm packages on a different platform, transfer them to the server, and then install them manually using the rpm
command‐line tool. The following sections cover both methods of installing RPM software packages.
Automated Package Management
Like the Debian‐based distributions, the Red Hat–based systems have several different front‐end tools available. The common ones are these:
yum : Used in Red Hat, CentOS, and Fedora
dnf : An updated version of yum with some additional features
zypper : Used in openSUSE
These front ends are all based on the rpm
command‐line tool. The following section discusses how to manage software packages using these various rpm
‐based tools. The focus will be on dnf
, but the other packages use similar commands and formats.
Listing Installed Packages
To find out what is currently installed on your system, at the shell prompt use the list
option of the dnf
command, as shown here:
$ dnf list installed Installed Packages NetworkManager.x86_64 1:1.22.8-5.el8_2 @BaseOS NetworkManager-config-server.noarch 1:1.22.8-5.el8_2 @BaseOS NetworkManager-libnm.x86_64 1:1.22.8-5.el8_2 @BaseOS NetworkManager-team.x86_64 1:1.22.8-5.el8_2 @BaseOS NetworkManager-tui.x86_64 1:1.22.8-5.el8_2 @BaseOS PackageKit.x86_64 1.1.12-4.el8 @AppStream PackageKit-glib.x86_64 1.1.12-4.el8 @AppStream abattis-cantarell-fonts.noarch 0.0.25-4.el8 @AppStream acl.x86_64 2.2.53-1.el8 @BaseOS adcli.x86_64 0.8.2-5.el8 @BaseOS at.x86_64 3.1.20-11.el8 @BaseOS attr.x86_64 2.4.48-3.el8 @BaseOS audit.x86_64 3.0-0.17.20191104git1c2f876.el8 @BaseOS audit-libs.x86_64 3.0-0.17.20191104git1c2f876.el8 @BaseOS … $
There will be