NFS服务

sudo yum install nfs-utils -y

sudo systemctl start nfs-server
sudo systemctl enable nfs-server
sudo systemctl start rpcbind
sudo systemctl enable rpcbind
sudo mkdir -p /nfs_share
sudo chown nfsnobody:nfsnobody /nfs_share
sudo chmod 755 /nfs_share

服务器端 添加 客户端的ip地址

vim /etc/exports
添加 放行来源IP地址
/nfs_share 192.168.1.0/24(rw,sync,no_subtree_check)
rw:读写权限
sync:同步写入
no_subtree_check:禁用子树检查,提高性能

systemctl restart nfs.service
服务加载配置文件
exportfs -ra
应用

exportfs -v
查看

客户端添加

mkdir /aaa
yum install -y nfs-utils
mount -t nfs 223.5.5.5:/server/a
mount -t nfs 223.5.5.5:/server/aaa

fstab 添加启动挂载点
223.5.5.5:/share_nfs /aaa nfs defaults 0 0

posted @ 2023-08-22 16:30  mmszxc  阅读(9)  评论(0)    收藏  举报