服务器(129.1.9.1)
yum install nfs* portmap
vi /etc/exports
##
/www/users/website/data 129.1.10.6(rw,no_root_squash,async,fsid=0) ####ubuntu下为rw,async,no_root_squash,no_subtree_check,nohide,no_all_squash
/www/users/website/attachment 129.1.10.6(rw,no_root_squash,async,fsid=0)
###
chkconfig nfs on
chkconfig portmap on
service portmap start
service nfs start
rpcinfo -p
exportfs
======防火墙设置=====
在/etc/sysconfig/nfs,去掉如下几行注释:
RQUOTAD_PORT=875
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
STATD_PORT=662
nfs客户端(129.1.10.6)
service portmap start
showmount -e 129.1.9.1
mount -t nfs -o nolock 129.1.9.1:/www/users/website/data /www/users/website/data
mount -t nfs -o nolock 129.1.9.1:/www/users/website/attachment /www/users/website/attachment
加入自动启动项
echo "mount -t nfs -o nolock 129.1.9.1:/www/users/website/data /www/users/website/data">>/etc/rc.local
echo "mount -t nfs -o nolock 129.1.9.1:/www/users/website/attachment /www/users/website/attachment">>/etc/rc.local
或:
vim /etc/fstab
129.1.9.1:/www/users/website/data /www/users/website/data nfs nolock,gid=99,mode=777 0 0
129.1.9.1:/www/users/website/attachment /www/users/website/attachment nfs nolock,gid=99,mode=777 0 0
注:/www/users/website为论坛根目录
__________挂载 NFS UID & GID 显示为 4294967294 的解决方法(2010-12-06 13:32:06)转载标签: nfsuidgid4294967294it
You need to change the /etc/default/nfs-common file (on both your server and client):
set NEED_IDMAPD to yes.
sometimes set client is ok