RHEL5 creates its own yum source server (based on http)

Source: Internet
Author: User

To solve the dependency problem of the software package, the best way to release the Red Hat series is to use yum to build the yum source using the files in the rhel installation CD file, here, we use http (Local CD mode and local file mode). This document records the brief process for your reference only.

1. Mount the installation disc to the System

Mount/dev/cdrom/media/


2. copy the file to the rhel5 directory of the web server.

Cp-fr/media/*/var/www/htm/rhel5


3. Rebuild the record group file
First, confirm that the createrepo package has been installed.

Cd/var/www/htm/rhel5/Server
Rpm-ivh createrepo-0.4.11-3.el5.noarch.rpm


Then re-create the rpm record group file

Createrepo-g/var/www/html/rhel5/VT/repodata/comps-rhel5-vt.xml/var/www/html/rhel5/VT

Createrepo-g/var/www/html/rhel5/Cluster/repodata/comps-rhel5-cluster.xml/var/www/html/rhel5/Cluster

Createrepo-g/var/www/html/rhel5/clusterstore/repodata/comps-rhel5-cluster-st.xml/var/www/html/rhel5/ClusterStorage

Createrepo-g/var/www/html/rhel5/Server/repodata/comps-rhel5-server-core.xml/var/www/html/rhel5/Server


4. Create a repo library file rhel5-http.repo under the/etc/yum. repos. d directory
(Note: The file name is arbitrary and the file suffix must be repo)

Cd/etc/yum. repos. d

Vi rhel5-http.repo
# My machine IP address is 192.168.171.3

Quotation
[Cluster]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Cluster
Baseurl = http: // 192.168.171.3/rhel5/Cluster
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ClusterStorage]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-ClusterStorage
Baseurl = http: // 192.168.171.3/rhel5/ClusterStorage
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Server]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-Server
Baseurl = http: // 192.168.171.3/rhel5/Server
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[VT]
Name = Red Hat Enterprise Linux $ releasever-$ basearch-VT
Baseurl = http: // 192.168.171.3/rhel5/VT
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
5. Clear the local yum Cache
Yum clean all

6. Test

Yum-y install vim *

Quotation
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Package 2: vim-minimal-7.0.109-4.el5_2.4z.i386 already installed and latest version
Package 2: vim-common-7.0.109-4.el5_2.4z.i386 already installed and latest version
Package 2: vim-enhanced-7.0.109-4.el5_2.4z.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package vim-X11.i386. 0.109-4. el5_2.4z set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

========================================================== ======================================

========================================================== ==============================
Package Arch Version Repository Size
========================================================== ======================================

========================================================== ==================================
Installing:
Vim-X11 i386. 0.109-4. el5_2.4z Server 1.4 M

Transaction Summary
========================================================== ======================================

========================================================== ==================================
Install 1 Package (s)
Update 0 Package (s)
Remove 0 Package (s)

Total download size: 1.4 M
Downloading Packages:
Vim-X11-7.0.109-4.el5_2.4z.i386.rpm | 1.4 MB
Warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
Importing GPG key 0x37017186 "Red Hat, Inc. (release key)" from/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: vim-X11 [1/1]

Installed: vim-X11.i386. 0.109-4. el5_2.4z
Complete!



8. Configure the web server. The default directory is specified to the rhel source location.

 

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.