澳门新浦京娱乐场网站-www.146.net-新浦京娱乐场官网
做最好的网站

澳门新浦京娱乐场网站8下yum源的主题材料,Lin

Fedora 28

错误:

yum实际上是管理的rpm软件包

我喜欢的Fedora 8终于来了,好高兴啊.

1)先删除/etc/yum.repos.d/下的所有文件

开机自动配置Ip

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

只要连接网络就可以使用在线的yum源,不用配置本地yum源

[root@bluemoon yum.repos.d]# yum install yumex
Could not retrieve mirrorlist was
[Errno 14] HTTP Error 404: Not Found
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

2)添加上海交大源,将以下内容保存为 /etc/yum.repos.d/sjtu.repo

[Fedora-ftp.sjtu.edu.cn]
name=Fedora 16 – i386
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[Everything-ftp.sjtu.edu.cn]
name=Everything 16 – i386
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[updates-ftp.sjtu.edu.cn]
name=Fedora updates
baseurl=
enabled=1
gpgcheck=0

1.设置ip

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

网络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

Fedora 8自带的yum的源无法使用

3)添加163源,将以下内容保存为 /etc/yum.repos.d/163.repo

[Fedora-mirrors.163.com]
name=Fedora 16 – i386
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[Everything-mirrors.163.com]
name=Everything 16 – i386
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[updates-mirrors.163.com]
name=Fedora updates
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

    1.启动网卡:ifconfig eno1 up |ifup eno1

[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

[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

配置信息。

4)添加搜狐源 将以下内容保存为/etc/yum.repos.d/fedora-sohu.repo

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

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

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

    2.查看eno1状态:ethtool eno1

[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

[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

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

将以下内容保存为/etc/yum.repos.d/fedora-updates-sohu.repo

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

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

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

    3.获取网关:route Destination:default Gateway:10.240.176.0

[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]  容器名称,一定要放在[]中
name      容器说明
mirrorlist  镜像站点,可以注释掉
baseurl     yum源服务器的地址,默认是官方的yum源服务器,是可以使用的,也可以改成自己喜欢的yum源地址
enabled     =1容器生效,=0容器不生效
gpgcheck    rpm的数字证书,=1生效,=0不生效
gpgkey      数字证书的公钥文件保存位置。不用修改

[澳门新浦京娱乐场网站8下yum源的主题材料,Linux的yum源的配备。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

5)在终端里依次运行yum clean all 和yum makecache即可

澳门新浦京娱乐场网站 1

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

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

常用yum命令
#yum list
查询所有可用软件包列表

[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

             :/C:Userswuchan4xDocumentsOS issueFedora-infoifcfg-eno1

[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 search 包名
搜索服务器上所有和关键字相关的包

[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

2.设置DNS,要不然不能通过域名访问地址

[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

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

/etc/yum.repos.d/fedora-updates.repo

$ vim /etc/resolv.conf

[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

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

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

    C:Userswuchan4xDocumentsOS issueFedora-inforesolv.conf

(3)设置/etc/yum.conf文件,添加红色部分

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

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

3.重启网络服务

[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和端口号)

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

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

service network restart

#  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

#yum grouplist 软件组名
安装指定的软件组(组名之间有空格用"")

澳门新浦京娱乐场网站 2

 

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

#yum groupremove 软件组名
卸载指定的软件组

设置镜像源

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

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

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

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

  1. 设置yum

        C:Userswuchan4xDocumentsOS issueFedora-infofedora.repo

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

#cd /etc/yum.repo.d/

配置代理:proxy

然后就可以#yum install 了~        

#cp fedora.repo dvd.repo

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

澳门新浦京娱乐场网站 3

#vim dvd.repo

        C:Userswuchan4xDocumentsOS issueFedora-infodnf.conf

修改dvd.repo里的内容如下:

2.export http_proxy= (临时)

[fedora-dvd]

 

name=Fedora DVD $releasever - $basearch

遇到的问题:

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

ping baidu.com没问题,curl 1 返回源代码

enable=1

dnf -y update

gpgcheck=1

Error: Failed to synchronize cache for repo 'fedora' --无法连特殊的网站

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

resolve:

补充知识
IP地址配置
#setup(配置IP)-->查看 /etc/sysconfig/network-scripts/ifcfg-eth0中的ONBOOT是否等于yes--->#service network restart(重启网络服务)

1.vim /etc/dnf/dnf.conf

局域网之间的访问:IP,子网掩码
互联网之间的访问:IP,子网掩码,网关,DNS

add proxy=

proxy_username=root

proxy_password=tester

2.service network restart

当同时开启2个网卡时,ethtool eno1 && eno2 :link yes 会导致无法上网

需要禁用掉一个网卡,ifconfig eno2 down

 

scp传输时如下报错

declare -x FTP_PROXY=''

#vim ~/.bashrc

删除添加的:FTP_PROXY=''

HTTP_PROXY=''

HTTPS_PROXY=''

 

添加ip地址:

ifcfg-eno1

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

NAME=enp5s0f0

ONBOOT=yes

TYPE=Ethernet

BOOTPROTO=static

IPADDR=10.240.176.254

NETMASK=255.255.255.128

GATEWAY=10.240.176.129

DNS=10.239.27.36

DNS=10.248.2.5

DNS=172.17.6.9

DEFROUTE=yes

PEERDNS=yes

PEERROUTES=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_PEERDNS=yes

IPV6_PEERROUTES=yes

IPV6_FAILURE_FATAL=no

IPV6_ADDR_GEN_MODE=stable-privacy

 

镜像源设置:fedora.repo

[fedora] name=Fedora $releasever - $basearch

failovermethod=priority

#baseurl= metalink=

enabled=1

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

[fedora-debuginfo]

name=Fedora $releasever - $basearch - Debug

failovermethod=priority

#baseurl= metalink=

enabled=0

metadata_expire=7d

r

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

 

[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

 

网关设置:resolv.conf

search icx.intel.com

nameserver 10.248.2.5

nameserver 10.239.27.36

nameserver 172.17.6.9

dnf设置代理:dnf.conf

[main]

gpgcheck=1

installonly_limit=3

clean_requirements_on_remove=True

proxy=

 

本文由澳门新浦京娱乐场网站发布于澳门新浦京娱乐场网站,转载请注明出处:澳门新浦京娱乐场网站8下yum源的主题材料,Lin