Install and update packages
1. RPM Package and Yum
Red Hat has developed the RPM Package Manager, which provides a standard way to package software for distribution. Red Hat is available in the form of RPM packages for Linux and all software provided.
Name: Name-version-release.architecture
Example: httpd-tools-2.4.6-7.e17.x86_64.rpm
Httpd-tools Name Description names content
Version number of the original software for 2.4.6 version
7.E17 release releases based on this version of the package
X86_64 Arch is a compiled package that can run under this processor architecture
Yum Package Manager
Linux can install, update, delete, and query rpm packages via the rpm command, but he cannot automatically parse dependencies, yum commands to search for packages and other dependencies in multiple repositories so that they can be installed together to mitigate dependency issues.
The main configuration file for Yum is/etc/yum.conf, and the other storage configuration files are located in the/ETC/YUM.REPOS.D directory.
The repository configuration file contains at least one repository ID (in square brackets), a name, and the URL location of the package repository. URL location can point to a local directory (file) or remote network share (HTTP and FTP, etc.)
Yum lists repositories
Yum Repolist
Yum Lists Packages
Yum List
Yum Lists package groups
Yum Grouplist
2. Manage software updates with Yum
Yum is a powerful command-line tool that can be used for more flexibility in managing packages.
Show installed and available packages example: Yum list ' http '
Search package based on keyword Yum Search all ' Web server '
Provides detailed information about the package Yum Info httpd
Displays the package that matches the specified path yum provides/var/www/html
Install packages (including dependencies) yum install httpd
Get and install the updated version of the package Yum Update httpd (Install all updates if not specified)
Remove installed packages Yum Remove httpd
3. Install and delete each group of software using Yum
Yum has a set of concepts, that is, a collection of related software that is installed together for a specific purpose.
In Red Hat 7, there are two types of groups: A general group is a package collection, and an environment group is a collection of other groups that contain their own software.
List the names of installed and available groups
Yum grouplist or Yum group list
List hidden groups Yum Group list hidden
Displaying information about a group Yum group info
Install a required and default package for a group and rely on Yum Group install
View transaction History Log
Logging of all installation and deletion transactions in/var/log/yum.log
Show Transaction History Yum Chronicle
4. Enable the Yum software repository
View all available repositories Yum repolist all
Enable and disable the repository via Yum-config-manager, which changes the Enable parameter in the/etc/yum.repo.d/redhat.repo file
Third party Store crying is a directory of package files provided by non-red hat sources and can be accessed by Yum from a network, FTP server, or local file system.
Place the file in the/etc/yum.repos.d/directory to enable support for the new third-party content library. The Content Library configuration file must end with a. Repo. The repository definition contains the URL and name of the repository, and also defines whether the package signature is checked with GPG.
If you know the URL that yum stores, you can create a configuration file from Yum-config-manager
Example:
Yum-config-manager--add-repo= "http://dl.fedorapro.ject.org/pub/epel/beta/7/x86_64/"
Too late to write, continue tomorrow, haha, work
Linux Learning notes----8