2014-02-27 14:12:52Linux媛媛
四 NFS--指定某一个IP地址访问
[sql]
--第一步,修改配置文件
[root@serv01 share]# vim /etc/exports
[root@serv01 share]# cat /etc/exports
/share192.168.1.12(rw,all_squash,anonuid=501,anongid=501)
--第二步,重启服务
[root@serv01 share]# /etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
--第三步,测试
[root@serv02 data]# cd /
[root@serv02 /]# umount /data
[root@serv02 /]# mount 192.168.1.11:/share/data
[root@serv02 /]# cd /data
五 NFS--指定网段访问
[sql]
--第一步,修改配置文件
[root@serv01 share]# vim /etc/exports
[root@serv01 share]# cat /etc/exports
/share 192.168.1.0/255.255.255.0(rw,all_squash,anonuid=501,anongid=501)
#/share192.168.1.0/24(rw,all_squash,anonuid=501,anongid=501)
--第二步,重启服务
[root@serv01 share]# /etc/init.d/nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
--第三步,测试
[root@serv02 data]# cd /
[root@serv02 /]# umount /data
[root@serv02 /]# mount 192.168.1.11:/share/data
2021-07-20
2014-02-27
2020-12-24
2021-03-01
2022-01-24