论坛风格切换
  • 3156阅读
  • 0回复

[linux服务器]nfs-server安装 [复制链接]

上一主题 下一主题
离线谯周
 

发帖
142
金币
0
威望
55
只看楼主 倒序阅读 使用道具 楼主  发表于: 2011-07-14

服务器(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

快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
提到某人:
选择好友
上一个 下一个