云计算百科
云计算领域专业知识百科平台

搭建NFS服务器作为BMC镜像iso媒体服务器

【环境】

  • 使用与要安装操作系统的服务器1同网段的另一台服务器2搭建NFS,作为iso镜像媒体服务器
  • 在BMC中启用远程媒体,挂载NFS类型的镜像服务器,地址为服务器2的IP并指定路径
  • 【详细步骤】

    一、搭建NFS服务器

    ——以CentOS 7.9为例进行操作

    检查防火墙和SELinux

    检查防火墙

    systemctl status firewalld

    [root@CentOS7 ~]# systemctl status firewalld ● firewalld.service – firewalld – dynamic firewall daemon    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)    Active: inactive (dead)      Docs: man:firewalld(1)

    如未关闭使用如下命令进行关闭

    systemctl stop firewalld

    systemctl disable firewalld

    检查SELinux

    cat /etc/selinux/config

    [root@CentOS7 ~]# cat /etc/selinux/config

    # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: #     enforcing – SELinux security policy is enforced. #     permissive – SELinux prints warnings instead of enforcing. #     disabled – No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three two values: #     targeted – Targeted processes are protected, #     minimum – Modification of targeted policy. Only selected processes are protected. #     mls – Multi Level Security protection. SELINUXTYPE=targeted

    若未关闭禁用,使用如下命令:

    setenforce 0
    sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config

    安装 NFS 和 RPC

    yum install -y nfs-utils rpcbind

    配置exports

    创建共享目录文件夹

    mkdir -p /nfs/isos

    配置NFS(全部客户端可挂载)

    echo "/nfs/isos *(rw,sync,no_root_squash)" >> /etc/exports

    加入开机自启动

    systemctl enable rpcbind && systemctl start rpcbind
    systemctl enable nfs && systemctl restart nfs

    使NFS配置生效

    exportfs -r

    查看服务状态

    systemctl status rpcbind
    systemctl status nfs

    92262a6242dd4f6c8de5a6c6ac2baffc.png

    rpcinfo -p ,如果显示rpc 服务器注册的端口列表(端口:111),则启动成功。

    rpcinfo -p

    63803dd35dbc4595baff0aa16f880cc6.png

     NFS服务器搭建完成

    二、BMC配置媒体服务器

    ——以海光TU526服务器为例

    登录BMC,设置选择”媒体重定向设置“

    cd4330b254f24d9881cc77a8f4a6a207.png

     选择”一般设置“e7580376903e4e31bd711a7e21f66f1a.png

     开启”远程媒体支持“,挂载CD/DVD,输入镜像服务器地址(NFS服务器IP),输入共享路径"/nfs/isos",共享类型选择”nfs“,点击保存,如下图:

    1fd74fe3c01e48279b72bc6a17fd4288.png

     上传镜像文件到NFS服务器的共享目录/nfs/isos中

    452625cda00543e8982bf56c51c3212b.png

     BMC选择”进行重定向“-点击”远程镜像“

    8d5a4935a620497eafe3753b598033af.png

     选择需要安装的镜像,点击开始重定向选中的镜像文件

    8b613efb7bd14885ad87f365ab59c8a0.png

     启动远程KVM控制,重启服务器237b20eec25240f897755c27ce4f2e3c.png

     

     

    重启后选择对应启动项进行系统安装

     

    赞(0)
    未经允许不得转载:网硕互联帮助中心 » 搭建NFS服务器作为BMC镜像iso媒体服务器
    分享到: 更多 (0)

    评论 抢沙发

    评论前必须登录!