更新时间:2023-09-12 GMT+08:00
分享

安装bms-network-config软件包

操作背景

安装bms-network-config软件包,与Cloud-Init配合完成集中式裸金属服务器的网络配置,需要安装bms-network-config软件包的裸金属服务器规格如表1所示。分布式裸金属服务器(带SDI 3.0卡或SDI 2.2网络卡的机型)不需要执行此步骤。

表1 裸金属服务器规格

规格类型

规格名称

通用型

physical.s3.large、physical.s3.xlarge、physical.s3.2xlarge、physical.s4.medium、physical.s4.large、physical.s4.xlarge、physical.s4.2xlarge、physical.s4.3xlarge

本地存储型

physical.d1.large、physical.d2.tiny、physical.d2.large、physical.d2.xmedium

内存优化型

physical.m2.small、physical.m2.medium、physical.m2.large、physical.m2.xlarge

IO优化型

physical.io1.large、physical.io2.xlarge

GPU加速型

physical.p1.large、physical.p2.large、physical.g1.small、physical.p3.large、physical.pi6.3xlarge.6

高性能计算型

physical.h2.large、physical.hc2.xlarge

鲲鹏型

physical.ks1.2xlarge

前提条件

  • 已登录虚拟机。
  • 已安装好cloud-init软件。
  • 已参考软件准备章节下载bms-network-config软件包及SHA256校验码并完成完整性校验,详情请参考如何对软件进行完整性校验?

    请下载对应操作系统的rpm包,需要注意:Ubuntu/Debian所用的是deb包,ARM系列操作系统(当前仅支持CentOS和EulerOS)使用aarch的rpm包。

操作步骤

  1. 进入bms-network-config安装包所在目录,执行rpm -ivhbms-network-config-1.0-7.centosRedhat7.x86_64.rpm命令。
    [root@localhost r74]# rpm -ivhbms-network-config-1.0-7.centosRedhat7.x86_64.rpm
    Preparing...                          ############################### [100%]            
    Updating / installing...
       1:bms-network-config-1.0.7.centosRe############################### [100%]

    SUSE 12/SUSE 15系列安装bms-network-config时,如果出现下面的依赖报错,请执行:rpm -ivh bms-network-config-1.0-9.suse12.x86_64.rpm --nodeps --force

    对于Ubuntu/Debian操作系统,使用dpkg -ixxx进行安装,xxx为deb包名。

    root@ubuntu:~/file# dpkg -i bms-network-config-1.0.7.ubuntu1604-918.deb
    Selecting previously unselected package bms-network-config.
    (Reading database ... 97630 files and directories currently installed.)
    Preparing to unpack bms-network-config-1.0.7.ubuntu1604-918.deb ...
    Unpacking bms-network-config (1.0) ...
    Setting up bms-network-config (1.0) ...
    root@ubuntu:~/file# dpkg -s bms-network-config

    rpm包和deb包的名称以实际为准。

  2. 安装完成后,执行rpm -qa | grep bms-network-config,如下回显表示安装成功。
    [root@localhost r74]# rpm -qa | grep bms
    bms-network-config-1.0.7.centosRedhat7.x86_64

    对于Ubuntu/Debian操作系统,使用dpkg -s bms-network-config命令查看。

  3. 查看服务状态。
    • 对于Oracle Linux 7、Red Hat 7、CentOS 7、Ubuntu 16.04、Ubuntu 18.04、SUSE 12、SUSE 15、EulerOS操作系统,执行service bms-network-config status命令查看服务状态。如果不是“enabled”,请执行systemctl enable bms-network-config,开启服务。
      [root@localhost r74]# service bms-network-config status
      Redirecting to /bin/systemctl status bms-network-config.service
        bms-network-config.service - Network Config
        Loaded: loaded (/usr/lib/systemd/system/bms-network-config service; enabled vendor preset: disabled)
        Active: inactive (dead)
    • 对于Red Hat 6系列、CentOS 6系列、SUSE 11 SP4和Oracle Linux 6.8、Oracle Linux 6.9操作系统,执行chkconfig --list | grep bms-network-config命令查看服务状态。如果不是“on”,请执行chkconfig bms-network-config on命令,开启服务。
      [root@localhost r69]# chkconfig --list | grep bms
      bms-network-config   0:off   1:off   2:on   3:on   4:off   5:on   6:off
    • 对于Ubuntu 14.04/Debian,可以使用initctl status bms-network_config查看安装状态。
      root@ubuntu:~# initctl status bms-network_config
      bms-network_config stop/waiting
  4. 检查服务启动依赖。

    参考使用systemctl cat bms-network-config命令,确保服务文件如下:

    [Unit]
    Description=NetworkConfig
    DefaultDependencies=no
    After=dbus.service
    Wants=dbus.service
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/bms-network_config rhel
    RemainAfterExit=yes
    TimeoutSec=0
    
    [Install]
    WantedBy=multi-user.target

    尤其注意依赖项顺序。如果不对,使用vim /usr/lib/systemd/system/bms-network-config.service命令进行修改。

分享:

    相关文档

    相关产品