Ubuntu 18.04 配置

Ubuntu 18.04 配置IP-静态(UB与其他linux os不同)

sudo netplan generate

sudo vim /etc/netplan/50-cloud-init.yaml

需修改以下参数:

network:

  version: 2

  renderer: networkd

  ethernets:

        eno1:

                dhcp4: no

                dhcp6: no

                addresses: [10.240.176.209/24]

                gateway4: 10.240.176.129

                nameservers:

                        addresses: [10.248.2.5,10.239.27.36]

 

sudo netplan apply 开机自动配置ip(与其他OS不同)

 

1、开机自动配置IP

$ sudo vim /etc/network/interfaces

需修改以下参数:

auto eth39

iface eth39 inet manual

auto br0

iface br0 inet static

address 10.240.176.207

netmask 255.255.255.128

gateway 10.240.176.129

dns-nameserver 10.248.2.5

dns-nameserver 10.239.27.36

dns-nameserver 172.17.6.9

bridge_ports eth39

2、重启网络服务生效

service systemd-networkd restart

 

设置镜像源 问题:下载包的时候可能会有以下error log,需重新设置镜像源

Err 1 trusty Release.gpg

W: Failed to fetch 1

解决方法:

1、修改源 vim /etc/apt/source.list

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

$ sudo vim /etc/resolv.conf

需修改以下参数:

"nameserver 10.248.2.5

nameserver 10.239.27.36

nameserver 172.17.6.9"

 

下载DPDK & DTS前需要设置代理

方法一 终端运行exporthttp_proxy="http://用户名:密码@代理IP:代理端口"也可

方法二 sudo vim /etc/apt/apt.conf    需将

“ Acquire::http::proxy "http://proxy-prc.intel.com:911/";

Acquire::https::proxy "https://proxy-prc.intel.com:911/";

Acquire::ftp::proxy "ftp://proxy-prc.intel.com:911/; ”

 

添加到以下路径文件中: :/C:\Users\wuchan4x\Documents\OS issue\ubuntu-info\apt.conf

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zwwxpd.html