Fedora 配置

2018-06-29 06:09:55来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

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

 

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:多线程编程之Apue3rd_Chapter15.10之posix信号量

下一篇:Linux 中NFS服务器的搭建