ISO is used as the yum source to install the rpm package, yumrpm
1. Create a mount directory
Mkdir/media/centos
2. mount a dvd Disc
Mount-t auto/dev/cdrom/media/CentOS
3. Modify the yum repo configuration file
Ls-l/etc/yum. repos. d/
Backing up two files except the CentOS-Media.repo,
Modify CentOS-Media.repo files
Change baseurl
Baseurl = file: // media/centos/
Enabled = 1
Save,
Yum install xxxx
Test
How to install YUM source in linux5
Use the installation DVD to create a local yum Source
Since yum has effectively solved the RPM package dependency problem, this article will solve the speed problem. The access speed of the local optical drive is even faster than that of the 100 m lan. In some recent releases, the repo information has been preset and stored in the directory named repodata. The installation disk is a ready-made yum source. In RHEL5, multiple repo are preset and stored in the <CDROOT>/Server/repodata, <CDROOT>/Cluster/repodata directories, and in Fedora12, stored in <CDROOT>/repodata. There are no pre-configured repo information in old releases such as RHEL4. In this case, you need to manually create the repo information for yum to use. For more information about manual repo creation, see the createrepo section in the next section "Create a local yum source using installation CD.
First, attach the CD to the optical drive and attach the CD.
# Mount/dev/hdc/media/cdrom
Mount: block device/dev/hdc is write-protected, mounting read-only
If an image is installed locally, it is mounted to the corresponding directory through loop.
# Mount-o loop rhel-server-5.4-i386-dvd.iso/media/cdrom
Then, edit the yum source configuration file and add a local yum source. Here is an RHEL5u4 DVD installation disk. Its repo corresponds to <CDROOT>/Server.
# Cat>/etc/yum. repos. d/dvd. repo <END
[Dvd]
Name = install dvd
Baseurl = file: // media/cdrom/Server
Enabled = 1
Gpgcheck = 0
END
For Fedora, the remote yum source exists by default after the system is installed. We recommend that you temporarily disable these remote yum sources by setting "enabled = 0" in the *. repo file before completing the RPM package. This forces yum to use only the local disc as the installation source, and never waste time due to external downloads.
Why should I install the appropriate rpm package for a linux yum source? I only need to change the baseurl value.
For example, if you have installed a third-party yum source rpmforge (in Baidu)
Query related files after installation: rpm-qal | grep rpmforge
It can be seen that the help document, key, and other information are not only necessary to change the website address. Can I do without key authentication?