Use the system installation disk as the local source of yum

Source: Internet
Author: User
Article Title: Use the system installation disk as the local source of yum. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

  Method 1:

1. copy the content of all the CDs to/server/rhel5/i386/on Server 1, share the NFS file with this directory, and rename repodata under server to repodata. ins.

2. # createrepo-g/misc/cd/Server/repodata. ins/comps-rhel5-server-core.xml-v/server/rhel5/i386/Server/

3. # ls-al/server/rhel5/i386/Server/repodata/

-Rw-r -- 1 root 928710 May 2 comps-rhel5-server-core.xml

-Rw-r -- 1 root 2282389 May 2 filelists.xml.gz

-Rw-r -- 1 root 5570297 May 2 other.xml.gz

-Rw-r -- 1 root 747025 May 2 primary.xml.gz

-Rw-r -- 1 root 1158 May 2 repomd. xml

4. mount the shared directory to the local machine on the server 2 of another machine (you can also use http), and then set rhel5.repo

[Rhel5]

Name = Red Hat Enterprise Linux $ releasever-$ basearch

Baseurl = file: // server/rhel5/i386/Server

Enabled = 1

Gpgcheck = 0

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

5. # yum clean all

# Yum grouplist

# Yum search bind

The key lies in the-g parameter of createrepo. It is necessary to read the group information from a ready-made file and then generate it to your repodata directory.

  Method 2:

Use http as the repository release

Write in rhel5.repo

Server

[Server]

Name = Red Hat Enterprise Linux $ releasever-$ basearch-Debug

Baseurl = http: // 192.168.1.101/server (localhost)

Enabled = 1

192.168.1.101 is the IP address of the Local Machine. If other machines are used, 192.168.1.101 must be used.

I used five CDs for the installation of the cd,

[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.