Redhat 用代理连外网

本文介绍了如何在Linux系统中配置YUM源及其代理设置,包括编辑配置文件、启用源、添加新的YUM仓库以及设置wget、rpm和git等工具的代理。通过这些步骤,可以有效地解决因网络限制导致的软件安装和更新问题。
摘要由CSDN通过智能技术生成

设置

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

智能体格

你的鼓将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值