Redhat 用代理连外网

设置

/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

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包

yum

 
sudo –s
yum install java-1.7.0-openjdk --nogpgcheck

不加nogpgcheck,会出现下面的错误:

Downloading Packages:

java-1.7.0-openjdk-1.7.0.9-2.3.4.1.el6_3.x86_64.rpm                                       |  25 MB     00:08

warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY

Public key for java-1.7.0-openjdk-1.7.0.9-2.3.4.1.el6_3.x86_64.rpm is not installed

上一篇:JavaWeb——关于RequestDispatcher的原理


下一篇:回车键转tab键解决方案一