Redhat Configuring the local Yum source

Source: Internet
Author: User

redhat5.5

1. Mount the optical drive


[[Email protected] ~] #mkdir-P/mnt/cdrom

[[Email protected] ~] #mount-T Iso9660/dev/cdrom-sr0/mnt/cdrom


2. Copy the Redhat CD contents to the local hard drive

Because the directory where the Yum source is created, it must be a directory that can be written to, so all the files on the disc need to be copied to the local directory, and if the/mnt/cdrom CD-ROM mount directory is executed to create the Yum source, it will be reported "Directory/mnt/cdrom must be writable." Error


[[Email protected] ~] #mkdir-P/mnt/redhat

[Email protected] ~]# \cp-r/mnt/cdrom//mnt/redhat/

[Email protected] ~]# Cd/mnt/redhat


3. Install Createrepo Package


[Email protected] server]# cd/mnt/redhat/server/

[Email protected] server]# ls-l |grep Createrepo

-r--r--r--1 root root 60901 Apr createrepo-0.4.11-3.el5.noarch.rpm

[Email protected] server]# RPM-IVH createrepo-0.4.11-3.el5.noarch.rpm


4. Create the Server.repo file in the/ETC/YUM.REPOS.D directory


[Email protected] server]# cd/etc/yum.repos.d/

[Email protected] yum.repos.d]# pwd

/etc/yum.repos.d

[Email protected] yum.repos.d]# VI Server.repo


[Server]

Name=server

Baseurl=file:///mnt/redhat/server

Enabled=1

Gpgcheck=0


[Cluster]

Name=cluster

Baseurl=file:///mnt/redhat/cluster

Enabled=1

Gpgcheck=0


[Clusterstorage]

Name=clusterstorage

Baseurl=file:///mnt/redhat/clusterstorage

Enabled=1

Gpgcheck=0


[VT]

Name=vt

Baseurl=file:///mnt/redhat/vt

Enabled=1

Gpgcheck=0


5. Create a yum library with Createrepo

[Email protected] yum.repos.d]# cd/mnt/redhat/server/

[Email protected] server]# Createrepo/mnt/redhat

3389/3389-clusterstorage/gfs-utils-0.1.20-10.el5.x86_64.rpm pm_64.rpm

Saving Primary Metadata

Saving file lists Metadata

Saving other metadata


This article is from the "cold" blog, so be sure to keep this source http://jiahan.blog.51cto.com/9717419/1725187

Redhat Configuring the local Yum source

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.