1. First, you need to mount the CD or the ISO image file you downloaded to a directory, and then copy the files in the CD or ISO to a fixed directory. [Root @ linuxidc ~] # Mkdir/mnt/iso [root @ linuxidc ~] # Mkdir/yum create iso and yum directories [root @ linuxidc ~] # Mount-tiso9660rhel5.iso-oloop/mnt/iso Mount rhel5. I
1. First, you need to mount the CD or the ISO image file you downloaded to a directory, and then copy the files in the CD or ISO to a fixed directory.
[Root @ linuxidc ~] # Mkdir/mnt/iso
[Root @ linuxidc ~] # Mkdir/yum
Create iso and yum Directories
[Root @ linuxidc ~] # Mount-t iso9660 rhel5.iso-o loop/mnt/iso
Mount rhel5.iso to the iso directory under/mnt/
[Root @ linuxidc ~] # Cp-rf/mnt/iso /*
/Yum/
Copy all files/directories in iso to the yum directory under the same directory.
2. Configure the yum File
[Root @ linuxidc ~] # Vim/etc/yum. repos. d/rhel-source.repo
Use vim to open the yum configuration file. The files in the/etc/yum. repos. d/directory may end with many. repo files. You only need to edit one file and rename all the other files.
Configure the configuration file as follows.
[Server] name = Red Hat Server
Baseurl = file: // yum/Server
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
[VT]
Name = Red Hat VT
Baseurl = file: // yum/VT
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Cluster]
Name = Red Hat Cluster
Baseurl = file: // yum/Cluster
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
Name = Red Hat ClusterStorage
Baseurl = file: // yum/ClusterStorage
Enabled = 1
Gpgcheck = 0
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Glossary
(1) "[] 'is the name in brackets, which is the service to be defined. For example, if VT is entered in it, virtualization is defined.
(2) "name" indicates the definition description, which can be written as needed.
(3) "baseurl" is the path to fill in the yum. Because yum configuration is used to facilitate software installation or service, this path is to point to the software package in yum, if yum has been configured on another computer or on the network, you can direct it to its address.
(4) "enabled": Enter 1 and 0. "1" indicates that the local machine is directly enabled to configure yum to install software or services. "0" indicates that yum is disabled.
(5) "gpgcheck" is filled with numbers 1 and 0. "1" indicates that the key needs to be verified when installing the software or service, and whether the installed software is officially redhat. 0 indicates no detection
(6) Storage path of the "gpgkey" authentication key
Save and exit
3. Installation Toolkit
[Root @ linuxidc ~] # Rpm-ivh/yum/Server/createrepo-0.4.11-3.el5.noarch.rpm
4. Generate a software Warehouse database
[Root @ linuxidc ~] # Createrepo-g/yum/Server/repodata/comps-rhel5-server-core.xml/yum/Server/
[Root @ linuxidc ~] # Createrepo-g/yum/VT/repodata/comps-rhel5-vt.xml/yum/VT/
[Root @ linuxidc ~] # Createrepo-g/yum/Cluster/repodata // yum/Cluster
[Root @ linuxidc ~] # Createrepo-g/yum/ClusterStorage/repodata/comps-rhel5-cluster-st.xml/yum/ClusterStorage/
5. After all the preceding configurations are completed, all the yum instances on the server have been installed. Click "application"> "Update or delete software" to list software packages.
Recommended reading:
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
Configuration http://www.linuxidc.com/Linux/2013-08/88217.htm for local yum sources in RedHat Linux
RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10