centos7 安装Ambari

配置SSH免密码登录
主节点里root用户登录执行如下

ssh-keygen
cd ~/.ssh/
cat id_rsa.pub >>authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys


在从节点登录root执行命令

mkdir ~/.ssh/

分发主节点里配置好的authorized_keys到各从节点

scp /root/.ssh/authorized_keys root@192.168.10.227:/root/.ssh/authorized_keys
关闭防火墙

所有节点都要设置

Centos 7 命令

systemctl disable firewalld
systemctl stop firewalld 

hosts文件修改

如果将来想采用ssh 主机名的方式来访问其余节点,请确保各个节点上的hosts文件下有对各个ip以及主机名的映射,可通过如下命令进行查看cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

172.31.83.171 SY-001 SY-001.hadoop
172.31.83.172 SY-002 SY-002.hadoop
172.31.83.173 SY-003 SY-003.hadoop



如果没有将ip地址与主机名相对应,请按照如上所示,修改hosts文件vim /etc/hosts

每台节点里配置FQDN,如下以主节点为例

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=SY-001.hadoop

本机ssh访问

每个节点上执行如下命令将公钥文件写入授权文件中,并赋值权限

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

主节点到从节点无密码ssh访问

主节点分别执行如下命令将主节点的公钥文件拷贝到从节点上(注意,当进行远程拷贝的时候会要求输入节点的密码)

scp ~/.ssh/id_rsa.pub  root@SY-002.hadoop:~
scp ~/.ssh/id_rsa.pub  root@SY-003.hadoop:~
从节点中执行如下命令,将主节点的公钥追加到授权文件中
cat  ~/id_rsa.pub >>  ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm ~/id_rsa.pub

从节点
主节点中执行如下命令,实现主节点到从节点无密码访问

ssh SY-002
exit
ssh SY-003
exit

从节点到主节点无密码ssh访问

在每个从节点上执行如下命令,实现从节点到主节点的无密码访问

cd  
cd  .ssh
ssh-copy-id -i id_rsa.pub root@SY-001

这里写图片描述

在每个从节点上执行如下命令,验证从节点到主节点无密码ssh访问。

ssh SY-001


参考文档 :http://blog.csdn.net/daiyutage/article/details/52210830

http://itfish.net/article/59509.html

这里写图片描述


Install Ambari 2.2.2 from Public Repositories

Step1: Download the Ambari repository on the Ambari Server host

For Redhat/CentOS/Oracle:
   cd /etc/yum.repos.d/
   wget <ambari-repo-url>
 
For SUSE:
   cd /etc/zypp/repos.d
   wget <ambari-repo-url>
 
For Ubuntu/Debian:
   cd /etc/apt/sources.list.d
   wget <ambari-repo-url>

Choose an appropriate <ambari-repo-url> based on the platform used:

Step 2: Install, Setup, and Start Ambari Server

Install Ambari Server from the public Ambari repository:

For Redhat/CentOS/Oracle:
   yum install ambari-server
 
For SUSE:
   zypper install ambari-server
 
For Ubuntu/Debian:
   apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
   apt-get update
   apt-get install ambari-server

Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:

ambari-server setup

 

Start Ambari Server:

ambari-server start

Step 3: Deploy Cluster using Ambari Web UI

Open up a web browser and go to http://<ambari-server-host>:8080.

Log in with username admin and password admin and follow on-screen instructions.

  • No labels
参考文档:http://itfish.net/article/59509.html

http://blog.csdn.net/daiyutage/article/details/52210830

https://cwiki.apache.org/confluence/display/AMBARI/Install+Ambari+2.2.2+from+Public+Repositories

将主节点下载的 ambari.repo 复制到从节点

scp /etc/yum.repos.d/ambari.repo  hadoop02:/etc/yum.repos.d/

scp /etc/yum.repos.d/ambari.repo  hadoop03:/etc/yum.repos

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值