CentOS 6 NFS配置

一. NFS服务端设定:

1.

#yum install nfs
#yum install rpcbind
#rpm -qa | grep nfs
#rpm -qa | grep rpcbind

 

2.

#nfs服务启动需要依赖于rpcbind的功能,即向rpc服务注册nfs所提供的端口号
用来使客户端进行连接,

a. /etc/init.d/rpcbind start (先启动rpcbind daemon)
b. /etc/init.d/nfs start(后启动nfs daemon)
c. chkconfig rpcbind on
d. chkconfig nfs on

  

3. 

#vi /etc/exports
/dbbak/043 172.16.4.0/24(rw)
/dbbak/041 172.16.4.0/24(rw)
/dbbak/031 172.16.4.0/24(rw)
--设置共享的目录/dbbak,172.16.4.0网段主机可以对此目录进行读写访问

  

4.查看本机rpc服务的注册情况

#rpcinfo -p localhost

  

5.查看NFS联机情况

#showmount -e 127.0.0.1

  

二. NFS客户端设定:

1.

#/etc/init.d/rpcbind start --客户端启动rpc服务

  

2.

#showmount -e 172.16.4.21 --查看nfs服务器可挂载的资源

  

3.

#mount -t nfs 172.16.4.21:/dbbak/031 /dbbak/backup/4_031_okdw/

  

4.

#vi /etc/rc.local --添加开机自动挂载
mount -t nfs 172.16.4.21:/dbbak/031 /dbbak/backup/4_031_okdw/

  


Reference:

http://centos.rutgers.edu/koji/buildinfo?buildID=4322
http://www.apache.org/dist/httpd/

posted @ 2018-12-03 10:16  2240930501  阅读(188)  评论(0编辑  收藏  举报