\r\nserver{\r\n listen 16666;\r\n server_name _;\r\n add_header Access-Control-Allow-Origin *;\r\n add_header Access-Control-Allow-Headers X-Requested-With;\r\n add_header Access-Control-Allow-Methods GET,POST,OPTIONS;\r\n\r\n location \/ {\r\n root html;\r\n index index.html index.htm;\r\n }\r\n\r\n location \/centos\/ {\r\n proxy_pass http:\/\/mirrors.aliyun.com\/centos\/;\r\n }\r\n\r\n location \/epel\/ {\r\n proxy_pass http:\/\/mirrors.aliyun.com\/epel\/;\r\n }\r\n\r\n location \/mariadb\/ {\r\n proxy_pass http:\/\/mirrors.ustc.edu.cn\/mariadb\/;\r\n }\r\n\r\n }\r\n<\/pre>\n\u4f7f\u7528yum\u6e90\u7684\u5ba2\u6237\u7aef\u914d\u7f6e<\/p>\n
\r\n[root@master1 ~]# cd \/etc\/yum.repos.d\/\r\n[root@master1 yum.repos.d]# vim CentOS-Base.repo \r\n[base]\r\nname=CentOS-$releasever - Base - 192.168.100.100:16666\r\nfailovermethod=priority\r\nbaseurl=http:\/\/192.168.100.100:16666\/centos\/$releasever\/os\/$basearch\/\r\n http:\/\/192.168.100.100:16666\/centos\/$releasever\/os\/$basearch\/\r\n# http:\/\/mirrors.cloud.aliyuncs.com\/centos\/$releasever\/os\/$basearch\/\r\ngpgcheck=1\r\ngpgkey=http:\/\/192.168.100.100:16666\/centos\/RPM-GPG-KEY-CentOS-7\r\n\r\n#released updates \r\n[updates]\r\nname=CentOS-$releasever - Updates - 192.168.100.100:16666\r\nfailovermethod=priority\r\nbaseurl=http:\/\/192.168.100.100:16666\/centos\/$releasever\/updates\/$basearch\/\r\n http:\/\/192.168.100.100:16666\/centos\/$releasever\/updates\/$basearch\/\r\n# http:\/\/mirrors.cloud.aliyuncs.com\/centos\/$releasever\/updates\/$basearch\/\r\ngpgcheck=1\r\ngpgkey=http:\/\/192.168.100.100:16666\/centos\/RPM-GPG-KEY-CentOS-7\r\n\r\n#additional packages that may be useful\r\n[extras]\r\nname=CentOS-$releasever - Extras - 192.168.100.100:16666\r\nfailovermethod=priority\r\nbaseurl=http:\/\/192.168.100.100:16666\/centos\/$releasever\/extras\/$basearch\/\r\n http:\/\/192.168.100.100:16666\/centos\/$releasever\/extras\/$basearch\/\r\n# http:\/\/mirrors.cloud.aliyuncs.com\/centos\/$releasever\/extras\/$basearch\/\r\ngpgcheck=1\r\ngpgkey=http:\/\/192.168.100.100:16666\/centos\/RPM-GPG-KEY-CentOS-7\r\n#additional packages that extend functionality of existing packages\r\n[centosplus]\r\nname=CentOS-$releasever - Plus - 192.168.100.100:16666\r\nfailovermethod=priority\r\nbaseurl=http:\/\/192.168.100.100:16666\/centos\/$releasever\/centosplus\/$basearch\/\r\n http:\/\/192.168.100.100:16666\/centos\/$releasever\/centosplus\/$basearch\/\r\n# http:\/\/mirrors.cloud.aliyuncs.com\/centos\/$releasever\/centosplus\/$basearch\/\r\ngpgcheck=1\r\nenabled=0\r\ngpgkey=http:\/\/192.168.100.100:16666\/centos\/RPM-GPG-KEY-CentOS-7\r\n\r\n#contrib - packages by Centos Users\r\n[contrib]\r\nname=CentOS-$releasever - Contrib - 192.168.100.100:16666\r\nfailovermethod=priority\r\nbaseurl=http:\/\/192.168.100.100:16666\/centos\/$releasever\/contrib\/$basearch\/\r\n http:\/\/192.168.100.100:16666\/centos\/$releasever\/contrib\/$basearch\/\r\n http:\/\/mirrors.cloud.aliyuncs.com\/centos\/$releasever\/contrib\/$basearch\/\r\ngpgcheck=1\r\nenabled=0\r\ngpgkey=http:\/\/192.168.100.100:16666\/centos\/RPM-GPG-KEY-CentOS-7\r\n<\/pre>\n\u6e05\u7406yum\u7f13\u5b58<\/p>\n
\r\nyum clean all\r\n<\/pre>\n\u6d4b\u8bd5<\/p>\n
\r\nyum list\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"\u670d\u52a1\u7aef\u914d\u7f6enginx\u4ee3\u7406 server{ listen 16666; server_name _; add_h […]<\/p>\n","protected":false},"author":1903,"featured_media":254725,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-254723","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/254723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1903"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=254723"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/254723\/revisions"}],"predecessor-version":[{"id":254724,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/254723\/revisions\/254724"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/254725"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=254723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=254723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=254723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}