码迷,mamicode.com
首页 > 其他好文 > 详细

Fedora 配置

时间:2018-06-29 11:09:04      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:etc   star   otp   无法上网   load   out   ror   date   port   

Fedora 28

开机自动配置Ip

1.设置ip

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

    2.查看eno1状态:ethtool eno1

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

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

             :/C:\Users\wuchan4x\Documents\OS issue\Fedora-info\ifcfg-eno1

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

$ vim /etc/resolv.conf

    C:\Users\wuchan4x\Documents\OS issue\Fedora-info\resolv.conf

3.重启网络服务

service network restart

 

设置镜像源

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

        C:\Users\wuchan4x\Documents\OS issue\Fedora-info\fedora.repo

配置代理:proxy

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

        C:\Users\wuchan4x\Documents\OS issue\Fedora-info\dnf.conf

2.export http_proxy=http://proxy-prc.intel.com:911 (临时)

 

遇到的问题:

ping baidu.com没问题,curl 1https://www.baidu.com 返回源代码

dnf -y update

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

resolve:

1.vim /etc/dnf/dnf.conf

add proxy=http://proxy-prc.intel.com:911

proxy_username=root

proxy_password=tester

2.service network restart

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

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

 

scp传输时如下报错

declare -x FTP_PROXY=‘http://proxy-prc.intel.com:911‘

#vim ~/.bashrc

删除添加的:FTP_PROXY=‘http://proxy-prc.intel.com:911‘

HTTP_PROXY=‘http://proxy-prc.intel.com:911‘

HTTPS_PROXY=‘http://proxy-prc.intel.com:911‘

 

添加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=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch

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=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/tree/ metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch

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=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/tree/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
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=http://proxy-prc.intel.com:911

 

Fedora 配置

标签:etc   star   otp   无法上网   load   out   ror   date   port   

原文地址:https://www.cnblogs.com/eilinge/p/9239090.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!