【环境】
【详细步骤】
一、搭建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
rpcinfo -p ,如果显示rpc 服务器注册的端口列表(端口:111),则启动成功。
rpcinfo -p
NFS服务器搭建完成
二、BMC配置媒体服务器
——以海光TU526服务器为例
登录BMC,设置选择”媒体重定向设置“
选择”一般设置“
开启”远程媒体支持“,挂载CD/DVD,输入镜像服务器地址(NFS服务器IP),输入共享路径"/nfs/isos",共享类型选择”nfs“,点击保存,如下图:
上传镜像文件到NFS服务器的共享目录/nfs/isos中
BMC选择”进行重定向“-点击”远程镜像“
选择需要安装的镜像,点击开始重定向选中的镜像文件
启动远程KVM控制,重启服务器
重启后选择对应启动项进行系统安装
评论前必须登录!
注册