nfs
nfs的服务器
yum install -y rpc-bind nfs-utils
systemctl start rpcbind
mkdir /public
vi /etc/exports
[root@nn01 /]# cat /etc/exports
/public 172.16.0.0/24(ro,no_root_squash,no_all_squash)
systemctl restart nfs-server
systemctl enable nfs-server
showmount -e
mount -t nfs 172.16.0.9:/public /mnt
df -h
客户端
yum -y install nfs-utils
systemctl restart nfs-server
mount -t nfs 172.16.0.9:/public /mnt
df -h
开机自动挂载
客户端操作
mkdir /mnt/nfs
cat /etc/fstab
172.16.0.9:/public /mnt/nfs nfs defaults,_netdev 0 0
mount -a
df -h