Mastering Linux System Administration. Richard Blum

Читать онлайн книгу.

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.

       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?

      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

      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:

      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.

      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:

      There will be


Скачать книгу