首页 > 其他 > 详细

Hadoop企业级集群架构 - NFS安装

时间:2015-11-15 08:33:50      阅读:296      评论:0      收藏:0      [点我收藏+]

服务器地址:192.168.1.230

?

安装NFS软件

?

?

?

检查nfs是否安装完成

rpm -qa | grep nfs

技术分享

?

?

检查rpcbind和nfs 服务

技术分享

?

systemctl list-unit-files | grep "nfs"

?

技术分享

?

systemctl list-unit-files | grep "rpcbind"

?

技术分享

?

systemctl enable nfs-server.service

?

技术分享

?

systemctl enable rpcbind.service

技术分享

?

?

systemctl list-unit-files | grep -E "rpcbind.service|nfs-server.service"

?

技术分享

?

?

技术分享

?

?

?

检查 NFS,RPC状态

service rpcbind status

技术分享

?

service rpcbind status

?

技术分享

?

建立运行帐户:

?

groupadd grid

useradd -m -s /bin/bash -g grid grid

passwd grid

<grid123>

技术分享

?

修改/ecc/expots

添加:

/home/grid *(rw,sync,no_root_squash)

?

技术分享

?

重启rpcbind,nfs

systemctl restart rpcbind

systemctl restart nfs

?

技术分享

?

验证:

showmount -e 192.168.1.230

?

技术分享

?

?

在节点上挂载共享目录

?

NSF挂载Errror "wrong fs type,bad option

解决办法:

yum -y install nfs-utils

?

?

mount -t nfs 192.168.1.230:/home/grid /nfs_share/

技术分享

?

查看mount

?

mount

技术分享

?

?

设置开机自动挂载

vi /etc/fstab

添加如下一行:

192.168.1.230:/home/grid /nfs_share nfs defaults 0 0

?

?

在NFS服务器及各节点配置SSH

?

将各节点的密钥加到NFS服务器上

ssh h1.hadoop.com cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh h2.hadoop.com cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh h3.hadoop.com cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

id_rsa.pub

?

?

在各节点创建共享目录文件authorized_keys的软连接

?

在各节点上安装

yum -y install nfs-utils

?

mkdir /nfs_share

mount -t nfs 192.168.1.230:/home/grid /nfs_share/

ln -s /nfs_share/.ssh/authorized_keys ~/.ssh/authorized_keys

Hadoop企业级集群架构 - NFS安装

原文:http://www.cnblogs.com/chujq/p/4966118.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!