4
启用EPEL源并为yum操作设置代理服务器的方法
source link: https://www.lujun9972.win/blog/2018/09/02/%E5%90%AF%E7%94%A8epel%E6%BA%90%E5%B9%B6%E4%B8%BAyum%E6%93%8D%E4%BD%9C%E8%AE%BE%E7%BD%AE%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E6%96%B9%E6%B3%95/index.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
启用EPEL源并为yum操作设置代理服务器的方法
配置EPEL源
EPEL是Fedora社区打造的为RHEL及衍生发行版提供高质量软件包的项目。
在RHEL7上安装EPEL非常简单,只需要执行
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
但是EPEL上的软件包是未经RedHat验证的,一般不推荐从这上面安装,因此我们一般默认禁用该仓库
sudo sed -i -e "s/enabled = 1/enabled = 0/g" /etc/yum.repos.d/epel.repo
之后要从EPEL中安装软件包可以使用yum的 enablerepo
参数来临时启用
sudo yum --enablerepo=epel install nmap
为yum操作设定代理服务器
使用全局代理
要为所有yum操作设置代理服务期,可以在 /etc/yum.conf
中设置代理服务器信息
proxy=http://proxy.domain.com:3128 proxy_username=proxy_user proxy_password=proxy_password
为某个用户配置代理
为单个用户设置yumd代理,只需要设置过 http_proxy
或 https_proxy
这两个环境变量即可
http_proxy="http://user:[email protected]:3128" export http_proxy
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK