再次安装docker单机版ufm-南京

再次安装docker单机版ufm-南京

 

500节点license的mac

ip link set dev eno2 address a0:88:c2:7b:f2:3a
ip link set dev eno2 address a0:88:c2:7b:e3:a2

ifconfig ib0 10.10.10.2 netmask 255.255.255.0

ifconfig eno1 20.20.20.2

systemctl start sshd

docker exec -it ufm ufmlicense

 

 

grubby --default-kernel

grubby --info=ALL

grubby --set-default /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
grubby --default-kernel
yum install kernel-modules-extra
 grubby --default-kernel

 

sysctl net.ipv6.conf.all.disable_ipv6=1(关闭ipv6)

netstat -tlnp | grep :80   (谁在占用端口?)

ServerName 182.168.0.108:80

/etc/sysctl.conf中关闭ipv6,即: net.ipv6.conf.all.disable_ipv6=1

Listen 192.168.0.108:80(httpd.conf)

wget https://www.mellanox.com/downloads/DOCA/DOCA_v2.8.0/host/doca-host-2.8.0-204000_24.07_rhel810.x86_64.rpm

sudo rpm -i doca-host-2.8.0-204000_24.07_rhel810.x86_64.rpm

sudo dnf clean all

sudo dnf -y install doca-all

 

 

1,安装os必须的软件

dnf install acl apr-util-openssl bc gnutls httpd iptables jansson lftp libnsl libxml2 libxslt mod_session mod_ssl net-snmp net-snmp-libs net-snmp-utils net-tools php psmisc python36 qperf rsync sqlite sshpass sudo telnet zip

2,删除opemsm

rpm -q opensm

rpm -e opensm-5.19.0.MLNX20240421.b7c161a9-0.1.2404066.x86_64

以及修改主interface。看quick start

3,安装HA需要的软件(HA分裸机HA和dockerHA)//本案例不需要

4,MLNX_OFED must be installed on the server that will run UFM Docker For UFM to work, you must have an InfiniBand port configured with an IP address and in "up" state。

5,查看防火墙状态:systemctl status iptables/firewalld

6,安装docker

可行之一:

sudo dnf -y remove podman containers-common runc
sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl enable docker

systemctl restart docker

 

安装ofed后再卸载opensm(见上)

mst start/status

ip link set dev eno2 address 98:03:9b:1b:2e:b8
ifconfig ib0 10.10.10.1 netmask 255.255.255.0
ifconfig eno1 20.20.20.1

 

7,安装ufm

 

 可行之二:

 

直接下载安装包

https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-19.03.6.tgz

创建和修改文件一系列文件

如:

more /etc/docker/daemon.json
{
"data-root": "/opt/docker",
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://ustc-edu-cn.mirror.aliyuncs.com/",
"https://docker.hpcloud.cloud",
"https://hub.uuuadc.top",
"https://docker.anyhub.us.kg",
"https://dockerhub.jobcher.com",
"https://dockerhub.icu",
"https://docker.ckyl.me",
"https://docker.awsl9527.cn"
]
}

  

 

可行之二:但需要选对版本,而且麻烦

源码安装docker-CSDN博客

1.下载docker源码

wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-18.09.0.tgz --no-check-certificate

2.将解压出来的docker目录下的指令复制到 /usr/bin/ 目录下

tar xf docker-18.09.0.tgz
cp docker/* /usr/bin/ 

3.将docker注册为service服务
新建该文件

vi /etc/systemd/system/docker.service

加入以下内容:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

ExecStart=/usr/bin/dockerd -g /opt/docker #启动docker操作并指定数据目录,-g 新版本弃用(即使用json了)
vim /etc/docker/daemon.json ##启动docker指定数据目录

{
"data-root": "/opt/docker"
}

4.添加执行权限并重新加载配置文件

chmod a+x /etc/systemd/system/docker.service
systemctl daemon-reload
systemctl restart docker

验证
docker --version


安装docker-compose

wget https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64

cp docker-compose-linux-x86_64 /bin/docker-compose
chmod +x /bin/docker-compose
docker-compose --version
(base) [root@server-101 ~]# docker-compose --version
Docker Compose version v2.29.1



 

yum install kernel-modules-extra

 

for f in $(rpm -qa |grep -i doca ) ; do yum -y remove $f; done

rpm -q opensm;rpm -e opensm-5.19.0.MLNX20240421.b7c161a9-0.1.2404066.x86_64

 

ip link set dev eno2 address 98:03:9b:1b:2e:b8
ifconfig ib0 10.10.10.1 netmask 255.255.255.0
ifconfig eno1 20.20.20.1

ip link set dev eno2 address 98:03:9b:1b:30:28
ifconfig ib0 10.10.10.2 netmask 255.255.255.0
ifconfig eno1 20.20.20.2

安装ha时修改隐藏文件 .install_common.sh ,将centos改为rocky

docker run -it --name=ufm_installer --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/systemd/system/:/etc/systemd_files \
-v /opt/ufm/files/:/installation/ufm_files \
-v /tmp/license_file/:/installation/ufm_licenses \
mellanox/ufm-enterprise:6.11.1 \
--install \
--fabric-interface ib0 \
--mgmt-interface eno2

systemctl enable ufm-enterprise
systemctl daemon-reload
systemctl start ufm-enterprise

 

posted @ 2025-03-28 10:22  Augustone  阅读(83)  评论(0)    收藏  举报