showmount -e hostnamesudo apt-get install nfs-kernel-server
sudo apt-get install portmap
配置文件 /etc/exports
/home/share 192.168.0.1/10(sync,ro) 192.168.1.20(rw,insecure,async,no_root_squash)
/home/public *(rw,sync)
/home/ftp www.baidu.com(ro,sync)启动服务器
service portmap start
service nfs start显示共享目录状态
showmount -ae hostname
客户端
显示192.168.0.1的NFS提供的信息
showmount -e hostname挂载NFS服务器中的目录
mount 192.168.0.1:/home/public /mnt/share查看挂载信息
mount | grep nfs卸载
umount /mnt/shareCentOS7 NFS 配置
1. edit /etc/exports
2. /home/media/samba *(insecure,sync,rw,no_root_squash)
3. Restart NFS server
a. sudo systemctl restart nfs
4. testing
showmount -e 127.0.0.1 then appear the following info.
Export list for 127.0.0.1:
/home/media/samba *
5. mount
a. sudo mount –t nfs nfsIP: /home/media/samba /mnt
1600

被折叠的 条评论
为什么被折叠?



