请访问原文链接:Ubuntu 20.04 LTS (Focal Fossa) 安装笔记,查看最新版。原创作品,转载请保留出处。
作者主页:www.sysin.org
抄袭者 macz、qq_23930765、hanzheng260561728 请远离本站!!!
新特性
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
keepalivedisc-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 directory20.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 | 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 用户登录,安装时候创建特定用户作为管理员帐号,启用 root 用户步骤如下:
- 修改 root 密码
1 | sudo passwd root |
- 修改配置文件
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 |
如果文章中使用的内容或图片侵犯了您的版权,请联系作者删除。如果您喜欢这篇文章或者觉得它对您有所帮助,欢迎您发表评论,也欢迎您分享这个网站,或者赞赏一下作者,谢谢!
赞赏一下