{"id":421,"date":"2013-07-13T10:27:31","date_gmt":"2013-07-13T10:27:31","guid":{"rendered":"https:\/\/shan.info\/new\/centos%e4%b8%ad%e8%ae%be%e7%bd%ae%e7%b3%bb%e7%bb%9f%e7%ba%a7%e4%bb%a3%e7%90%86\/"},"modified":"2013-07-13T10:27:31","modified_gmt":"2013-07-13T10:27:31","slug":"centos%e4%b8%ad%e8%ae%be%e7%bd%ae%e7%b3%bb%e7%bb%9f%e7%ba%a7%e4%bb%a3%e7%90%86","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/centos%e4%b8%ad%e8%ae%be%e7%bd%ae%e7%b3%bb%e7%bb%9f%e7%ba%a7%e4%bb%a3%e7%90%86\/","title":{"rendered":"CentOS\u4e2d\u8bbe\u7f6e\u7cfb\u7edf\u7ea7\u4ee3\u7406"},"content":{"rendered":"<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\"><strong style=\"margin: 0px auto;\">YUM\u4ee3\u7406\u8bbe\u7f6e<\/strong><\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u7f16\u8f91\/etc\/yum.conf\uff0c\u5728\u6700\u540e\u52a0\u5165<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\"># Proxy<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">proxy=<a href=\"http:\/\/usernamepassword\">http:\/\/username:password<\/a>@proxy_ip:port\/<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u4e5f\u53ef\u4ee5\u4f7f\u7528proxy_username\u548cproxy_password\u6765\u914d\u7f6e\u4ee3\u7406\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u8fd9\u6837\u7684\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u6240\u6709\u7684\u7528\u6237\u5728\u4f7f\u7528yum\u65f6\uff0c\u90fd\u4f1a\u4f7f\u7528\u4ee3\u7406\uff0c\u53ef\u4ee5\u8bf4\u662f\u5168\u5c40\u4ee3\u7406\u3002<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u5982\u679c\u9700\u8981\u4e3a\u5355\u72ec\u7684\u7528\u6237\u914d\u7f6e\u4ee3\u7406\uff0c\u53ef\u4ee5\u5728\u7528\u6237\u7684~\/.bash_profile\u4e2d\u8bbe\u7f6e\u3002<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\"><strong style=\"margin: 0px auto;\">Wget\u7684\u4ee3\u7406\u8bbe\u7f6e<\/strong><\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u7f16\u8f91\/etc\/wgetrc\uff0c\u5728\u6700\u540e\u52a0\u5165<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\"># Proxy<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">http_proxy=<a href=\"http:\/\/usernamepassword\">http:\/\/username:password<\/a>@proxy_ip:port\/<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">ftp_proxy=<a href=\"http:\/\/usernamepassword\">http:\/\/username:password<\/a>@proxy_ip:port\/<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\"><strong style=\"margin: 0px auto;\">\u7cfb\u7edf\u5168\u5c40\u4ee3\u7406<\/strong><\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u5982\u679c\u9700\u8981\u4e3a\u67d0\u4e2a\u7528\u6237\u8bbe\u7f6e\u4e00\u4e2a\u7cfb\u7edf\u7ea7\u7684\u4ee3\u7406\uff0c\u53ef\u4ee5\u5728~\/.bash_profile\u4e2d\u8bbe\u7f6e\uff1a<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">http_proxy=&#8221;http:\/\/username:<a href=\"mailto:password@proxy_ip:port\">password@proxy_ip:port<\/a>&#8220;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">export_http_proxy<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">&nbsp;<\/div>\n<div style=\"margin: 0px auto; font-size: 12px; line-height: 18px; font-family: Arial;\">\u4e0a\u9762\u7684\u8bbe\u7f6e\u53ea\u5bf9\u67d0\u4e2a\u7528\u6237\u751f\u6548\uff0c\u5982\u679c\u8981\u5bf9\u6240\u6709\u7cfb\u7edf\u7528\u6237\u751f\u6548\uff0c\u5199\u5728\/etc\/profile\u4e2d\u5c31\u53ef\u4ee5\u4e86\u3002<\/div>\n","protected":false},"excerpt":{"rendered":"<p>YUM\u4ee3\u7406\u8bbe\u7f6e &nbsp; \u7f16\u8f91\/etc\/yum.conf\uff0c\u5728\u6700\u540e\u52a0\u5165 # Proxy proxy=http:\/\/username:password@proxy_ip:port\/ &nbsp; \u4e5f\u53ef\u4ee5\u4f7f\u7528proxy_username\u548cproxy_password\u6765\u914d\u7f6e\u4ee3\u7406\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801 &nbsp; \u8fd9\u6837\u7684\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u6240\u6709\u7684\u7528\u6237\u5728\u4f7f\u7528yum\u65f6\uff0c\u90fd\u4f1a\u4f7f\u7528\u4ee3\u7406\uff0c\u53ef\u4ee5\u8bf4\u662f\u5168\u5c40\u4ee3\u7406\u3002 &nbsp; \u5982\u679c\u9700\u8981\u4e3a\u5355\u72ec\u7684\u7528\u6237\u914d\u7f6e\u4ee3\u7406\uff0c\u53ef\u4ee5\u5728\u7528\u6237\u7684~\/.bash_profile\u4e2d\u8bbe\u7f6e\u3002 &nbsp; Wget\u7684\u4ee3\u7406\u8bbe\u7f6e &nbsp; \u7f16\u8f91\/etc\/wgetrc\uff0c\u5728\u6700\u540e\u52a0\u5165 # Proxy http_proxy=http:\/\/username:password@proxy_ip:port\/ ftp_proxy=http:\/\/username:password@proxy_ip:port\/ &nbsp; \u7cfb\u7edf\u5168\u5c40\u4ee3\u7406 &nbsp; \u5982\u679c\u9700\u8981\u4e3a\u67d0\u4e2a\u7528\u6237\u8bbe\u7f6e\u4e00\u4e2a\u7cfb\u7edf\u7ea7\u7684\u4ee3\u7406\uff0c\u53ef\u4ee5\u5728~\/.bash_profile\u4e2d\u8bbe\u7f6e\uff1a &nbsp; http_proxy=&#8221;http:\/\/username:password@proxy_ip:port&#8220; export_http_proxy &nbsp; \u4e0a\u9762\u7684\u8bbe\u7f6e\u53ea\u5bf9\u67d0\u4e2a\u7528\u6237\u751f\u6548\uff0c\u5982\u679c\u8981\u5bf9\u6240\u6709\u7cfb\u7edf\u7528\u6237\u751f\u6548\uff0c\u5199\u5728\/etc\/profile\u4e2d\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-centos-6"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}