1. 设置root密码
sudo passwd
2. 配置网卡
配置文件所在目录:/etc/netplan/
2.1 单网卡配置示例
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
addresses:
- 172.16.0.1/24
gateway4: 172.16.0.254 # 网关地址
nameservers:
addresses: [8.8.8.8, 8.8.4.4] # DNS服务器地址
2.2 Bond配置示例
安装包:
apt install ifenslave
加载内核模块:
modprobe bonding
开机加载:
在/etc/modules文件中添加一行,内容为:bonding
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: no # 关闭DHCP
optional: true # 配置此语句,启动周期将继续,没有延迟,并且它将在以太网网络接口准备就绪时启动接口。如果没有此语句,未完全就绪的以太网网络接口可能会使引导时间增加2分钟以上。
enp4s0:
dhcp4: no
optional: true
enp5s0:
dhcp4: no
optional: true
enp6s0:
dhcp4: no
optional: true
bonds:
bond-ext:
addresses:
- 172.16.0.1/24
gateway4: 172.16.0.254
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
interfaces:
- enp3s0
- enp5s0
parameters:
mode: 802.3ad # bond4,LACP链路聚合
mii-monitor-interval: 100 # 监测时间,100ms
lacp-rate: slow
xmit-hash-policy: layer3+4
bond-int:
addresses:
- 10.0.0.1/24
interfaces:
- enp4s0
- enp6s0
parameters:
mode: 802.3ad
mii-monitor-interval: 100
lacp-rate: slow
xmit-hash-policy: layer3+4
2.3 配置生效命令
netplan apply
3. 配置SSH
配置文件所在目录:/etc/ssh/sshd_config
修改以下配置选项:
UseDNS no
PermitRootLogin yes
#PasswordAuthentication yes
4. 配置apt源(可选)
注:这里也可以在安装系统时,直接使用Ubuntu官方的国内源,下载速度还不错。
配置文件所在目录:/etc/apt/sources.list
4.1 国内源
阿里源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
清华源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
4.2 更新缓存并升级软件包
apt update
apt list --upgradable
apt upgrade
apt autoremove -y
4.3 安装基础依赖
apt install python3 python3-apt gpg
5. 安装ansible自动化工具(管理节点)
apt install ansible
6. 安装常用运维工具
nano
vim
net-tools
wget
curl
tree
rsync
pciutils
iperf3
iotop
dstat
sysstat
tcpdump
iftop
ntpdate
s3cmd
s4cmd
gpg
python3-apt
python3
systemd
chrony
lvm2
docker.io
7. 配置ceph源
注:执行lsb_release -sc命令查看操作系统代号。
阿里源:
wget -q -O- 'https://mirrors.aliyun.com/ceph/keys/release.asc' | apt-key add -
apt-add-repository 'deb https://mirrors.aliyun.com/ceph/debian-16.2.11/ focal main'
apt update
清华源:
wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
apt-add-repository 'deb https://mirrors.tuna.tsinghua.edu.cn/ceph/debian-16.2.11/ focal main'
apt update
8. 安装ceph常用工具
ceph-common # 用于挂载 Ceph 存储集群并与之交互的常用实用程序
ceph-fuse # 用于 Ceph 分布式文件系统的基于 FUSE 的客户端
cephfs-top # 这个软件包提供了一个类似top(1)的实用程序来显示各种性能数据。
rbd-fuse # 是个 rbd 映像的用户空间文件系统( FUSE )客户端。给一个包含 rbd 映像的存储池,它就可以在用户空间把那些映像挂载到 mountpoint 下,并显示为普通文件。
cephadm # 实用程序,用于使用 systemd 和容器引导 ceph 守护进程
cephfs-shell # 用于 Ceph 分布式文件系统的交互式 shell
ceph-test # Ceph测试和基准测试工具
标签:03,mirrors,restricted,Pacific,Ceph,https,ubuntu,main,focal From: https://www.cnblogs.com/varden/p/17139633.html