Redhat 用代理连外网

来源:互联网 发布:linux由sql server吗 编辑:程序博客网 时间:2024/06/05 09:19

设置

/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包  

0 0
原创粉丝点击