Fedora 18 uses iso DVD to install the image source yum software, which is suitable for scenarios where no software is installed on the network or the network speed is slow.
1. Mount iso. In this example, all are completed in/media. Before installation, it is best to take a look at the relevant principles
# Cd/media
# Mkdir iso
# Mount-r-o loop/dev/cdrom/media/iso/
2. Create a repo source directory in the local file system and re-mount it to the local system.
# Cd/media
# Mkdir repo
# Cd repo
# Mkdir Fedora
# Mount -- bind/media/iso/Fedora // The/media/iso/Fedora here seems to be/media/iso
3. Create a repodata data file in the local file system. This is usually available after the live version is installed.
First, make sure that createrepo is installed on the system. If not, install the tool first:
# Rpm-ivh/media/iso/Fedora/createrepo-0.9.8-5.fc14.noarch.rpm
Create a data file:
# Cd/media/repo
# Createrepo-g/media/iso/repodata/repomd. xml ./
After createrepo is executed, a repodata directory is generated under the/media/repo Directory, which contains the repodata data file.
4. Use the prepared iso file.
Back up the/etc/yum. repos. d directory and delete all files in the directory. Modify/etc/yum. repos. d/packagekit-media.repo
[InstallMedia]
Name = Fedora 14
Baseurl = file: // media/repo
Clear the previously saved cache: # yum clean all
Now, yum can use iso images like network resources and automatically install the rpm packages required by dependency.
Note:
For a specific system, when the iso file is used as the yum source, the repodata must be generated by the local system. Otherwise, the source will not be available because it is inconsistent with the installation of the local rpm package.
Recommended reading:
RedHat Linux local yum source configuration
RedHat 6.2 modify yum source in Linux use CentOS source for free
Configure the epel yum Source
Redhat local yum source configuration
Description of yum configuration file
Install yum in RedHat 6.1)
YUM installation and cleaning