Hello everyone, I am Cola, a dedicated original, willing to share the program ape. This series of tutorials will continue to be updated, you can search “IT Cola” on wechat to read the first time. Ebooks has a huge selection of free books that I’ve selected for you

Previously, we introduced the common commands of The Linux system and the vim command of the text editor. So from this blog, we will formally explain the Linux system administration, the first is to talk about Linux package management.

1. Linux software package classification

A source code package

The source code package can be viewed directly. You need to manually set the installation location during installation, such as /usr/local/softwarename_/. Source package upgrade version – script installation package, artificial changes to the source code so that it has an installation interface.

Advantages:

(1) Open source, if you have enough ability, you can directly modify the source code.

(2) You can choose the required functions freely during installation.

The software is compiled and installed, so it is more suitable for your system, more stable and more efficient.

(4) Easy to uninstall, directly delete the directory where you install the software.

Disadvantages:

(1) There are many installation steps, especially when installing large software sets, spelling mistakes are easy to occur.

The compilation time is too long, which is longer than the binary installation time.

(3) Because it is compiled and installed, it is difficult for novices to solve the problem once an error is reported in the installation process.

Binary package

The binary package must include the RPM package in centos. The RPM package has a default installation location. /etc/configuration file installation directory; /usr/bin/Executable command installation directory; The directory where the /usr/lib/ function library is saved; /usr/share/doc/Directory for storing basic software manuals; /usr/share/man/Help file save location.

Advantages:

Package management system is simple, only through a few commands can realize package installation, upgrade, query and uninstall.

The installation speed is much faster than the source code package.

Disadvantages: CentOS – 6.8 – x86_64 – bin – DVD1. Iso

①, has been compiled, can not see the source code.

②, the function selection is not as flexible as the source code package.

(3) There are many dependent packages in the installation process, and the dependency is not easy to solve.

2. Naming rules of RPM packages

We open the previous Linux installation file centos-6.8-x86_64-bin-dvd1.iso. RPM installation files are all in the package directory.The httpD-2.2.15-53.el6.centos.x86_64. RPM file is used as an example to describe the naming rules of RPM packages.

HTTPD: package name

2.2.15: Software version

③, 15: number of software releases

④ el6.centos: suitable for Linux platform

⑤, x86_64: suitable hardware platform, indicating 64-bit.

6, RPM: RPM package extension, note that Linux does not have the concept of an extension, here to tell the administrator that this is an RPM package file.

3. Install the RPM package

RPM httpd-2.2.15-53.el6.centos.x86_64. RPM

Go to the mount directory/MNT /cdrom/Packages of the RPM file and run the RPM -ivh httpd-2.2.15-53.el6.centos.x86_64. RPM command

Note: This installation method may require the installation of various dependencies first, which can be quite tedious.

4. Upgrade the RPM package

5. Uninstall the RPM package

6. Check whether the RPM package is installed

7. Query details about the software package

8. Query the installation location of the software package

9. Query the RPM package to which the system file belongs

10. Query software package dependencies

11,

This blog focuses on the RPM package. This section describes the naming rules, installation, upgrade, and uninstallation of RPM packages, and how to query information about RPM packages. If you use the RPM command to manually install a certain package, you will find that the dependencies encountered in the installation make you miserable. When installing an RPM, you will need to install a certain dependent RPM package first, and it may be necessary to install the dependent RPM package first. In practice, we certainly wouldn’t install packages manually using the RPM command, so is there an easier way? The answer is yes, in the next blog we will cover RPM package management – YUM online management.

This series of tutorials will continue to be updated, you can search “IT Cola” on wechat to read the first time. Reply ebook has a selection of books that I have selected for you