CentOS下设置yum代理
分类:CentOS教程 阅读:17870 次
学校环境下上网需要设置代理服务器。所以新安装的CentOS无法使用yum和wget等进行操作。现把自己的配置设置显示如下:
网络上面的英文的配置资料如下:
Using yum with a proxy server---------------------------------------
To enable yum operations to use a proxy server you should first add the following parameter to /etc/yum.conf这个是配置代理网络之后的yum的设定
proxy=http://yourproxy:8080/
编辑/etc/yum.conf文件
这个是我们我的具体的代理的设定:在yum.conf文件的最后一行添加如下所示:
有#的是注释行 起说明作用 方便我们自己了解这行的作用
where yourproxy is the name of the proxy server you want to access and 8080 is the proxy port. If the server requires authentication you can specify the login credentials like:
proxy=http://username:password@yourproxy:8080/
---------------------------------------
The rpm package manager makes use of the proxy environment variable. This can be set system wide in /etc/profile or user specific in ~/.bash_profile::
export http_proxy=http://yourproxy:8080/
export ftp_proxy=http://yourproxy:8080/
---------------------------------------
To use wget throug a proxy server add the following lines to /etc/wgetrc这个是配置代理网络之后的wget的设定
http_proxy = http://yourproxy:8080/
ftp_proxy = http://yourproxy:8080/
热门推荐
- CentOS下限制ssh登录用户
- CentO下限制SSH登录次数
- 如何把一个用户加入sodu组
- 定时自动启动任务crontab命令用法
- nginx禁止IP访问跳到指定页面
- CentOS 6.3配置本地yum源
- CentOS 6.3双网卡绑定教程
- CentOS下Vim加密解密文本
- CentOS系统下几个特别有用的设备文件
- Linux终端:用cat命令查看不可见字符
- centos vps修改时间及时区不同步的解决方案
- CentOS 和RedHat内核版本对应表
- 详解Centos开机自动启动SVN原理
- CentOS服务器里Nginx查看搜索引擎蜘蛛爬虫的行为
- CentOS下误删除文件(rm -rf)的恢复
- CentOS下查看以及修改文件权限
- CentOS网卡绑定实现
- CentOS服务程序性能评估文档
- CentOS下恢复被误删除的oracle数据文件
- 实用防火墙(Iptables)脚本分析