CentOS 6.6 安装nfs网络文件系统

一、介绍

  nfs网络文件系统的,大部分用在内网文件共享,比如,对集群上传文件做共享,经常用在图片部分,当然数据量大了还是要做分离,做为专门的接口比较好,介绍一下基本安装环境:

  1)Cnetos6.6

  2)nfs-utils-1.2.3

  3) rpcbind-0.2.0

二、安装

yum install -y rpcbind nfs-utils

三、配置

echo "/data 192.168.19.145(rw)" >/etc/exports    #指定目录 运行挂载主机 以及有哪些权限

四、启动

$ /etc/init.d/rpcbind start
$ /etc/init.d/nfslock start
$ /etc/init.d/nfs start

$ chkconfig rpcbind on
$ chkconfig nfslock on
$ chkconfig nfs on
$ iptables -t filter -A INPUT -s 192.168.19.145 -m state --state NEW -j ACCEPT

#记得允许防火墙

五、检查

$ ps aux|grep nfs
$ ps aux|grep rpcbind
$ netstat -ntlp

#这个东东端口到是开了一堆

六、客户端测试

$ yum install -y nfs-utils                #安装
$ showmount -e 192.168.19.128              #查看共享目录
$ mount -t nfs 192.168.19.128:/data /mnt  #挂载

--------------------------------------分割线 --------------------------------------

--------------------------------------分割线 --------------------------------------

猜你喜欢

转载自www.linuxidc.com/Linux/2015-06/119370.htm