CentOS6.5搭建NFS服务器

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6.5搭建NFS服务器相关的知识,希望对你有一定的参考价值。

1、首先检查系统是否安装了所需的安装包(nfs-utils、rpcbind):

    [[email protected] ~]# rpm -qa | grep rpcbind
    rpcbind-0.2.0-11.el6.x86_64
    [[email protected] ~]# rpm -qa | grep nfs
    nfs-utils-1.2.3-39.el6.x86_64
    nfs4-acl-tools-0.3.3-6.el6.x86_64
    nfs-utils-lib-1.1.5-6.el6.x86_64


2、如果结果如上图所示, 说明系统中已经安装了nfs所需要的软件; 否则需要安装, 可以用yum命令安装:

    [[email protected] ~]# yum -y install nfs-utils rpcbind


3、创建共享目录:

    [[email protected] ~]# mkdir /opt/share


4、NFS共享文件路径配置:

    编辑 /etc/exports添加如下一行:

    [[email protected] ~]# vi /etc/exports
    /opt/share  *(rw,sync,no_root_squash)


5、启动NFS服务(先启动rpcbind,再启动nfs)

    [[email protected] ~]# service rpcbind start
    Starting rpcbind:                                          [  OK  ]


6、设置NFS服务开机自启动:

    [[email protected] ~]# chkconfig rpcbind on
    [[email protected] ~]# chkconfig nfs on


本文出自 “sky” 博客,请务必保留此出处http://songky.blog.51cto.com/164603/1887485


以上是关于CentOS6.5搭建NFS服务器的主要内容,如果未能解决你的问题,请参考以下文章

centos6.5 搭建NFS 服务

CentOS6.5搭建NFS服务器

CentOS6.5搭建NFS服务器

CentOS6.5 NFS服务器的安装与基本参数

CentOS6.5 NFS挂载

Centos6.5 + Oracle 11g r2 + nfs搭建RAC环境一