背景

一台曙光服务器需要安装ubantu22.04

做网口绑定

安装过程

一、镜像下载

镜像下载地址:https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/24.04/

清华源的下载地址还是很快的!
使用rufus将iso写入u盘,rufus下载地址:http://rufus.ie/downloads/

二、配置raid

在服务器开机界面按住ctrl+r,进入到raid卡配置界面,配置raid1

369ab25410c600acdff2f74b086aa08

143b69bab1c52e6f996917aafbf2d85

三、设置启动项

四、安装系统



五、安装openssh-server

ubantu是没有带ssh服务的,连iso镜像里面也没有,所以只能通过联网安装,我是采用手机开usb共享的方式让服务器有网络访问权限,当然也可以进行离线安装。

操作如下:


#同步软件版本
apt-get upgrade
#安装ssh服务
apt install -y openssh-server

systemctl status ssh #查看服务状态
ss -ntlup|grep 22 #查看22端口是否有被监听

六、配置网卡绑定

服务器两个网卡,需要保证网卡高可用所以做的网卡绑定,模式为主备

#首先,确保您的系统中已经安装了  network-manager
apt-get install network-manager
#创建 bond 连接配置,这里创建了一个名为  bond0  的 bond 连接,模式为  active-backup  (主动备份模式),您可以根据需求选择其他模式,如  balance-rr  (平衡轮询)等。
nmcli connection add type bond con-name bond0 ifname bond0 mode active-backup
#将物理网卡添加到 bond 中
nmcli connection add type ethernet con-name eth33 ifname eth33 master bond0
nmcli connection add type ethernet con-name eth38 ifname eth38 master bond0
#配置 bond 连接的 IP 地址等参数
nmcli connection modify bond0 ipv4.addresses 192.168.198.137/24
nmcli connection modify bond0 ipv4.gateway 192.168.198.2
nmcli connection modify bond0 ipv4.method manual
#启用 bond 连接和物理网卡连接
nmcli connection up bond0
nmcli connection up eth33
nmcli connection up eth38
#查看配置是否生效
ip a




停用一个网卡,验证网卡绑定是否生效

标签: linux