服务器(129.1.9.1)
yum install nfs* portmap
vi /etc/exports
##
/www/users/p8.hsw.cn/data 129.1.10.6(rw,sync,fsid=0)
/www/users/p8.hsw.cn/attachment 129.1.10.6(rw,sync,fsid=0)
###
chkconfig nfs on
chkconfig portmap on
service portmap start
service nfs start
rpcinfo -p
exportfs
nfs客户端(129.1.10.6)
service portmap start
showmount -e 129.1.9.1
mount -t nfs 129.1.9.1:/www/users/p8.hsw.cn/data /www/users/p8.hsw.cn/data
mount -t nfs 129.1.9.1:/www/users/p8.hsw.cn/attachment /www/users/p8.hsw.cn/attachment
加入自动启动项
echo "mount -t nfs 129.1.9.1:/www/users/p8.hsw.cn/data /www/users/p8.hsw.cn/data">>/etc/rc.local
echo "mount -t nfs 129.1.9.1:/www/users/p8.hsw.cn/attachment /www/users/p8.hsw.cn/attachment">>/etc/rc.local