{"id":493,"date":"2016-10-17T20:57:35","date_gmt":"2016-10-17T20:57:35","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2016\/10\/17\/configuring-web-proxy-on-centos\/"},"modified":"2018-09-25T08:56:13","modified_gmt":"2018-09-25T08:56:13","slug":"configuring-web-proxy-on-centos","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/configuring-web-proxy-on-centos\/","title":{"rendered":"How to Configure Web Proxy on CentOS | Tutorials | scmGalaxy"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2953 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2016\/10\/configuring-web-proxy-on-ce.png\" alt=\"web-proxy-on-centos\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2016\/10\/configuring-web-proxy-on-ce.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2016\/10\/configuring-web-proxy-on-ce-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>If your internet connection is behind a web proxy, you need to configure the following on your CentOS server:<\/p>\n<p>System-wide proxy settings &#8211; add the following lines to your \/etc\/environment file:<\/p>\n<p><code># vi \/etc\/environment<\/code><\/p>\n<p>http_proxy=&#8221;http:\/\/proxysrv:8080\/&#8221;<br \/>\nhttps_proxy=&#8221;https:\/\/proxysrv:8080\/&#8221;<br \/>\nftp_proxy=&#8221;ftp:\/\/proxysrv:8080\/&#8221;<br \/>\nno_proxy=&#8221;.mylan.local,.domain1.com,host1,host2&#8243;<\/p>\n<p>To apply these settings without restarting the machine run the following commands on the bash shell:<\/p>\n<p><code>export http_proxy=\"http:\/\/proxysrv:8080\/\"<br \/>\nexport https_proxy=\"https:\/\/proxysrv:8080\/\"<br \/>\nexport ftp_proxy=\"ftp:\/\/proxysrv:8080\/\"<br \/>\nexport no_proxy=\".mylan.local,.domain1.com,host1,host2\"<\/code><\/p>\n<p>You also need to configure yum:<\/p>\n<p># vi \/etc\/yum.conf<\/p>\n<p>proxy=http:\/\/proxysrv:8080\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your internet connection is behind a web proxy, you need to configure the following on your CentOS server: System-wide proxy settings &#8211; add the following lines to your \/etc\/environment&#8230; <\/p>\n","protected":false},"author":1,"featured_media":2953,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4957],"tags":[535,817,254,815,545,816,814],"class_list":["post-493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-centos","tag-centos-proxy-configuration","tag-configure","tag-configure-web-proxy-on-centos","tag-how","tag-proxy-on-centos","tag-web-proxy"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":2955,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/493\/revisions\/2955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/2953"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}