Читать книгу Mastering Linux System Administration - Richard Blum - Страница 94

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.

Mastering Linux System Administration

Подняться наверх