RHEL5 configure local yum repository and command details through CD

Source: Internet
Author: User
Tags gpg

Yum Introduction
Yum is called Yellow dog Updater. Modified (Package Manager) is also called "Yellow dog" when we joke"
The main function is to conveniently Add/delete/update RPM packages. yum can check the dependency between software packages installed in linux and automatically install all dependent software packages, it facilitates management of a large number of system updates,
Multiple resource libraries can be set at the same time, and it is very easy to use.

The following describes how to configure a local repository on RHEL5:
1. Use FTP to create the yum installation Source
Server IP Address: 192.168.200.101
[Root @ localhost ~] # Mount/dev/cdrom/media

Configure the yum repository now,
The Yum repository is under the/etc/yum. repod directory (the file name must end with. repo)
[Root @ localhost ~] # Cd/etc/yum. repos. d/
[Root @ localhost yum. repos. d] # ls
Rhel-debuginfo.repo
There is a rhel-debuginfo.repo template file under the/etc/yum. repos. d directory, you can configure the yum repository according to the content in this file.
[Root @ localhost yum. repos. d] # vi rhel-debuginfo.repo
We can follow the content in this section to add the following content:
[Rhel-Server]
Name = Red Hat Enterprise Linux Server
Baseurl = file: // meida/Server
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
[Rhel-Cluster]
Name = Red Hat Enterprise Linux Cluster
Baseurl = file: // meida/Cluster
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Rhel-ClusterStorage]
Name = Red Hat Enterprise Linux ClusterStorage
Baseurl = file: // meida/ClusterStorage
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Rhel-VT]
Name = Red Hat Enterprise Linux VT
Baseurl = file: // meida/VT
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

For the meaning of each row in the yum repository, see "RHEL5 configuring the yum repository through FTP"

Cut corners: ^ v ^ I will not tell you this solution is also for everybody's sake! ^ V ^
1. You can set the value of gpgcheck to 0, and then remove the gpgkey line. If an error is reported, run the following command:
Rpm-import/etc/pki/rpm-gpg/RPM-GPG-KEY-redehat-release

Perform the package installation test below,
[Root @ localhost ~] # Yum-y install dhcpd bind


YUM command introduction:
1 Installation
Install yum install all
Yum install package1 install the specified installation package1
Yum groupinsall group1 installer group group1


2. update and upgrade
Yum update all updates
Yum update package1 update specified package1 package1
Yum check-update check updatable programs
Yum upgrade package1 upgrade specified package1 package1
Yum groupupdate group1 Upgrade Program Group group1


3 search and display
Yum info package1: package1
Yum list displays all installed and installable packages
Yum list package1 displays package1 installation of the specified package
Yum groupinfo group1 displays group1 information of the program group.
Yum search string searches for the installation package based on the keyword string


4. delete a program
Yum remove package1 Delete package1
Yum groupremove group1 Delete group1
Yum deplist package1 check package1 Dependencies


5. Clear Cache
Yum clean packages clear software packages in the cache directory
Yum clean headers clear headers in the cache directory
Yum clean oldheaders clear old headers in the cache directory
Yum clean all = (yum clean packages; yum clean oldheaders) Clear the packages and old headers in the cache directory

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

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.