The software source information files (*. repo) of Fedora are stored in the/etc/yum. Repos. d directory. You can use # ls-L/etc/yum. repos. d. Check that the default software sources are all foreign and the network speed may not be fast. We can add the domestic software sources and local software sources by ourselves.
1. Add domestic software sources# Cd/etc/yum. Repos. D # wget http://mirrors.163.com/.help/fedora-163.repo#wget http://mirrors.163.com/.help/fedora-updates-163.repo#wget http://mirrors.sohu.com/help/fedora-sohu.repo#wget http://mirrors.sohu.com/help/fedora-updates-sohu.repo#wget? Codeblock = 0 # wget http://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/fedora? Codeblock = 1 # Yum makecache (update cache) has a plug-in that can automatically select the fastest source Yum-fastestmirror
# Yum install Yum-fastestmirror
These are the image sources of Netease, Sohu, and HKUST. wget is a download command. You can also enter the image site on a graphical interface (for example, help after mirrors.sohu.com fedora) download the repo file as instructed and put it in that folder.
2. Add a local DVD as the yum software source.The DVD image of fedora18 reaches 4.36 GB. In fact, most of the installed software is in the warehouse (under the packages directory). Some software may not be the latest. If we use these software directly during installation, it will be very convenient.
<1> Create a yum directory# Mkdir-P software/lemon_yum (assume that the new directory is named lemon-yum in the/home/admin/software/lemon_yum directory)
<2> copy an RPM file# Cp-RV/Media/fedora 15 i386 DVD/packages /*. /lemon_yum (copy all the items in the packages directory of the disc to the directory you just created. The ora18 disc is mounted under the/media directory by default, so you can copy the content in the graphic interface)
<3> install createrepoCheck if # rpm-Qa | grep createrepo is installed. If no, install createrepo # Yum install createrepo (If yes, you do not need to install it) # cd lemon-Yum (go to the Software Directory) # createrepo-V/home/admin/software/lemon_yum (after the index file is created, the repodata folder is generated in this directory to save the index information)
<4> # cd/etc/yum. Repos. d
In order not to continue updating Yum from the Internet, the Internet repo must be blocked first. (The built-in Internet repo and the Mobile Directory yumbake will not work.
Or change the suffix. If it is used later, copy it directly)
MV *. Repo yumbak/(move the repo file to the yumbak directory)
Create a local source Repo# Vi Lemon. Repo (edit repo file)
Repo file content: (click I to edit)[Lemon]
Name = lemon Yum Repo
Baseurl = file: // home/admin/software/lemon-yum/
Enabled = 1
Gpgcheck = 0
(ESC exit edit mode: WQ save and Exit)
<5> # Yum makecache (update cache)You can test which repository file will be indicated after the software is installed when the local update source Yum install httpd is installed. The lemon local repository may be used. Source of HKUST, Repo file [fedora-USTC] Name = fedora 15 i386-ustcbaseurl = listen 15 i386-ustcbaseurl = response updates-ustcbaseurl = Response