ºìÁªLinuxÃÅ»§
Linux°ïÖú

Yum¿ÉÒÔÈÃÄãËæʱӵÓÐ×îеÄFedora

·¢²¼Ê±¼ä:2006-03-13 00:38:50À´Ô´:ºìÁª×÷Õß:´ó³¤½ñ
¡¡¡¡ÔÚRed Hat»òÕßÆäËü»ùÓÚRPMµÄ²Ù×÷ϵͳÖа²×°»òÕ߸üÐÂÈí¼þʱ£¬ÎÒÃǾ­³£»á±»Ò»Ð©ÄªÃûÆäÃîµÄ´íÎóÌáʾËùÀ§ÈÅ¡£¼´±ãÊÇʹÓÃRed HatÌṩµÄ»ùÓÚGUIµÄ¹ÜÀí¹¤¾ß£¬Õâ¸öÎÊÌâҲûÓг¹µ×½â¾ö¡£ÊÂʵÉÏ£¬¾ø´ó²¿·ÖµÄÎÊÌ⣬¶¼³öÔÚÁ˸÷¸öÈí¼þ°üµÄ¹ØÁªÐÔÎÊÌâÉÏ¡£ºÜÏÔÈ»£¬ÕâÊÇRPMÈí¼þ°ü¹ÜÀí¹¤¾ß´æÔÚ×ÅһЩ²»×ã¡£

YumÊÇÒ»¸öÕë¶ÔRPM²Ù×÷ϵͳµÄ·Ç³£·½±ãµÄ×Ô¶¯Éý¼¶ºÍÈí¼þ°ü¹ÜÀí¹¤¾ß¡£Yum»á×Ô¶¯¼ÆËã³ö³ÌÐòÖ®¼äµÄÏ໥¹ØÁªÐÔ£¬²¢ÇÒ¼ÆËã³öÍê³ÉÈí¼þ°üµÄ°²×°ÐèÒªÄÄЩ²½Öè¡£¶ÔÓÚÄÇЩ¹ÜÀí×Å´óÁ¿»úÆ÷µÄϵͳ¹ÜÀíÔ±À´Ëµ£¬ÕâÒâζ×Ų»ÐèҪͨ¹ýRPMÊÖ¹¤À´Éý¼¶Ã¿Ò»Ì¨»úÆ÷¡£ÔÚ°²×°Èí¼þʱ£¬Ò²²»»áÔÙ±»ÄÇЩ¹ØÁªÐÔÎÊÌâËùÀ§ÈÅ¡£

ÔÚRed HatÖУ¬ÓÐÒ»¸öרÃÅÓÃÓÚÈí¼þ°üÉý¼¶µÄ¹¤¾ß--Up2Date¡£ÔÚȱʡÇé¿öÏ£¬ËüÒ²ÊÇFedora Core1ÖеÄRPMÈí¼þ°ü¹ÜÀí¹¤¾ß¡£ÕâÊÇÒ»¸öºÜÖ±¹ÛµÄ£¬»ùÓÚGUIµÄÈí¼þ°ü¹ÜÀí¹¤¾ß¡£Òź¶µÄÊÇ£¬ËüÔÚʹÓùý³ÌÖо­³£»á³ö´í£¬²¢ÇÒÒ²²»¹»Áé»î¡£

Yum¿ÉÒÔ´úÌæUp2Date£¬»òÕß×÷ΪÆäÒ»¸ö²¹³ä¡£Êµ¼ù·¢ÏÖ£¬Yum²»½öËٶȸü¿ì£¬¸ü¼Ó¿É¿¿£¬¶øÇÒ»¹ÌṩÁ˺ܶàÆäËü¹¤¾ßËùûÓÐÌṩµÄ¹¦ÄÜ£¬±ÈÈ磺

¡ô ¶à¸öÈí¼þ²Ö¿â

¡ô ¼òµ¥µÄÅäÖÃÎļþ

¡ô ÕýÈ·µÄÒÀÀµÐÔ¼ì²é

¡ô somps.xml×éÖ§³Ö

¡ô ¼òµ¥µÄ½çÃæ

ÈçÇ°ËùÊö£¬Yum²»½ö¿ÉÒÔÈÃϵͳÉÏÒѾ­°²×°µÄÈí¼þ°ü´¦ÓÚ×îÐÂ״̬£¬Ò²¿ÉÓÃÓÚÖ±½Ó°²×°Èí¼þ°ü¡£ÏÖʵÖУ¬¾­³£»áÅöµ½µÄÎÊÌâÖ®Ò»¾ÍÊÇ£¬ÎÞ·¨ÕÒµ½×ã¹»µÄ¹âÅ̴洢һЩÐèÒªµÄÈí¼þ°ü¡£¶øʹÓÃYum£¬¿ÉÒÔÖ±½Ó´ÓÍøÉÏÏÂÔØ°²×°Èí¼þ°ü¡£

ȱʡÇé¿öÏ£¬YumÒѾ­±»°²×°µ½ÁËFedora Core 1ÖУ¬Èç¹ûϵͳûÓа²×°Õâ¸ö¹¤¾ß£¬¿ÉÒÔÖ±½Ó´Ó¹âÅÌ°²×°£¬Ò²¿ÉÒÔ´ÓÒÔÏÂλÖÃÏÂÔØYumµÄRPM°ü£¬²¢°²×°£º

http://mirrors.kernel.org/fedora/core/1/i386/os/Fedora/RPMS/

ÅäÖÃYum

ÔÚʹÓÃYum֮ǰ£¬ÎÒÃÇÒª±à¼­/etc/yum.confÅäÖÃÎļþ£¬¸ü¸ÄÆäÖÐÖ¸Ã÷ËùʹÓõÄÈí¼þ²Ö¿â·þÎñÆ÷µÄλÖá£ÏÂÃæÊÇȱʡÇé¿öϸÃÎļþµÄÄÚÈÝ£º

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=fedora-release
tolerant=1
exactarch=1
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://fedora.redhat.com/releases/fedora-core-$releasever
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://fedora.redhat.com/updates/released/fedora-core-$releasever
#[updates-testing]
#name=Fedora Core $releasever - $basearch - Unreleased Updates
#baseurl=http://fedora.redhat.com/updates/testing/fedora-core-$releasever

ȱʡÇé¿öÏ£¬YumʹÓõÄÊÇFedora Core1Ö÷ÏÂÔØ·þÎñÆ÷¡£ÒòΪʹÓÃÕâ¸ö·þÎñÆ÷µÄÈËʵÔÚÊÇÌ«¶à£¬ËùÒÔËٶȱȽÏÂý¡£Èç¹ûÐèÒªµÄ»°£¬ÎÒÃÇ¿ÉÒÔ½«YumÉèÖóÉÆäËüµÄ¾µÏñÕ¾µã¡£Çëµ½http://fedora.redhat.com/download/mirrors.html²é¿´¿ÉÓõľµÏñÕ¾µã¡£

Ò»°ãÀ´Ëµ£¬ÎÒÃǶ¼»áÑ¡ÔñÔÚµØÀíÉÏÓë×Ô¼º±È½Ï½Ó½üµÄÕ¾µã£¬Õâͨ³£ÓÐÀûÓÚ¼Ó¿ìÏÂÔصÄËÙ¶È(µ±È»Çé¿öÒ²²¢²»×ÜÊÇÈç´Ë)¡£

ÔÚ±¾ÀýÖУ¬ÎÒÑ¡Ôñmirrors.kernel.org×÷ΪÉý¼¶Õ¾µã¡£ÒÔrootÉí·Ý±à¼­/etc/yum.confÎļþ£¬½«[base]ºÍ[updates-released]Õ½ڵÄÄÚÈݸijÉÏÂÃæµÄÄÚÈÝ£º

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://mirrors.kernel.org/fedora/core/$releasever/$basearch/os
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://mirrors.kernel.org/fedora/core/updates/$releasever/$basearch

µ±È»£¬¸ù¾ÝËùÑ¡ÔñµÄÕ¾µã²»Í¬£¬ÉÏÊöÕ½ڵÄÄÚÈÝÒ²²»Í¬¡£¶ÔÓÚÎļþÖеÄ[updates-testing]²¿·ÖÔò²»ÓöÔÆä½øÐиü¸Ä£¬ÒòΪһ°ãÀ´Ëµ£¬ÔÚÉý¼¶ºÍ°²×°Èí¼þ°üʱ²¢²»ÐèҪʹÓÃËü¡£

³ýÁ˱༭yum.confÎļþÍ⣬»¹ÐèÒª¸ü¸Ä/etc/sysconfig/rhn/sourcesÎļþ£¬Ê¹ÓÃËùÑ¡ÔñµÄ¾µÏñÕ¾µãÀ´´úÌæÎļþµÄÄÚÈÝ£º

yum fedora-core-1 http://mirrors.kernel.org/fedora/core/1/i386/os
yum updates-released http://mirrors.kernel.org/fedora/core/updates/1/i386

ʹÓÃYum

ʹÓÃYumÒª×öµÄµÚÒ»¼þÊÂÇéÊǸüÐÂÆäRPM header(ÎļþÍ·)ÁÐ±í¡£Ã¿Ò»¸öRPM¶¼ÓÐÒ»¸öheader£¬ÆäÖаüº¬ÁËÍêÕûµÄÎļþÁÐ±í¡¢Èí¼þ°üÃèÊö¡¢ÊµÏֵŦÄܺÍÌṩµÄ¿â¡¢ËùÐèÒªµÄ¶«Î÷ÒÔ¼°ÓÐʲô³åÍ»¡£YumÕýÊÇʹÓÃÕâЩÐÅÏ¢À´¾ö¶¨ÈçºÎÉý¼¶ºÍ°²×°Èí¼þ°üµÄ¡£

ÏÂÃæ¾ÍÀ´½â¾öÕâ¸öÎÊÌ⣬ÊäÈëÒÔÏÂÃüÁ

yum check-update

ÔËÐÐÕâ¸öÃüÁYum½«´Óyum.confÎļþÖÐÖ¸¶¨µÄÈí¼þ°ü·þÎñÆ÷ÉÏÏÂÔص±Ç°µÄÍêÕûheaderÎļþÁÐ±í¡£Õâ¸ö¹ý³Ìͨ³£ÐèÒª»¨·ÑÒ»¶¨µÄʱ¼ä£¬²¢ÇÒ»áÓÐÈçϵÄһЩÏÔʾÐÅÏ¢£º

Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed
headers
getting /var/cache/yum/updates-released
/headers/pango-0-1.2.5-4.i386.hdr
pango-0-1.2.5-4.i386.hdr
100% |=======| 6.5 kB¡¡¡¡00:02
......

µ±ÉÏÊöµÄ²½ÖèÍê³ÉÖ®ºó£¬ËµÃ÷YumÒѾ­ÏÂÔØÍêÁËËùÓеÄheaderÎļþ¡£Èç¹ûÏëÈÃÏÖÔÚϵͳÉÏ°²×°µÄËùÓÐÈí¼þ¶¼´¦ÓÚ×îеÄ״̬£¬Ö»ÐèʹÓÃÒÔÏÂÃüÁ

yum update

Yum»á½«ÏÖÔÚϵͳÉÏ°²×°µÄËùÓÐÈí¼þºÍÄ¿Ç°µÄÈí¼þ²Ö¿â·þÎñÆ÷ÉϵÄÈí¼þ½øÐбȽϣ¬±È½ÏÍê³Éºó£¬Ëü»á¸ø³öÒ»¸öÓйØϸ½ÚµÄÐÅÏ¢ÁбíÈÃÓû§È·ÈÏ£¬ÁбíµÄÄÚÈÝÈçÏÂËùʾ£º

Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[install: kernel 2.4.22-1.2188.nptl.i686]
[update: pango 1.2.5-4.i386]
......
[update: XFree86-font-utils 4.3.0-55.i386]
Is this ok [y/N]:y

ÔÚ±¾ÀýÖУ¬Yum¸æËßÎÒÓÐ76¸ö¿ÉÓøüÐÂ(ÒòΪÎÒ½øÐвâÊÔµÄϵͳÔÚ°²×°ÍêFedoraÒÔºó»¹´ÓÀ´Ã»Óиüйý)¡£Òª°²×°ËùÓÐÕâЩ¸üУ¬ËùÒª×öµÄÖ»ÊÇÊäÈë¡°y¡±¼´¿É¡£Èç¹ûÏë¸üеÄÖ»ÊÇijһ¸öÌض¨µÄÈí¼þ£¬¿ÉÒÔ½«ÉÏÊöÃüÁîÉÔ×öÐ޸ģº

yum update nmap

»á¿´µ½ÈçÏÂËùÊöµÄÄÚÈÝ£º

Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
No Packages Available for Update
No actions to take

ÔÚÉÏÊöµÄÀý×ÓÖУ¬Yum¸æËßÎÒ£¬ÎÒµÄϵͳÉϵÄnmapÒѾ­ÊÇ×îа汾ÁË£¬Òò´ËÎÞÐè½øÐÐÈκÎÉý¼¶¡£ÏÂÃæÎÒÃÇÀ´¿´Ò»¿´ÈçºÎ°²×°Ò»¸ö»úÆ÷ÉÏûÓеÄÈí¼þ°ü£¬±ÈÈçÒª°²×°µÄÊÇXChat IRC¿Í»§¶Ë£¬Ö»ÐèÒªÊäÈëÒÔÏÂÃüÁî¼´¿É£º

yum install xchat

¿ÉÄܻῴµ½ÈçÏÂÐÅÏ¢£º

Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[install: xchat 1:2.0.7-1.FC1.0.i386]
Is this ok [y/N]:

°´¡°y¡±¾Í¿ÉÒÔ½øÐÐÈí¼þµÄ°²×°£¬»á³öÏÖÏÂÁÐÄÚÈÝÌáʾ°²×°³É¹¦£º

Getting xchat-2.0.7-1.FC1.0.i386.rpm
xchat-2.0.7-1.FC1.0.i386.
100% |==========| 1.1 MB¡¡¡¡01:51
Running test transaction:
Test transaction complete, Success!
xchat 100 % done 1/1
Installed:¡¡xchat 1:2.0.7-1.FC1.0.i386
Transaction(s) Complete

ËäÈ»ÎҵĻúÆ÷ÉϵÄnampÒѾ­²»ÐèÒªÔÙ½øÐÐÉý¼¶£¬²»¹ýÎÒ»¹ÏëΪÆä°²×°Ò»¸öGUI½çÃ棬µ«ÓÖ²»ÖªµÀÐèҪʲôÈí¼þ°ü£¬ÕâʱֻÐèÒªÊäÈëÒÔÏÂÃüÁ

yum search nmap gui

¿ÉÄÜ¿´µ½µÄÄÚÈÝÈçÏ£º

Gathering header information file(s) from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Looking in available packages for a providing package
Available package: redhat-config-printer-gui.i386
0:0.6.79.5-1 from updates-released matches with
redhat-config-printer-gui
Available package: nmap.i386 2:3.48-1
from base matches with nmap
Available package: nmap-frontend.i386
2:3.48-1 from base matches with
Available package: nmap-frontend.i386
2:3.48-1 from base matches with nmap-frontend
......
2 results returned

Èç¹ûÏÖÔÚÐèÒªÒ»¸ö²¢²»ÊǶÀÁ¢Èí¼þ°üµÄ¿âÎļþ£¬±ÈÈçlibc6.1-1.so.2£¬¿ÉÒÔͨ¹ýÒÔÏÂÃüÁî»ñÈ¡£º

yum provides libc6.1-1.so.2

¸ÃÃüÁî»áÏÔʾÒÔÏÂÐÅÏ¢£º

Gathering header information file(s)
from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Looking in available packages for a providing package
Available package: compat-libstdc++.i386
0:7.3-2.96.118 from base matches with
libstdc++-libc6.1-1.so.2
Available package: compat-libstdc++.i386
0:7.3-2.96.118 from base matches with
libstdc++-libc6.1-1.so.2(GCC.INTERNAL)
2 results returned
Looking in installed packages for a providing package
No packages found

Yum¸æÖªËù²éѯµÄ¿âλÓÚcompat-libstdc++µÄÈí¼þ°üÖУ¬²¢ÇÒÏÖÔÚ»¹Ã»Óа²×°µ½±¾µØϵͳÉÏ£¬ËùÒÔÖ»ÐèÒªÊäÈëÃüÁî¡°yum install compat-libstdc++¡±¼´¿ÉÍê³É¸Ã¿âµÄ°²×°¡£Èç¹ûҪɾ³ýϵͳÖеÄijÈí¼þ£¬Ö»ÐèÒªÊäÈëÒÔÏÂÃüÁ

yum remove nmap

¸ÃÃüÁ»áɾ³ý¸ÃÈí¼þ°üÒÔ¼°ËùÓÐÓëÖ®Ïà¹ØÁªµÄÈí¼þ°ü¡£

ÔÚYumÉý¼¶»òÕß°²×°Èí¼þʱ£¬Ëü²¢²»»á×Ô¶¯Çå³ý´ÅÅÌ»º³åÇø£¬ËùÒÔÒªÊÖ¶¯À´Íê³ÉÕâ¸ö¹ý³Ì¡£ËùÐÒµÄÊÇÕâ¸ö¹ý³Ì·Ç³£¼òµ¥£¬Ö»ÐèÒªÊäÈëÒÔÏÂÃüÁî¼´¿É£º

yum clean all

¸ÃÃüÁî»áɾ³ýËùÓлº³åÇøÖеÄÈí¼þ°üÒÔ¼°ËùÓв»ÔÙÐèÒªµÄRPM header¡£Èç¹ûÒª²é¿´Ä³Ò»Èí¼þÔÚ±¾ÏµÍ³ÉϵݲװÇé¿ö£¬¿ÉÒÔʹÓÃÒÔÏÂÃüÁ

yum info xchat

½«»á³öÏÖÈçÏÂÌáʾ£º

Gathering header information file(s)
from server(s)
Server: Fedora Core 1 - i386 - Base
Server: Fedora Core 1 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Looking in Available Packages:
Looking in Installed Packages:
Name¡¡ : xchat
Arch¡¡ : i386
Version: 2.0.7
Release: 1.FC1.0
Size¡¡ : 2.77 MB
Group¡¡: Ó¦ÓóÌÐò/»¥ÁªÍø
Repo¡¡ : Locally Installed
Summary: GTK+ IRC (ÁÄÌì) ¿Í»§¡£
Description:
X-Chat ÊÇÒ»¸ö X ´°¿ÚϵͳºÍ GTK+ µÄ IRC ¿Í»§¡£
X-Chat ʹÓüò±ã²¢°üÀ¨Ò»¸öºÃ¿´µÄ½çÃæ¡£

С½á

´ÓÉÏÃæµÄÌÖÂÛ¿ÉÒÔ¿´³ö£¬YumÊÇÒ»¸ö·Ç³£·½±ãʵÓõÄÉý¼¶¹¤¾ß£¬Ëü¿ÉÒÔºÜÇáËɵØÈÃÓû§µÄϵͳʱ¿Ì´¦ÓÚ×îеÄ״̬¡£ÊÂʵÉÏ£¬Yum¿ÉÒÔʵÏֵŦÄÜ»¹Ô¶²»Ö¹±¾ÎÄÌÖÂÛµÄÄÚÈÝ¡£ÎÒÃÇ»¹¿ÉÒÔÓÃËüÀ´Éý¼¶ÄÚºË(Éý¼¶ÖÁа汾µÄÄںˣ¬¶ø²»ÊÇ´ò²¹¶¡)¡£

±¾ÎÄÒÔFedora Core 1ΪÀý£¬Èç¹û»úÆ÷ÉÏ°²×°µÄÊÇÒÔÇ°µÄRed Hat°æ±¾£¬Ò²¿ÉÒÔʹÓÃYumÀ´½øÐÐÈí¼þµÄ¸üкͰ²×°¹ÜÀí¡£·½·¨ÊÇ´ÓÒÔÏÂλÖÃÏÂÔØÏàÓ¦µÄ°æ±¾°²×°£¬¼´¿ÉÈç±¾ÎÄËùÊöµÄ·½·¨Ò»Ñù¶Ôϵͳ½øÐиüÐÂ(ÉõÖÁ¿ÉÒÔÖ±½Ó½«ÀϵÄRed HatϵͳÉý¼¶ÖÁFedora)£º

http://www.linux.duke.edu/projects/yum
/download/2.0/yum-2.0.6-1.noarch.rpm
Red Hat Linux 8.0£º
http://www.linux.duke.edu/projects/yum
/download/1.0/yum-1.0.3-1_80.noarch.rpm
Red Hat Linux 7.3£º
http://www.linux.duke.edu/projects/yum
/download/1.0/yum-1.0.3-1_73.noarch.rpm

¼¸¸öÑÇÖÞµÄÈí¼þ²Ö¿â·þÎñÆ÷¾µÏñÕ¾µã£º

http://download.stmc.edu.hk/fedora/linux/core/
ftp://download.stmc.edu.hk/fedora/linux/core/

ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/
rsync://ftp.sfc.wide.ad.jp/fedora/
http://ftp.kddilabs.jp/Linux/packages/fedora/core/
ftp://ftp.kddilabs.jp/Linux/packages/fedora/core/
rsync://ftp.kddilabs.jp/fedora/
ftp://ftp.riken.go.jp/pub/Linux/fedora/core/

ftp://ftp.kreonet.re.kr/pub/Linux/fedora/core/
rsync://ftp.kreonet.re.kr/fedora/core/
ftp://mirror.hostway.co.kr/pub/fedora/
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ