Ubuntu 20.04 新特性
Updated Packages
Linux Kernel 5.4.
Toolchain Upgrades 🛠️:
Ubuntu 20.04 LTS comes with refreshed state-of-the-art toolchain including new upstream releases of glibc 2.31, ☕ OpenJDK 11, rustc 1.41, GCC 9.3, 🐍 Python 3.8.2, 💎 ruby 2.7.0, php 7.4, 🐪 perl 5.30, golang 1.13.
Ubuntu Desktop:
- New graphical boot splash (integrates with the system BIOS logo).
- Refreshed Yaru theme 🎨
- GNOME 3.36
- Mesa 20.0 OpenGL stack
- BlueZ 5.53
- PulseAudio 14.0 (prerelease)
- Firefox 75.0
- Thunderbird 68.7.0
- LibreOffice 6.4
Network configuration
With this Ubuntu release, netplan.io has grown multiple new features, some of which are:
- Basic support for configuring SR-IOV network devices. Starting with netplan.io 0.99, users can declare Virtual Functions for every SR-IOV Physical Function, configure those as any other networking device and set hardware VLAN VF filtering on them.
- Support for GSM modems via the NetworkManager backend via the
modems
section. - Adding WiFi flags for
bssid
/band
/channel
settings. - Adding ability to set
ipv6-address-generation
for the NetworkManager backend andemit-lldp
for networkd.
Storage/File Systems
ZFS 0.8.3
Other base system changes since 18.04 LTS
-
Python3 by default(Python 3.8. Python 2.7 已经移除)
-
Snap Store replaces ubuntu-software
Ubuntu Server
-
Installer
The live server installer is now the preferred media to install Ubuntu Server on all architectures.
-
QEMU
QEMU was updated to 4.2 release.
-
libvirt
libvirt was updated to version 6.0.
-
dpdk
Ubuntu 20.04 LTS includes the latest stable release 19.11.1 of the latest LTS series 19.11.x. The very latest (non-stable) version being 20.02 was not chosen for downstream projects of DPDK (like Open vSwitch) not being compatible yet.
-
Open vSwitch
Open vSwitch has been updated to 2.13.
-
Chrony
Chrony been updated to version 3.5.
-
cloud-init
Cloud-init was updated to version 20.1-10.
-
PHP 7.4
-
Ruby 2.7
-
Ruby on Rails 5.2.3
-
Ubuntu HA/Clustering
Kronosnet
Corosync 3.0
Pacemaker 2.0
Resource Agents
Fence Agents
keepalived -
isc-kea 1.6 stable track(dhcp server)
-
Bind 9.16
-
OpenSSH updates with U2F Support
-
HAProxy 2.0
-
Apache, TLSv1.3, client cert auth
-
Samba 4.11
-
PostgreSQL 12
-
nginx
Starting in Focal Fossa, nginx-core no longer ships with the legacy geoip module enabled by default. If you are using the legacy geoip module in nginx, you may run into upgrade issues if you do not deactivate the geoip module in your configuration. This was done as part of the deprecation of GeoIP legacy support.
-
Squid 4.x
-
s390x
-
OpenStack Ussuri
-
Ceph was updated to the 15.2.1 release
完整更新内容请查阅发行说明:
1. 安装摘要
18.04:安装界面变化比较大,参看截图,默认 SSH Server 已经安装(测试 18.04.3 修改为需要手动勾选),没有时区选择界面
20.04:安装界面少了步骤的数字提示,参看截图,SSH Server 需要勾选安装,没有时区选择界面
注意:分区如果选择 LVM,默认 / 目录只使用了 4G,需要编辑使用全部容量
2. 格式化网卡名称
1 | 类似 CentOS 7,及 Ubuntu 16.04 开始,安装好后网卡名称变成 ens160 类似名称了 |
3. 网络配置
查看 IP 地址信息
1 | ip address |
通过 netplan 管理网络
18.04:
cat /etc/network/interfaces
ifupdown has been replaced by netplan
默认使用 netplan 管理网络
18.04 默认配置文件:/etc/netplan/50-cloud-init.yaml
20.04:
cat /etc/network/interfaces
cat: /etc/network/interfaces: No such file or directory
20.04 默认配置文件:/etc/netplan/00-installer-config.yaml
配置静态 IP 地址
1 | sudo vim /etc/netplan/00-installer-config.yaml |
1 | 运行以下命令使配置生效 |
配置为 DHCP
1 | echo ' |
恢复传统的网络配置方式
1 | 可以恢复原有配置方式 |
补充:yaml 基础
1 | 大小写敏感 |
缩进建议使用 2 个空格,使用短横线 “-” 表示列表时,”- “后面的条目需要对齐,如果使用超过 2 个空格缩进,格式将有误。
配置静态路由示例
1 | network: |
4. 修改主机名
设置主机名
1 | vim /etc/hostname |
添加 domain name
1 | vi /etc/hosts |
查看 FQDN
1 | hostname -f |
5. 设置时区
1 | sudo timedatectl set-timezone Asia/Shanghai |
6. 修改国内镜像源
1 | 模板使用 aliyun |
更新
1 | sudo apt update #更新源 |
7. 安装 SNMP(模板未配置)
1 | sudo apt install snmpd snmp |
8. 配置 NTP
(1) 默认使用 systemd-timesyncd(NTP Client)进行时间同步:
适用于 Ubuntu 18.04、20.04 和 22.04。
配置文件默认如下:
vi /etc/systemd/timesyncd.conf
1 | [Time] |
默认 NTP 服务器使用 ntp.ubuntu.com
如果使用其他的服务器,增加一行,多个地址用空格分隔:
1 | NTP=ntp1.aliyun.com ntp2.aliyun.com |
重启服务生效:
systemctl restart systemd-timesyncd
手动同步(sudo atp install ntpdate
):
ntpdate -s ntp1.aliyun.com
查看同步状态:
timedatectl timesync-status
(2) 配置使用 chrony:
也可以禁用默认的 NTP Client(命令:sudo timedatectl set-ntp off
),使用 chrony 进行时间同步。
安装
1 | sudo apt install chrony |
chrony 自带一个交互式工具 chronyc,在配置文件中指定了时间服务器之后,如果想查看同步状态,可以进入这个交互式工具的交互界面。
1 | chronyc 有很多的子命令,可以输入 help 来查看 |
9. 虚机安装 VMware Tools
1 | Ubuntu 16.04 在 ESXi 中安装系统时已经自动安装了 vm-tools(18.04、20.04 相同) |
10. 安装必备工具
1 | sudo apt install zip unzip |
11. 开启 root 账号登录
Ubuntu 默认禁用 root SSH 密码登录(Pubkey 认证不受此限,默认启用),安装时候创建特定用户作为管理员帐号(通过 sudo 执行特权命令),启用 root 用户步骤如下:
- 修改 root 密码(控制台可以登录)
1 | sudo passwd root |
- 修改配置文件(SSH 密码登录)
1 | sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak |
找到下面相关配置:
1 | Authentication: |
修改如下
1 | 增加一句 |
补充
1 | PermitRootLogin prohibit-password #允许 root 登录,但禁止使用密码认证 |
- 重启服务生效
1 | sudo systemctl restart ssh |
下载 OVF
Ubuntu 20.04 LTS x86_64 OVF (sysin) - VMware 虚拟机模板下载仅供下载体验和测试学习,不得商用和正当使用。
下载体验