一、 NFS服务

1、 NFS服务的安装

[root@localhost ~]# rpm -q nfs-utils //默认已安装

nfs-utils-1.0.9-66.el5

[root@localhost ~]# rpm -q portmap

portmap-4.0-65.2.2.1

2、 NFS服务的配置

[root@localhost ~]# cat /etc/exports //设置共享目录

/root  192.168.100.89(rw,sync,no_root_squash)

/usr/src  192.168.100.8(rw,sync,all_squash)

3、 nfs服务的启动

[root@localhost ~]# service portmap restart//启动RPC服务

停止 portma:                     [确定]

启动 portm:                      [确定]

[root@localhost ~]# service nfs  restart

关闭 NFS moun:                   [确定]

……….

正在启动 RPC idma:                [确定]

在客户机上查看共享:

[root@localhost ~]# service portmap restart    //开启RPC机制

停止 portm:                       [确定]

启动 portm:                       [确定]

[root@localhost ~]# showmount -e 192.168.100.129//查看NFS共享目录

Export list for 192.168.100.129:

/root    192.168.100.89

/usr/src 192.168.100.8

挂载:

[root@localhost ~]# mount 192.168.100.129:/usr/src/  /mnt/my2/ [root@localhost ~]# mount 192.168.100.129:/root/  /mnt/my/

[root@localhost ~]# ll >/mnt/my/my.txt//有权限

[root@localhost ~]# ll>/mnt/my2/my2.txt//没权限

bash: /mnt/my2/my2.txt: 权限不够