nfs-config(){
#服务端配置nfs,
#先关闭防火墙或开放端口
vi /etc/services
mountd 1011/tcp #rpc.mountd
mountd 1011/udp #rpc.mountd
rquotad 1012/tcp #rpc.rquotad
rquotad 1012/udp #rpc.rquotad
vi /etc/sysconfig/iptables
#portmap
-A INPUT -p tcp --dport 111 -j ACCEPT
-A INPUT -p udp --dport 111 -j ACCEPT
#nfsd
-A INPUT -p tcp --dport 2049 -j ACCEPT
-A INPUT -p udp --dport 2049 -j ACCEPT
#mountd
-A INPUT -p tcp --dport 1011 -j ACCEPT
-A INPUT -p udp --dport 1011 -j ACCEPT
#rquotad
-A INPUT -p tcp --dport 1012 -j ACCEPT
-A INPUT -p udp --dport 1012 -j ACCEPT
#rpc.statd
-A INPUT -p tcp --dport 32768 -j ACCEPT
-A INPUT -p udp --dport 32768 -j ACCEPT
yum -y install nfs-utils rpcbind
mkdir /ldapdir/users #创建共享目录
vi /etc/exports
/ldapdir/users *(rw,sync)
#/usr/local/test/ 192.168.1.226(rw,no_root_squash,no_all_squash,sync)
exportfs -r #使配置生效
service rpcbind start
service nfs start
chkconfig rpcbind on
chkconfig nfs on
}此文章是openldap服务器配置nfs共享,用于ldap用户挂载家目录
2016.10.24
本文出自 “土豆IT” 博客,请务必保留此出处http://malin314.blog.51cto.com/7206614/1864983
openldap服务器配置nfs共享,ldap用户挂载家目录
原文地址:http://malin314.blog.51cto.com/7206614/1864983