Detailed description of the setup and configuration process of the LinuxYUM Server

Source: Internet
Author: User
Yum server sets howtosetupayumrepertoryserverJanuary19th, 2009at7: 33 pmLinux, installs and configures createrepo, Linux, repertory, yum, yum server, yum repository, and the server has to say that RedHat is really evil, if we directly use its own system disk as the YUM source, we will always get

Yum server settings-howSetUp a yum repersponserver
January 19th, 2009 at pm Linux, install and configure createrepo, Linux, repermission, yum, yum server, yum repository, Server
I have to say, REdHat is really evil. If we directly use its own system disk as the YUM source, we will always get information similar to the following:

Media: // 1192656534.547140%/232/Httpd-2.2.3-11. el5.i386. rpm: [Errno 4] IOError:
Trying other mirror.
Error: failed to re TrIeve httpd-2.2.3-11.el5.i386.rpm from rhel
Error was [Errno 4] IOError:
But fortunately, Linux is open-source. We can build a source by using our own RH rpm package.

First, we copy all the files on the CD to the server according to its current structure (assuming the server directory is/yumrepo)

# Mount/dev/CdRom/mnt
#Cp-Ar/mnt/*/yumrepo
Then, we need to install an RPM package before we can start to build a YUM repository.

# Cd/yumrepo/Server
# Rpm-ihv createrepo-0.4.4-2.fc6.noarch.rpm
Warning: createrepo-0.4.4-2.fc6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ######################################## ### [100%]
1: createrepo ####################################### #### [100%]
After this package is installed, a newCommand:/Usr/bin/createrepo, which must be used below.
The most important thing to generate is the basic RPM:

# Cd/yumrepo/Server
# Cp repodata/comps-rhel5-server-core.xml/root
#Rm-Rf repodata
# Createrepo-g/root/comps-rhel5-server-core.xml.
2159/2159-xorg-x11-drv-cyrix-1.1.0-4.i386.rpm
Saving Primary metadata
SavingFileLists metadata
Saving other metadata
The comps-rhel5-server-core.xml file stores the group information, which is not automatically generated by the createrepo command. We need to save the information first.

Then several other directories, Cluster, ClusterStorage, VT are also done once according to the above method, it should be noted that the comps-rhel5-server-core.xml file name will be different, but all begin with comps. Our YUM repository has been built here.

Next, we need to set the content in/etc/yum. repo. d. We will write as follows:

[Server] // The name can be written at will
Name = Red Hat Enterprise Linux Server Core
Baseurl = file: // yumrepo/Server // The example is set up locally only for local use. To publish to the network, installFtpService, written as a ftp://www.linuxso.com/yum/Server
EnableD = 1 // enabled by default
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
Name = Red Hat Enterprise Linux Virtual Technology
Baseurl = file: // yumrepo/VT
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Cluster]
Name = Red Hat Enterprise Linux Cluster
Baseurl = file: // yumrepo/Cluster
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
Name = Red Hat Enterprise Linux Cluster Storage
Baseurl = file: // yumrepo/ClusterStorage
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Of course, you can also publish this directory through http and ftp, as long as you modify the related file: // yumrepo.

PS:
You can also modify this file:/usr/lib/python2.4/site-packages/yum/yumRepo. py to directly use the CD as the YUM repository.
For example, in the above example, you can change it:

Remote = url + '/' + relative
Changed:

Remote = "/mnt" + '/' + relative
Mnt is the mount point of your CD

Entry RSS 2.0 feed Trackback Post a comment
No related posts.

Summary:

1. Set up ftp, httpd, or other servers to provide yum services for the network.

2. Copy the Server, Cluster, ClusterStorage, and VT directories in the ISO image to the directories where the services set up in step 1 are located.

3. Use creatrepo to regenerate the software dependency. Add-g to the parameters.

4. Create your yum source file with the suffix ". repo". Refer to the above description for the format. There are four items in total.

5. yum clean all // update yum cache yum list // test software package yum grouplist // Test Software Package

The steps above can be sorted in sequence, depending on your mood.

Related Article

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.