设置
/etc/yum.conf
添加
proxy=http://web-proxy.corp.xx.com:8080
/etc/yum.repos.d/rhel-source.repo
里面改成enable=1 gpgcheck=0
然后再/etc/yum.repos.d下增加一个文件hp-coe.repo
vi hp-coe.repo
# base
[RedHat-6.5Server-x86_64-Server]
name=RedHat Linux 6.4Server - os - x86_64 - Server
baseurl=http://linuxcoe.austin.xx.com/LinuxCOE/RedHat-yum/6.4Server/en/os/x86_64/Server
wget
wget -e "http_proxy=http://web-proxy.corp.xx.com:8080" http://xxx
rpm
sudo rpm --httpproxy "http_proxy=http://web-proxy.corp.xx.com:8080" --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
egg:
sudo rpm -Uvh https://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm --httpproxy "http://10.73.18.11:8888"
git
Git下针对http使用proxy
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
git clone git://eagain.net/gitosis.git
会出现错误的。
*****************************************************************
root@root-justin:~# git clone git://eagain.net/gitosis.git
Initialized empty Git repository in /root/gitosis/.git/
eagain.net[0: 208.78.102.120]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
使用 git clone https://github.com/res0nat0r/gitosis.git
可以实现clone gitosis包