您的位置:首页 > 运维架构 > Linux

centos7 安装Ambari

2018-02-24 15:44 239 查看

配置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

Choose an appropriate <ambari-repo-url> based on the platform used:
(Redhat / CentOS / Oracle) 6
http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo
(Redhat / CentOS / Oracle) 7
 http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari.repo 
SUSE 11
http://public-repo-1.hortonworks.com/ambari/suse11/2.x/updates/2.2.2.0/ambari.repo

Ubuntu 12http://public-repo-1.hortonworks.com/ambari/ubuntu12/2.x/updates/2.2.2.0/ambari.list
Ubuntu 14http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.2.2.0/ambari.list
Debian 7http://public-repo-1.hortonworks.com/ambari/debian7/2.x/updates/2.2.2.0/ambari.list

Step 2: Install, Setup, and Start Ambari Server

Install Ambari Server from the public Ambari repository:
Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:
 
Start Ambari Server:
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.
3 people like this 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: