分类: 系统运维
2014-11-27 17:47:09
在CentOS6.2安装NFS时,portmap变为rpcbind
以下为NFS在CentOS6.2上的安装步骤
一、安装软件包:
Yum install nfs-utils nfs-utils-lib(服务器和客户端均安装)
Yum install rpcbind(服务器安装,一般自带)
二、设置开机启动
Chkconfig nfs on
Chkconfig rpcbind on
三、服务器设置
1、修改配置文件
#mkdir /opt/nfs
#vim /etc/exports
/opt/nfs 10.221.164.144/24(rw,no_root_squash)
2、添加规则允许访问
#vim /etc/hosts.allow
mountd:ALL
rpcbind:ALL
3、启动服务
#service rpcbind start
#service nfs start
四、客户端配置
1、发现共享设备
#showmount –e 服务器IP
2、挂在共享目录
#mount –t nfs 服务器IP:共享目录 本地目录
3、添加开机自动启动
#vim /etc/rc.d/rc.local
若挂载目录较多可以编写脚本,进行自动挂载
默认关闭防火墙。