Terminal proxy agent configuration on Linux systems

I. Introduction

1, the work sometimes encounter problems need to download the software over the wall, this time on the use of the forward proxy.
2, configure forward proxy server is relatively simple description will not be repeated here, want to know can see the author of another article "nginx forward proxy configuration", perform only the configuration of the terminal agent explained here.

Second, the terminal agent configuration

  • Configure the proxy variable

  • Variable setting method
    1, in the / etc / profile file
    2, in ~ / .bashrc
    . 3, a file in a new folder /etc/profile.d/ xxx.sh
    written as follows:
export proxy="http://10.20.56.32:8000"
export http_proxy=$proxy
export https_proxy=$proxy
export ftp_proxy=$proxy
export no_proxy="localhost, 127.0.0.1, ::1"
  • Cancel method settings
shell> unset http_proxy
shell> unset https_proxy
shell> unset ftp_proxy
shell> unset no_proxy

Third, over time

  • Acting individually configure yum
shell> echo "proxy=http://10.20.57.32:8080/" >> /etc/yum.conf
  • php-fpm default http / https proxy environment variable does not modify the method of loading system
# 添加php-ftpm关于env的如下配置,然后重启php-fpm服务。
env[http_proxy] = "http_proxy=http://1.1.1.1:8082" 
env[https_proxy] = "https_proxy=http://1.1.1.1:8082"
env[no_proxy] = "a.test.com,127.0.0.1,2.2.2.2"
  • subversion Proxy Server Configuration
# 修改$HOME/.subversion/servers文件,在此文件的[global]段加上:
http-proxy-host = 192.168.1.1
http-proxy-port = 8080 
http-proxy-username = 91donkey
http-proxy-password = 123456 
  • Other supports http / https proxy Forward proxy software
    nginx
    tinyproxy (simple, supports http / https protocol)
    Squid (stable simple, supports http / https protocol)
  • squid 3.x forward proxy proxy configuration
shell> cat /etc/squid/squid.conf
http_access allow all
http_port 8443
cache deny all

Guess you like

Origin www.cnblogs.com/91donkey/p/11640079.html