NFS网络服务
NFS的使用
准备一台服务器当存储服务器,在其之上部署nfs(192.168.189.163)
yum -y install rpcbind nfs-utils
service rpcbind start
service nfs start
chkconfig rpcbind on
chkconfig nfs on
准备一个共享的目录
mkdir /opt/html
vim /etc/exports
/opt/html 192.168.189.0/24(rw,no_root_squash)
重载共享配置文件
#exportfs -rv
service iptables stop
setenforce 0
在客户端挂在该共享目录(192.168.189.161)
yum -y install nfs-utils
showmount -e 192.168.189.163
如果可以看到共享的目录,说明可以执行挂载该目录了
mount -t nfs 192.168.189.163:/opt/html /var/www/html
执行mount命令查看是否挂载成功
mount
看到如下输出说明挂载成功
192.168.189.163:/opt/html on /var/www/html type nfs (rw,vers=4,addr=192.168.189.163,clientaddr=192.168.189.161)

浙公网安备 33010602011771号