您的位置:首页 > 其它

RHEL6.4 NFS文件共享服务器搭建

2015-12-17 14:03 495 查看
服务端:192.168.56.16
客户端:192.168.56.17

服务端安装配置
1.安装软件包

# yum install rpcbind nfs-utils


2.配置开机自启动

# chkconfig rpcbind on
# chkconfig nfs on
# service rpcbind start
# service nfs start


3.创建共享目录

# mkdir /arch01


4.编辑exports文件
/etc/exports文件内容格式:
<输出目录> [客户端1 选项(访问权限,用户映射,其他)] [客户端2 选项(访问权限,用户映射,其他)]

# vim /etc/exports
/arch01 192.168.56.17(rw,sync,no_root_squash)


#设置为只对192.168.56.17用户读写权限,并同步写入内存与硬盘,开放客户端使用root身份
5.查看本地发布的共享资源

# showmount -e localhost
Export list for localhost:
/arch01 192.168.56.17


客户端安装配置
1.安装软件包

# yum install rpcbind nfs-utils


2.配置开机自启动

# chkconfig rpcbind on
# chkconfig nfs on
# service rpcbind start
# service nfs start


3.查看服务端发布的共享资源

# showmount -e 192.168.56.16
Export list for 192.168.56.16:
/arch01 192.168.56.17


4.创建挂载点

# mkdir /arch01


5.挂载

# mount 192.168.56.16:/arch01 /arch01


6.设置开机后自动挂载NFS共享资源

# vi /etc/fstab
192.168.56.16:/arch01 /arch01 type nfs (rw,vers=4,addr=192.168.56.16,clientaddr=192.168.56.17)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: