您的位置:时时app平台注册网站 > 时时app平台注册网站 > Linux Fedora 14下采用代理时yum命令失效问题解决方

Linux Fedora 14下采用代理时yum命令失效问题解决方

2019-11-28 03:43

#baseurl= metalink=

Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates-released . Please verify its path and try again。

[fedora-dvd]

ping baidu.com没问题,curl 1 重临源代码

(3)设置/etc/yum.conf文件,增添清水蓝部分

enable=1

HTTP_PROXY=''

(4)设置网卡的域名服务器ifcfg-eth0

baseurl=file:///mnt/fedora-dvd/

declare -x FTP_PROXY=''

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=
baseurl=
#mirrorlist=
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=
mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

        C:Userswuchan4xDocumentsOS issueFedora-infofedora.repo

(1)修改/etc/yum.repos.d下面的Fedora.repo如下:

补充知识
IP地址配置
#setup(配置IP卡塔尔-->查看 /etc/sysconfig/network-scripts/ifcfg-eth0中的ONBOOT是还是不是等于yes--->#service network restart(重启互联网服务卡塔 尔(英语:State of Qatar)

add proxy=

错误:

网络yum源/etc/yum.repos.d/fedora.repo(Fedora)
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=
mirrorlist=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

    3.得到网关:route Destination:default Gateway:10.240.176.0

#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

#vim dvd.repo

1.vim /etc/dnf/dnf.conf

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
~   

  1. 设置yum

dnf设置代理:dnf.conf

[updates-debuginfo]
name=Fedora $releasever - $basearch - Updates - Debug
failovermethod=priority
#baseurl=
baseurl=
#mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

name=Fedora DVD $releasever - $basearch

skip_if_unavailable=False

时时app平台注册网站 1

gpgcheck=1

nameserver 10.239.27.36

[updates-source]
name=Fedora $releasever - Updates Source
failovermethod=priority
#baseurl=
baseurl=
#mirrorlist=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=
mirrorlist=
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

gpgcheck=1

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
color=never
proxy=    (笔者的代办ip和端口号卡塔尔

改进dvd.repo里的源委如下:

急需禁止使用掉二个网卡,ifconfig eno2 down

DEVICE=eth0
HWADDR=00:18:7D:08:CB:F0
NM_CONTROLLED=yes
ONBOOT=yes
IPADDR=192.168.3.253
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.3.1
IPV6INIT=no
USERCTL=no
PREFIX=24
DNS1=XXX.XXX.XXX.XXX

在没有联网的时候,能够用光盘yum源
光盘yum源的搭建步骤
1.挂载光盘
#mount  /dev/cdrom /dev/cdrom
或#mount /dev/sr0 /dev/cdrom

2.设置DNS,要不然不能够透过域名访谈地址

vim /etc/sysconfig/network-scripts/ifcfg-eth0

说明
[fedora]  容器名称,必定要放在[]中
name      容器表明
mirrorlist  镜像站点,能够注释掉
baseurl     yum源服务器的地址,暗中认可是法定的yum源服务器,是能够利用的,也能够改成团结中意的yum源地址
enabled     =1容器生效,=0容器不奏效
gpgcheck    rpm的数字证书,=1生效,=0不见到成效
gpgkey      数字证书的公钥文件保留地方。不用修改

IPV6_DEFROUTE=yes

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=
baseurl=
#mirrorlist=
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

#yum groupremove 软件组名
卸载钦点的软件组

failovermethod=priority

[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
#baseurl=
baseurl=
#mirrorlist=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

#yum grouplist 软件组名
设置钦点的软件组(组名之间有空格用""卡塔尔

vi /etc/yum.repos.d/fedora.repo

下一场就能够#yum install 了~        

gpgkey=file:///mnt/fedora-dvd/RPM-GPG-KEY-fedora

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=
metalink=
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

(2)修改et c/yum.repos.d下面的fedora-updates.repo 如下:

#yum -y install 包名
    install 安装
    -y   自动回答yes
安装软件包

DNS=10.248.2.5

[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=
baseurl=
#mirrorlist=
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

#cp fedora.repo dvd.repo

#baseurl= metalink=

常用yum命令
#yum list
查询全部可用软件包列表

1.vim /etc/dnf/dnf.conf (永久)

意气风发经连接互联网就足以应用在线的yum源,不用配置本地yum源

epo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

#cd /etc/yum.repo.d/

    1.运维网卡:ifconfig eno1 up |ifup eno1

#yum -y update 包名
    update 升级
    -y   自动回答yes
进步软件包

             :/C:Userswuchan4xDocumentsOS issueFedora-infoifcfg-eno1

#yum search 包名
追寻服务器上独具和根本字相关的包

[fedora] name=Fedora $releasever - $basearch

#yum -y remove 包名
    remove  卸载
    -y   自动回答yes

3.重启互联网服务

yum实际上是治本的rpm软件包

installonly_limit=3

yum软件组管理命令
#yum grouplist
列出富有可用的软件组列表

DEFROUTE=yes

局域网之间的拜候:IP,子网掩码
互连网之间的拜候:IP,子网掩码,网关,DNS

1.设置ip

metadata_expire=7d

NETMASK=255.255.255.128

 

网关设置:resolv.conf

IPV4_FAILURE_FATAL=no

DNS=172.17.6.9

name=Fedora $releasever - $basearch - Debug

 

search icx.intel.com

安装镜像源

metadata_expire=7d

#vim ~/.bashrc

2.export http_proxy= (临时)

    2.查看eno1状态:ethtool eno1

 

2.service network restart

Error: Failed to synchronize cache for repo 'fedora' --不可能连特殊的网址

resolve:

配置代理:proxy

service network restart

proxy_username=root

[fedora-debuginfo]

欣逢的难题:

type=rpm

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

镜像源设置:fedora.repo

去除增多的:FTP_PROXY=''

TYPE=Ethernet

nameserver 172.17.6.9

clean_requirements_on_remove=True

 

PEERROUTES=yes

nameserver 10.248.2.5

repo_gpgcheck=0

    4.布置静态ip:vi /etc/sysconfig/network-scripts/ifcfg-eno1

    C:Userswuchan4xDocumentsOS issueFedora-inforesolv.conf

[main]

DNS=10.239.27.36

添加ip地址:

ifcfg-eno1

        C:Userswuchan4xDocumentsOS issueFedora-infodnf.conf

$ vim /etc/resolv.conf

IPV6_AUTOCONF=yes

failovermethod=priority

 

GATEWAY=10.240.176.129

HWADDR=0c:c4:7a:64:96:d6

dnf -y update

scp传输时如下报错

r

NAME=enp5s0f0

当同一时间拉开2个网卡时,ethtool eno1 && eno2 :link yes 会诱致力不胜任上网

enabled=1

 

ONBOOT=yes

BOOTPROTO=static

PEERDNS=yes

gpgcheck=1

 

proxy_password=tester

IPADDR=10.240.176.254

IPV6INIT=yes

HTTPS_PROXY=''

IPV6_ADDR_GEN_MODE=stable-privacy

开机自动配置Ip

enabled=0

proxy=

IPV6_PEERDNS=yes

IPV6_PEERROUTES=yes

IPV6_FAILURE_FATAL=no

Fedora 28

 

本文由时时app平台注册网站发布于时时app平台注册网站,转载请注明出处:Linux Fedora 14下采用代理时yum命令失效问题解决方

关键词: