Ambari实战-3:配置集群环境必备依赖

2020-12-31  本文已影响0人  qianmoQ

我们本篇文章主要讲述在安装Ambari服务前需要安装的各种第三方支撑的系统依赖。

安装配置NTP服务


因为在集群中我们要保证时间的一致性特使用NTP来作为时间的同步服务,此操作登录到所有节点执行

yum -y install ntp

当然我们也可以使用源码方式进行ntp服务的安装

sudo systemctl enable ntpd
sudo systemctl start ntpd

关闭服务器的防火墙服务


由于防火墙的限制可能会导致集群中的某些端口无法访问,未解决该问题我们将防火墙做关闭处理,此操作登录到所有节点执行

sudo systemctl disable firewalld

这样可以使我们重启服务器的时候防火墙服务不在跟随系统启动,但是未重启的服务器防火墙服务依然存在

sudo systemctl stop firewalld

设置selinux


为了防止集群中的节点通信,我们要将selinx禁止,此操作登录到所有节点执行

/usr/sbin/sestatus -v

我们只需要查看SELinux status:是否是disabled即可。disabled标志被禁止,enable标志服务启动

如果是enable状态的话我们需要将它关闭掉

sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

或者我们使用Vim进行文件编辑

vim /etc/selinux/config

将文件中的SELINUX=enforcing修改为SELINUX=disable

修改后重启服务器即可

设置umask


此操作登录到所有节点执行,该操作尽量使用root用户操作

echo umask 0022 >> /etc/profile
source /etc/profile

或者直接使用组合命令执行

echo umask 0022 >> /etc/profile && source /etc/profile

安装yum源相关依赖


此操作只需要在ambari-common节点中执行,该操作尽量使用root用户操作

sudo yum install yum-utils createrepo httpd yum-plugin-priorities
echo 'gpgcheck=0' >> /etc/yum/pluginconf.d/priorities.conf

或者我们使用Vim修改/etc/yum/pluginconf.d/priorities.conf文件,在文件末尾新启一行添加以下内容

gpgcheck=0

此时我们所有的集群依赖环境已经安装完成。

上一篇 下一篇

猜你喜欢

热点阅读