nfs部署验证

服务端:

1.安装rpm包(64位),可能已经安装过

1.1测试是否安装

[root@WEB1 ~]# rpm -qa nfs-utils

nfs-utils-1.2.3-39.el6.x86_64

[root@WEB1 ~]# rpm -qa rpcbind

rpcbind-0.2.0-11.el6.x86_64

1.2安装:

[root@WEB1 ~]#yum install nfs-utils-1.2.3-39.el6.x86_64 rpcbind-0.2.0-11.el6.x86_64

2.启动服务

         2.1测试是否启动服务

                  [root@WEB1 ~]# service nfs status

rpc.svcgssd is stopped

rpc.mountd (pid 16183) is running...

nfsd (pid 16198 16197 16196 16195 16194 16193 16192 16191) is running...

rpc.rquotad (pid 16179) is running...

[root@WEB1 ~]# service rpcbind status

rpcbind (pid  1833) is running...

         2.2启动:

                  [root@WEB1 ~]# service nfs start

                  [root@WEB1 ~]# service rpcbind start

         2.3重启

                  [root@WEB1 ~]# service nfs restart

                  [root@WEB1 ~]# service rpcbind restart

3.首先配置/etc/exports文件

[root@WEB1 ~]# vim /etc/exports

/upload ip1(rw,sync,insecure,no_root_squash)

/upload ip2(rw,sync,insecure,no_root_squash)

/upload ip3(rw,sync,insecure,no_root_squash)

/upload ip4(rw,sync,insecure,no_root_squash)

 

4.重启使配置文件生效

        [root@WEB1 ~]# exportfs –rv

        [root@WEB1 ~]# service nfs restart

客户端:

1.安装rpm包(64位),可能已经安装过

1.1测试是否安装

[root@WEB1 ~]# rpm -qa rpcbind

rpcbind-0.2.0-11.el6.x86_64

1.2安装:

[root@WEB1 ~]#yum install rpcbind-0.2.0-11.el6.x86_64

 

2.启动服务

         2.1测试是否启动服务

[root@WEB1 ~]# service rpcbind status

rpcbind (pid  1833) is running...

         2.2启动:

                  [root@WEB1 ~]# service rpcbind start

         2.3重启

                  [root@WEB1 ~]# service rpcbind restart

3.挂载

[root@WEB1 ~]# mount -t nfs -o rw IP2:/upload /upload

 

 

部署验证:

    首先要进行挂载,如挂载报错例如连接超时,就需要进行配置文件的检查,因为nfs具有文件共享的功能,所以挂载成功的现象是在事件模块上传一个附件,在所有客户端的对应路径(上文是/upload)都可以看到这个文件,而且在对应的模块可以读取成功。

 

posted on 2017-02-16 15:04  冥冥天使  阅读(163)  评论(0)    收藏  举报