ÔõÑùÔÚLinuxÉÏÉèÖÃÍâµØ¾µÏñÔ´
ÔõÑùÔÚlinuxÉÏÉèÖÃÍâµØ¾µÏñÔ´
½üЩÄêÀ´£¬Ëæ×Å»¥ÁªÍøµÄÆÕ¼°£¬Èí¼þºÍϵͳ¸üеÄƵÂÊÒ²Ô½À´Ô½¿ì¡£ÎªÁ˸ü¿ìËٵػñÈ¡Èí¼þ¸üкÍ×°ÖÃÐÂÈí¼þ£¬Ðí¶àLinuxÓû§Ñ¡ÔñʹÓÃÍâµØ¾µÏñÔ´¡£
ÍâµØ¾µÏñÔ´ÊÇ´æ´¢Èí¼þºÍϵͳװÖÃÎļþµÄЧÀÍÆ÷£¬Ëü°üÀ¨ÁËËùÓÐԴЧÀÍÆ÷µÄÈí¼þºÍ¸üеĸ±±¾¡£Í¨¹ýʹÓÃÍâµØ¾µÏñÔ´£¬¿ÉÒÔ¼ÓËÙÈí¼þºÍϵͳµÄÏÂÔØËÙÂÊ£¬ïÔÌÍøÂç´«ÊäµÄʱ¼äºÍÁ÷Á¿¡£½ÓÏÂÀ´£¬ÎÒ½«ÏÈÈÝÔõÑùÔÚlinuxÉÏÉèÖÃÍâµØ¾µÏñÔ´£¬²¢ÌṩÏìÓ¦µÄ´úÂëʾÀý¡£
Ê×ÏÈ£¬ÎÒÃÇÐèҪѡÔñÒ»¸öºÏÊʵÄÍâµØ¾µÏñÔ´¡£Ò»Ñùƽ³£À´Ëµ£¬º£ÄÚµÄÓû§¿ÉÒÔÑ¡ÔñÖпƴó¡¢Ç廪´óѧ¡¢°¢ÀïÔƵÈ×ÅÃûѧ¸®ºÍÔÆЧÀÍÉÌÌṩµÄ¾µÏñÔ´¡£ÕâЩ¾µÏñÔ´¶¼ÌṩÁËÆÕ±éµÄÈí¼þºÍϵͳµÄ¸±±¾£¬²¢ÇÒͨ³£Ö§³Ö¶àÖÖLinux¿¯Ðа档
ÉèÖÃÍâµØ¾µÏñÔ´µÄÒªÁìÒòLinux¿¯Ðаæ¶øÒì¡£ÒÔÏÂÒÔÁ½¸ö³£¼ûµÄ¿¯ÐаæDebianºÍCentOSΪÀý¾ÙÐÐ˵Ã÷¡£
Debianϵͳ
ÔÚDebianϵͳÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃapt¹¤¾ßÀ´ÉèÖÃÍâµØ¾µÏñÔ´¡£·¿ªÖն˲¢ÒÔrootÓû§Éí·ÝÔËÐÐÒÔÏÂÏÂÁ
# ±¸·ÝÔÓеÄsources.listÎļþ£¨¿ÉÑ¡£© cp /etc/apt/sources.list /etc/apt/sources.list.bak # ÐÞ¸Äsources.listÎļþ nano /etc/apt/sources.list
µÇ¼ºó¸´ÖÆ
È»ºó£¬½«ÔÓÐÔ´µÄURLÌ滻ΪÍâµØ¾µÏñÔ´µÄURL¡£ÒÔÇ廪´óѧµÄ¾µÏñԴΪÀý£¬¿ÉÒÔ½«ÒÔÏÂÄÚÈÝÌí¼Óµ½sources.listÎļþÖУº
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
µÇ¼ºó¸´ÖÆ
ÉúÑIJ¢¹Ø±ÕÎļþºó£¬ÔËÐÐÒÔÏÂÏÂÁîʹÐÞ¸ÄÉúЧ£º
apt update
µÇ¼ºó¸´ÖÆ
CentOSϵͳ
ÔÚCentOSϵͳÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃyum¹¤¾ßÀ´ÉèÖÃÍâµØ¾µÏñÔ´¡£·¿ªÖն˲¢ÒÔrootÓû§Éí·ÝÔËÐÐÒÔÏÂÏÂÁ
# ±¸·ÝÔÓеÄyumÔ´Îļþ£¨¿ÉÑ¡£© cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak # ÏÂÔØCentOSµÄyumÔ´Îļþ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
µÇ¼ºó¸´ÖÆ
È»ºó£¬ÎÒÃÇÐèÒª±à¼yumÔ´Îļþ£¬É¾³ýÔÓеÄURL²¢Ìí¼ÓÍâµØ¾µÏñÔ´µÄURL¡£ÒÔ°¢ÀïÔƵľµÏñԴΪÀý£¬¿ÉÒÔ½«ÒÔÏÂÄÚÈÝÌí¼Óµ½CentOS-Base.repoÎļþÖУº
[BaseOS] name=CentOS-$releasever - Base baseurl=http://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8 # Ê¡ÂÔÆäËû²¿·Ö... [epel] name=Extra Packages for Enterprise Linux $releasever - $basearch baseurl=http://mirrors.aliyun.com/epel/$releasever/$basearch gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 # Ê¡ÂÔÆäËû²¿·Ö...
µÇ¼ºó¸´ÖÆ
ÉúÑIJ¢¹Ø±ÕÎļþºó£¬ÔËÐÐÒÔÏÂÏÂÁîʹÐÞ¸ÄÉúЧ£º
yum makecache
µÇ¼ºó¸´ÖÆ
µ½´Ë£¬ÎÒÃÇÒѾÀֳɵØÉèÖÃÁËÍâµØ¾µÏñÔ´¡£ÏÖÔÚ£¬ÎÒÃÇ¿ÉÒÔͨ¹ýÏìÓ¦µÄÈí¼þÖÎÀí¹¤¾ßÈçaptºÍyumÀ´×°ÖÃÈí¼þºÍ¸üÐÂϵͳ¡£ÔÚÖ´ÐÐÕâЩÏÂÁîʱ£¬ÏµÍ³»á´ÓÍâµØ¾µÏñÔ´ÖлñÈ¡Èí¼þºÍϵͳÎļþ£¬´Ó¶øµÖ´ï¼ÓËÙÏÂÔصÄЧ¹û¡£
×ܽáÆðÀ´£¬ÉèÖÃÍâµØ¾µÏñÔ´¿ÉÒÔÌá¸ßÈí¼þºÍϵͳµÄÏÂÔØËÙÂÊ£¬ïÔÌÍøÂç´«ÊäµÄʱ¼äºÍÁ÷Á¿¡£±¾ÎÄÏÈÈÝÁËÔÚLinuxµÄDebianºÍCentOSϵͳÉÏÔõÑùÉèÖÃÍâµØ¾µÏñÔ´µÄÒªÁ죬²¢ÌṩÁËÏìÓ¦µÄ´úÂëʾÀý¡£Ï£ÍûÕâЩÄÚÈݶÔÄãÓÐËù×ÊÖú£¬Äܹ»ÔÚLinuxÉϸü¸ßЧµØ¾ÙÐÐÈí¼þ×°ÖúÍϵͳ¸üС£
ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖÃÍâµØ¾µÏñÔ´µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡