RHEL5 creates a local yum Source

Source: Internet
Author: User
1 first, copy the Server folder in RHEL to/yum. [Root @ localhost/] # mkdir/yum [root @ localhost/] # mount/dev/cdrom/mnt [root @ localhos

1 first, copy the Server folder in RHEL to/yum.

[Root @ localhost/] # mkdir/yum

[Root @ localhost/] # mount/dev/cdrom/mnt
[Root @ localhost/] # cp-rv/mnt/Server // yum

2. edit the file in/etc/yum. repo. d/as follows:

[Root @ localhost ~] # Cd/etc/yum. repo. d
[Root @ localhost yum. repo. d] # ls
Copy the rhel-debuginfo.repo file named pcserver. repo:
[Root @ localhost yum. repo. d] # cp rhel * pcserver. repo
Use vim to edit the file:
[Root @ localhost yum. repo. d] # vim pcserver. repo

Change the source file to the following:

[Server]

Name = Server

Baseurl = file: // yum/Server

Enabled = 1

Gpgcheck = 0

Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
 

1 is enabled, 0 is disabled
Enabled indicates whether to enable Source
Gpgkey is the verification key.
 
Gpgcheck is used to check the software signature. To check the software signature, set it to 1.

About baseurl
If the yum source is local, use the fille: // local address;
If the yum source is at the remote end, http: // or ftp: // should be used ://.

 
3. Go to the/yum directory and install createrepo:
[Root @ localhost Server] # rpm-ivh createrepo

 
4. Copy the group information of the rpm package under/Server:
[Root @ localhost Server] # cp repodata/comps-rhel5-server-core.xml/root
 
Note: The comps-rhel5-server-core.xml is the rpm package group information, this information cannot be generated by createrepo, so you need to back up the files in the disc.

5. Use the createrepo command to generate the yum repository dependency:

[Root @ localhost Server] # createrepo-g/root/comps-rhel5-server-core.xml/yum/Server

6. Clear the yum information saved by the current system:
[Root @ localhost yum. repo. d] # yum clean all

7. Refresh the yum source list:
[Root @ localhost yum. repo. d] # yum list all

8. Conduct the test

[Root @ localhost yum. repo. d] # yum install ntp

After performing the above eight steps, the local yum source is basically set up. Hope to help you.

For more YUM tutorials, see the following content::

RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm

Configure epel yum source http://www.linuxidc.com/Linux/2012-10/71850.htm

Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm

Yum profile description http://www.linuxidc.com/Linux/2013-04/83298.htm

Install yum http://www.linuxidc.com/Linux/2013-06/86535.htm in RedHat 6.1

YUM installation and cleaning http://www.linuxidc.com/Linux/2013-07/87163.htm

Build yum local ground source http://www.linuxidc.com/Linux/2014-07/104533.htm on CentOS 6.4

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-12/126052.htm

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.