全局代理配置 vi /etc/profile 添加下面内容 http_proxy = http://username:password@yourproxy:8080https_proxy=http:/
全局代理配置
vi /etc/profile
添加下面内容
http_proxy = http://username:password@yourproxy:8080https_proxy=http://username:[email protected]:8080ftp_proxy = http://username:password@yourproxy:8080export http_proxyexport ftp_proxy
Yum的代理配置
vi /etc/yum.conf
添加下面内容
proxy=http://yourproxy:8080proxy_username=usernameproxy_password=password
Wget代理配置
vi /etc/wgetrc
添加下面内容
http_proxy=http://username:password@proxy_ip:port/ftp_proxy=http://username:password@proxy_ip:port/
Git代理配置
git config --global http.proxy http://username:[email protected]:8080git config --global https.proxy http://username:[email protected]:8080
Maven代理设置
$ vim /usr/local/apache-maven-3.5.0/con/settings.xml 在proxys节点下添加 <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>proxyuser</username> <password>proxypass</password> <host>proxy.host.net</host> <port>80</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> id:代理的名称(随便设,XYZ也行) active:表示该代理是否激活 protocol:代理协议,这个不用改 username:当代理需要认证时的用户名 password:当代理需要认证时的密码 host:代理的IP地址 port:代理的端口号 nonProxyHost:指定不需要使用代理的主机,可不设置。如果有多个,用 | 分隔
Gradle代理设置
$ cd ~/.gradle/$ vim gradle.properties #创建gradle.properties文件,并添加一下内容: systemProp.http.proxyHost=172.25.14.13 systemProp.http.proxyPort=8080 systemProp.http.proxyUser=username systemProp.http.proxyPassword=password systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost systemProp.https.proxyHost=172.25.14.13 systemProp.https.proxyPort=8080 systemProp.https.proxyUser=username systemProp.https.proxyPassword=password systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
NPM代理设置
$ npm config set proxy http://username:password@server:port$ npm config set https-proxy http://username:pawword@server:port