Article Title: tip: Set a local update source for FedoraLinux8. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
After Fedora Core8 is installed, you must use yum to update it. When you add a yum update source, the updates that come with the system are extremely slow and there is no possibility of completion.
The following describes how to use httpd.
Install the httpd package:
# Yum install httpd
# Chkconfig httpd on
# Service httpd start or #/etc/init. d/httpd start
Install the createrepo Toolkit:
# Yum install createrepo
Then create the fedora8 package directory and update the package directory:
# Mkdir-p/var/www/html/yum/base/8/i386
# Mkdir-p/var/www/html/yum/updates/8/i386
If a CD is available, copy all rpm software packages to the/var/www/html/yum/base/8/i386 directory:
# Cd/misc/cd/Packages; cp-V */var/www/html/yum/base/8/i386
# Cd
Or go to the terminal:
Rsync-avrt rsync: // ftp-stud.hs-esslingen.de/fedora/linux/releases/8/everything/ I #/ OS /packages/
/Var/www/html/yum/base/8/i386 |
Note that the red part must be the '/' symbol;
Run the createrepo command:
# Createrepo/var/www/html/yum/base/8/i386
This command will create a repodata folder in the/var/www/html/yum/base/8/i386 Directory, which contains the following files:
# Ls-l/var/www/html/yum/base/8/i386/repodata/
Total 9268
-Rw-r -- 1 root 2227275 2008-01-12 21:11 filelists.xml.gz
-Rw-r -- 1 root 6487453 2008-01-12 21:11 other.xml.gz
-Rw-r -- 1 root 747714 2008-01-12 21:11 primary.xml.gz
-Rw-r -- 1 root 951 2008-01-12 21:11 repomd. xml
Next, go to the/var/www/html/yum/updates/8/i386 directory and download the latest rpm package in the rsync directory:
Rsync-avrt rsync: // ftp-stud.hs-esslingen.de/fedora/linux/updates/8/ I #/ -- exclude = debug // var/www/html/yum/updates/8/i386
Set crontab to automatically download the latest software package:
23 4 */2 **/usr/bin/rsync-avrt
Rsync: // ftp-stud.hs-esslingen.de/fedora/linux/updates/8/ I/
-- Exclude = debug // var/www/html/yum/updates/8/i386
Finally, go to the/etc/yum. repos. d/directory and create a file ending with repo, as shown below:
[Base-local]
Name = Fedora $ releasever-$ basearch
Failovermethod = priority
Baseurl = http: // 192.168.0.100/yum/base/$ releasever/$ basearch
# Items list = http://mirrors.fedoraproject.org/mirrorlist? Repo = fedora-$ releasever & arch = $ basearch
Enabled = 1
Gpgcheck = 0
[Updates-local]
Name = Fedora $ releasever-$ basearch-Updates
Failovermethod = priority
Baseurl = http: // 192.168.0.100/yum/updates/$ releasever/$ basearch/
# Items list = http://mirrors.fedoraproject.org
/Revoke list? Repo = updates-released-f $ releasever & arch = $ basearch
Enabled = 1
Gpgcheck = 0 |