PageSourceSearch

https://hydoc.netlify.app/assets/js/afdace92.019fba3c.js

js hydoc.netlify.app collected 2026-10-03 10:55:43 UTC 11,842 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkblog=self.webpackChunkblog||[]).push([[6269],{2369:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var t=n(52676),s=n(69313);const a={slug:"docker-linux-install",title:"linux\u955c\u50cf\u6e90\u9519\u8bef",date:new Date("2024-09-02T00:00:00.000Z"),last_update:{date:"2024/09/01"},tags:["\u968f\u7b14","yum","install","image"],keywords:["\u968f\u7b14","yum","install","image"],description:"\u4f7f\u7528 yum \u5b89\u88c5\u6216\u66f4\u65b0\u8f6f\u4ef6\u5305\u65f6\uff0c\u51fa\u73b0\u65e0\u6cd5\u89e3\u6790 mirrorlist.centos.org \u4e3b\u673a\u5730\u5740\u7684\u9519\u8bef",image:"https://static.salesmartly.com/prod/project/fj3mnx/material/image/20241117/1731835068716/234050-171907085047ed.jpg",sticky:4},o=void 0,i={permalink:"/blog/docker-linux-install",editUrl:"https://github.com/kuizuo/blog/edit/main/blog/docker/linux\u955c\u50cf\u6e90\u9519\u8bef.md",source:"@site/blog/docker/linux\u955c\u50cf\u6e90\u9519\u8bef.md",title:"linux\u955c\u50cf\u6e90\u9519\u8bef",description:"\u4f7f\u7528 yum \u5b89\u88c5\u6216\u66f4\u65b0\u8f6f\u4ef6\u5305\u65f6\uff0c\u51fa\u73b0\u65e0\u6cd5\u89e3\u6790 mirrorlist.centos.org \u4e3b\u673a\u5730\u5740\u7684\u9519\u8bef",date:"2024-09-02T00:00:00.000Z",tags:[{inline:!0,label:"\u968f\u7b14",permalink:"/blog/tags/\u968f\u7b14"},{inline:!0,label:"yum",permalink:"/blog/tags/yum"},{inline:!0,label:"install",permalink:"/blog/tags/install"},{inline:!0,label:"image",permalink:"/blog/tags/image"}],readingTime:2.3133333333333335,hasTruncateMarker:!0,authors:[],frontMatter:{slug:"docker-linux-install",title:"linux\u955c\u50cf\u6e90\u9519\u8bef",date:"2024-09-02T00:00:00.000Z",last_update:{date:"2024/09/01"},tags:["\u968f\u7b14","yum","install","image"],keywords:["\u968f\u7b14","yum","install","image"],description:"\u4f7f\u7528 yum \u5b89\u88c5\u6216\u66f4\u65b0\u8f6f\u4ef6\u5305\u65f6\uff0c\u51fa\u73b0\u65e0\u6cd5\u89e3\u6790 mirrorlist.centos.org \u4e3b\u673a\u5730\u5740\u7684\u9519\u8bef",image:"https://static.salesmartly.com/prod/project/fj3mnx/material/image/20241117/1731835068716/234050-171907085047ed.jpg",sticky:4},unlisted:!1,prevItem:{title:"Docker \u5b88\u62a4\u8fdb\u7a0b\u65e0\u6cd5\u8fde\u63a5",permalink:"/blog/docker-Process-Connection"},nextItem:{title:"Docker\u90e8\u7f72Frp\u5185\u7f51\u7a7f\u900f\u6559\u7a0b",permalink:"/blog/docker-install-frp"}},l={authorsImageUrls:[]},c=[{value:"\u9519\u8bef\u4fe1\u606f",id:"\u9519\u8bef\u4fe1\u606f",level:2},{value:"\u89e3\u51b3\u65b9\u6cd5",id:"\u89e3\u51b3\u65b9\u6cd5",level:2},{value:"\u6d4b\u8bd5\u9a8c\u8bc1",id:"\u6d4b\u8bd5\u9a8c\u8bc1",level:2},{value:"\u6210\u529f\u8f93\u51fa",id:"\u6210\u529f\u8f93\u51fa",level:2}];function m(e){const r={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.p,{children:"\u521d\u59cb\u5316\u5b89\u88c5linux\u7cfb\u7edf\uff0c\u5b89\u88c5\u5728\u4f7f\u7528 yum \u5b89\u88c5\u6216\u66f4\u65b0\u8f6f\u4ef6\u5305\u65f6\u9047\u5230\u4e86\u955c\u50cf\u6e90\u7684\u95ee\u9898\u3002\u9519\u8bef\u4fe1\u606f\u663e\u793a yum \u65e0\u6cd5\u89e3\u6790 mirrorlist.centos.org \u7684\u4e3b\u673a\u5730\u5740\uff0c\u5bfc\u81f4\u65e0\u6cd5\u83b7\u53d6\u955c\u50cf\u5217\u8868\u3002\u8fd9\u901a\u5e38\u662f\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\u3001DNS\u914d\u7f6e\u9519\u8bef\u6216\u8005\u955c\u50cf\u6e90\u672c\u8eab\u7684\u95ee\u9898\u5f15\u8d77\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u65b9\u6cd5\uff1a"}),"\n",(0,t.jsx)(r.h2,{id:"\u9519\u8bef\u4fe1\u606f",children:"\u9519\u8bef\u4fe1\u606f"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",children:'[root@localhost ~]# sudo yum install -y yum-utils\n\u5df2\u52a0\u8f7d\u63d2\u4ef6\uff1afastestmirror, langpacks\nLoading mirror speeds from cached hostfile\nCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was\n14: curl#6 - "Could not resolve host: mirrorlist.centos.org; \u672a\u77e5\u7684\u9519\u8bef"\n\n\n One of the configured repositories failed (\u672a\u77e5),\n and yum doesn\'t have enough cached data to continue. At this point the only\n safe thing yum can do is fail. There are a few ways to work "fix" this:\n\n     1. Contact the upstream for the repository and get them to fix the problem.\n\n     2. Reconfigure the baseurl/etc. for the repository, to point to a working\n        upstream. This is most often useful if you are using a newer\n        distribution release than is supported by the repository (and the\n        packages for the previous distribution release still work).\n\n     3. Run the command with the repository temporarily disabled\n            yum --disablerepo=<repoid> ...\n\n     4. Disable the repository permanently, so yum won\'t use it by default. Yum\n        will then just ignore the repository until you permanently enable it\n        again or use --enablerepo for temporary usage:\n\n            yum-config-manager --disable <repoid>\n        or\n            subscription-manager repos --disable=<repoid>\n\n     5. Configure the failing repository to be skipped, if it is unavailable.\n        Note that yum will try to contact the repo. when it runs most commands,\n        so will have to try and fail each time (and thus. yum will be be much\n        slower). If it is a very temporary problem though, this is often a nice\n        compromise:\n\n            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true\n\nCannot find a valid baseurl for repo: base/7/x86_64\n'})}),"\n",(0,t.jsx)(r.h2,{id:"\u89e3\u51b3\u65b9\u6cd5",children:"\u89e3\u51b3\u65b9\u6cd5"}),"\n",(0,t.jsx)(r.p,{children:"\u5728/etc/yum.repos.d/CentOS-Base.repo\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",children:"# CentOS-Base.repo\n#\n# The mirror system uses the connecting IP address of the client and the\n# update status of each mirror to pick mirrors that are updated to and\n# geographically close to the client.  You should use this for CentOS updates\n# unless you are manually picking other mirrors.\n#\n# If the mirrorlist= does not work for you, as a fall back you can try the \n# remarked out baseurl= line instead.\n#\n#\n \n[base]\nname=CentOS-$releasever - Base - mirrors.aliyun.com\nfailovermethod=priority\nbaseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/\n        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/\n        http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/\ngpgcheck=1\ngpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7\n \n#released updates \n[updates]\nname=CentOS-$releasever - Updates - mirrors.aliyun.com\nfailovermethod=priority\nbaseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/\n        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/\n        http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/\ngpgcheck=1\ngpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7\n \n#additional packages that may be useful\n[extras]\nname=CentOS-$releasever - Extras - mirrors.aliyun.com\nfailovermethod=priority\nbaseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/\n        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/\n        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/\ngpgcheck=1\ngpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7\n \n#additional packages that extend functionality of existing packages\n[centosplus]\nname=CentOS-$releasever - Plus - mirrors.aliyun.com\nfailovermethod=priority\nbaseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/\n        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/\n        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7\n \n#c
1ontrib - packages by Centos Users\n[contrib]\nname=CentOS-$releasever - Contrib - mirrors.aliyun.com\nfailovermethod=priority\nbaseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/\n        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/\n        http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/\ngpgcheck=1\nenabled=0\ngpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7\n"})}),"\n",(0,t.jsx)(r.h2,{id:"\u6d4b\u8bd5\u9a8c\u8bc1",children:"\u6d4b\u8bd5\u9a8c\u8bc1"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",children:"sudo yum install -y yum-utils\n"})}),"\n",(0,t.jsx)(r.h2,{id:"\u6210\u529f\u8f93\u51fa",children:"\u6210\u529f\u8f93\u51fa"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-bash",children:'[root@localhost ~]# sudo yum install -y yum-utils\n\u5df2\u52a0\u8f7d\u63d2\u4ef6\uff1afastestmirror, langpacks\nLoading mirror speeds from cached hostfile\n * base: mirrors.aliyun.com\n * extras: mirrors.aliyun.com\n * updates: mirrors.aliyun.com\nbase                                                                                                                                | 3.6 kB  00:00:00     \ndocker-ce-stable                                                                                                                    | 3.5 kB  00:00:00     \nextras                                                                                                                              | 2.9 kB  00:00:00     \nupdates                                                                                                                             | 2.9 kB  00:00:00     \n(1/6): docker-ce-stable/7/x86_64/updateinfo                                                                                         |   55 B  00:00:00     \n(2/6): base/7/x86_64/group_gz                                                                                                       | 153 kB  00:00:01     \n(3/6): docker-ce-stable/7/x86_64/primary_db                                                                                         | 152 kB  00:00:01     \n(4/6): extras/7/x86_64/primary_db                                                                                                   | 253 kB  00:00:01     \nbase/7/x86_64/primary_db       FAILED                                                                                    ] 151 kB/s | 3.5 MB  00:03:26 ETA \nhttp://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection refused"\n\u6b63\u5728\u5c1d\u8bd5\u5176\u5b83\u955c\u50cf\u3002\n(5/6): base/7/x86_64/primary_db                                                                                                     | 6.1 MB  00:00:38     \n(6/6): updates/7/x86_64/primary_db                                                                                                  |  27 MB  00:03:01     \n\u8f6f\u4ef6\u5305 yum-utils-1.1.31-54.el7_8.noarch \u5df2\u5b89\u88c5\u5e76\u4e14\u662f\u6700\u65b0\u7248\u672c\n\u65e0\u987b\u4efb\u4f55\u5904\u7406\n'})})]})}function u(e={}){const{wrapper:r}={...(0,s.a)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},69313:(e,r,n)=>{n.d(r,{Z:()=>i,a:()=>o});var t=n(75271);const s={},a=t.createContext(s);function o(e){const r=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(a.Provider,{value:r},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.