在yum.conf中设置代理

我想知道,如何在 yum.conf 文件中设置代理-我在 yum.conf 文件中指定了代理

我想知道,如何在 yum.conf 文件中设置代理-我在 yum.conf 文件中指定了代理

proxy=http://username:Password@10.203.190.5:80

这是正确的方法吗?

如果是的话,我仍然在“百胜更新”收到错误

[root@localhost ~]# yum update
Loaded plugins: langpacks, presto, refresh-packagekit
http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found :             http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/i386/os/repodata/repomd.xml
Trying other mirror.
Error: failure: repodata/repomd.xml from fedora: [Errno 256] No more mirrors    to try.
http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/i386/os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/i386/os/repodata/repomd.xml

我试着在 bash 上设置代理,仍然得到同样的错误。

export http_proxy="http://username:Password@10.203.190.5:80"
export https_proxy="http://username:Password@10.203.190.5:80"

请帮忙。

提前谢谢。

3

我如何拥有它和它的工作原理

in/etc/yum.conf
proxy=http://proxy_host:proxy_port
proxy_username=proxy_username
proxy_password=proxy_password
1

实际上在 Fedora 18 中,我发现 baseurl 是不可访问的。我在 fedora.repo & amp;fedora-updates.repo 中更改了 baseurl。

fedora.repo-

baseurl=https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/18/Everything/i386/os/
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
baseurl=https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/18/Everything/i386/debug
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
baseurl=https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/18/Everything/source/SRPMS/
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/

fedora-updates.repo-

baseurl=https://dl.fedoraproject.org/pub/archive/fedora/linux/updates/18/$basearch/
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/
baseurl=https://dl.fedoraproject.org/pub/archive/fedora/linux/updates/18/$basearch/debug/
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/debug/
baseurl=https://dl.fedoraproject.org/pub/archive/fedora/linux/updates/18/SRPMS/
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/SRPMS/

经过这些更改后,yum update正常工作。

谢谢

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(754)
C#从XE获取当前汇率
上一篇
FastAPI中的会话
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(20条)