//要先添加一个网络适配器,成为两个网卡 [root@localhost ~]# yum install ipvsadm -y 共享存储服务器CentOS 7-4: //先将网卡更改为仅主机模式 [root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO="static" //将dhcp改为static DEVICE="ens33" ONBOOT="yes" IPADDR=192.168.200.130 //在末行下插入:IP,子网,网关 NETMASK=255.255.255.0 GATEWAY=192.168.200.1 修改完成后输入:wq保存退出 [root@localhost ~]# service network restart Restarting network (via systemctl): [ 确定 ] [root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# setenforce 0 [root@localhost ~]# systemctl start nfs.service [root@localhost ~]# systemctl status nfs.service ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled) Active: active (exited) since 二 2019-11-26 17:42:05 CST; 11s ago ......省略多行,状态为Active说明正常 [root@localhost ~]# systemctl start rpcbind.service [root@localhost ~]# systemctl status rpcbind.service ● rpcbind.service - RPC bind service Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; indirect; vendor preset: enabled) Active: active (running) since 二 2019-11-26 17:40:23 CST; 4min 26s ago
此时回到存储服务器CentOS 7-4上看是否有此文件:
[root@localhost ~]# cd /opt/ [root@localhost opt]# ls accp benet rh [root@localhost opt]# cd accp/ [root@localhost accp]# ls index.html [root@localhost accp]# cat index.html this is accp web //此时有我们新建的index.html文件