YUM repository Service Notes: Configure YUM

Source: Internet
Author: User

Rpm package management command: YUM

With the help of YUM software warehouse, you can install, uninstall, and automatically upgrade the rpm software package to automatically find and resolve the dependency between rpm packages, without the need for administrators to install each rpm package one by one and manually, the administrator can easily manage linux servers. Especially in a local network with a large number of linux Hosts, building an source server can greatly ease the internet dependencies such as software installation and upgrade.

To successfully use the YUM mechanism to update systems and software, a software warehouse containing various rpm installation files is required. The server that provides the software library is also called the "Source" server. In the client, you only need to correctly specify the address of the software warehouse and other information, you can install or update the software through the corresponding "Source" server.

The YUM software repository can be used as a local YUM source to provide software source services for local hosts. It can also be released through FTP or HTTP, in this way, software source services can be provided to all clients in the network. To facilitate the client to query software packages and obtain dependency and other information, you must provide the repository database (repodata) in the software repository, which collects the header information of all rpm packages in the directory.

On the RHEL6 system installation disc, you have created repodata for the Software Directory Packages, therefore, as long as you simply copy the content of the entire CD or copy all the content of the CD to the hard disk for publishing through HTTP or FTP, it can be used as a software repository.

Recommended reading:

Configure the epel yum Source

RedHat local yum source configuration

RedHat Linux local yum source configuration

RedHat 6.2 modify yum source in Linux use CentOS source for free

A): Local YUM: (disc source)
The following is the directory structure of the rhel_6.0-i386-DVD:
High Availability software packages, such as rhcs
Common Server software packages, such as mysql, httpd, development tools, and system management tools
Load balancer related software packages, such as lvs and pirihan
ResilientStorage Storage
The directory where Packages truly store all software Packages
The boot and driver image files required by the images rhel installation process,
Files required for isolinux image file boot
To install the required software package using yum, first build the yum disc Source:
First, mount the RHEL6 CD to a directory, such as/mnt
# Mount/dev/cdrom/mnt
Create a file ending with. repo in the/etc/yum. repos. d directory:
# Vi/etc/yum. repos. d/server. repo
The configuration is as follows:
[Server] // repository name
Name = Server // repository description
Baseurl = file: // mnt/Server // URL access path
Enabled = 1 // enable this software Repository
Gpgcheck = 1 // verify the signature of the software package
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release // location of the GPG Public KEY file

[LoadBalancer]
Name = LoadBalancer
Baseurl = file: // mnt/LoadBalancer
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[HighAvailability]
Name = HighAvailability
Baseurl = file: // mnt/HighAvailability
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ResilientStorage]
Name = ResilientStorage
Baseurl = file: // mnt/ResilientStorage
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


Yum command format:
Yum <options> <command> <package...>
Parameter description:
Options: commonly used:
-Y: if the user needs to respond during the work process, this parameter can be directly answered to yes
Command:
List: lists all RPM packages on the yum server. If you run the yum list installed command, only the software packages installed on the system are listed, yum list available indicates to list only available (not installed) software packages in the software repository, and yum list update indicates to list software packages that can be upgraded.
Install: install a suite
Update: update a suite. If the update is not followed by a suite name, update all installed suites on the current host.
Info: list the details of a suite, which is equivalent to rpm-qi package.
Clean: Remove packages or headers that have been downloaded to the Local Machine
Remove: remove a suite that has been installed in the system
Yum update all updates
Yum update package update the specified package
Yum check-update check updatable programs
Yum info <package> displays the installation package information
Yum list displays all installed and installable packages
Yum list <package> displays the installation status of the specified package
Yum search <keyword> searches for software packages. When you need to search for related software packages based on a keyword, you can run the yum search keyword. By default, you can only search for software packages based on their names and descriptions. If you execute the yum search all keyword, you can expand the search scope. For example, the following searches the software repository and lists software packages related to httpd. Yum search allhttpd
Yum clean headers clear header
Yum clean packages clear the downloaded rpm package
Yum clean all clear header and rpm package
Yum grouplist to list all Groups
Yum groupinstall install a software group such as yumgroupinstall Virtualization
Solution:
1. If you reinstall another software package after installing the software package for the first time, you may find an error. The error message is as follows:
Error: Cannot retrieve repository metadata (repomd. xml) for repository:
InstallMedia. Please verify its path and try again
In fact, after reading and modifying the software warehouse for the first time, rhel6 will copy the original root directory of the CD, that is, the media that you copied to the software warehouse directory together. copy the repo to/etc/yum. repos. d/, and the file is also the culprit that causes local yum source failure.
Solution:
Delete media. repo from the software Repository
# Rm-f/share/rhel/media. repo
2. If the software package is installed with public key ....... Rpm isnot install
Solution: import the public key for integrity verification.
# Mount/dev/sr0/mnt
# Rpm -- import/mnt/RPM-GPG-KEY-redhat-release

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.