安装devstack之配置proxy

Ubuntu 版本:Ubuntu 12.04.5 LTS

 

配置环境变量

$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
export http_proxy=http://10.0.0.2:3128
export https_proxy=https://10.0.0.2:3128

配置apt.conf

$cat /etc/apt/apt.conf
Acquire::http::proxy "http://10.0.0.2:3128/";
Acquire::https::proxy "https://10.0.0.2:3128/";
Acquire::ftp::proxy "ftp://10.0.0.2:3128/";


配置git

git config --global http.proxy http://10.0.0.2:3128/
git config --global core.gitproxy gitproxy


sudo vim /usr/bin/gitproxy
====================================
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny

# Configuration. Common proxy ports are 3128, 8123, 8000.
_proxy=10.0.0.2
_proxyport=3128

exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport
====================================
sudo chmod +x /usr/bin/gitproxy

 

代理服务器
squid.conf新增(注意位置)

acl git port 9418
http_access allow git

转载于:https://www.cnblogs.com/4admin2root/p/3938900.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值