博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Step by step: Install Ambari
阅读量:6288 次
发布时间:2019-06-22

本文共 5948 字,大约阅读时间需要 19 分钟。

hot3.png

Step by step: Install Ambari

Please also refer to official guide (), I just refacor this guide, because I think there is something difficult to a guy like without too much knowledge on linux, so I wrote this notes after I got it installed successfully on Redhat Linux.

Table of Contents

 

Step 1. Build Ambari

 

Getting Ambari

The source can be checked out anonymously from SVN with this command:

$ svn checkout http://svn.apache.org/repos/asf/incubator/ambari/trunk ambari 

Note: normally you better download to the machine that you want to install as ambary server, it’s easy to copy and run I mean.

How to build Ambari

You need to build Ambari RPMs from the source code that you checked out:

$ yum install rpm-build
$ cd hmc/package/rpm
$ ./create_hmc_rpm.sh
$ cd mon_dashboard/package/rpm
$ ./create_dashboard_rpm.sh

When this succeeds, you will find following RPMs inside the ambari directory:

1) hmc/package/rpm/build/rpmbuild/RPMS/noarch/ambari-1.0.0-1.noarch.rpm

2) hmc/package/rpm/build/rpmbuild/RPMS/noarch/ambari-agent-1.0.0-1.noarch.rpm

3) mon_dashboard/package/rpm/build/rpmbuild/RPMS/noarch/hdp_mon_dashboard-0.0.1-2.noarch.rpm

Step 2: Install Ambari Master server

 

Prepare to install Ambari Master

We will refer to the node running the Ambari server as Ambari master and the nodes to which Hadoop services will be installed as cluster nodes.

1) Set up password-less SSH for root on all your cluster nodes.

  • Copy root's SSH public key to all the cluster nodes in the authorized_keys file.
  • Save the corresponding SSH private key file locally. You will be prompted by Ambari UI to upload it during cluster installation.

My execution:

1.  Run on ambary master: % ssh-keygen -t dsa

2.  Copy pubkey to each nodes:

Scp ~/.ssh/id_dsa.pub  root@<each node IP>:/.ssh/authorized_keys

3.  Back up id_dsa, this will be as private key when you want to launch Ambari install Hadoop clusters.

Note: you might need create .ssh folder on each node manually.

2) Install ambari-agent-1.0.0-1.noarch.rpm on each of the cluster nodes by running:

$ sudo rpm -Uvh ambari-agent-1.0.0-1.noarch.rpm

3) Stop iptables on the Ambari master:

$ sudo service iptables stop

Install Ambari Master

You should run the following at the command line on Ambari master:

$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
OR $ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
 $ sudo rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
$ sudo rpm -Uvh http://public-repo-1.hortonworks.com/HDP-1.0.13/repos/centos5/hdp-release-1.0.13-1.el5.noarch.rpm

To install necessary PHP modules on Ambari master:

$ sudo yum install php-pecl-json  # version 1.2.1 compatible with php-5.1 or php-5.2
$ sudo yum install php-pdo
$ php -m | grep posix

If the posix module is not found, run:

$ sudo yum install php-process

Depending on which packages you have already installed, you may need to run following on Ambari master:

$ sudo yum install pdsh
$ sudo yum install httpd-devel
$ sudo yum install mod_passenger
$ sudo yum install puppet-2.7.9
$ sudo yum install ruby-devel

To install Ambari on Ambari master:

$ sudo rpm -iv ambari-1.0.0-1.noarch.rpm
$ sudo rpm -iv hdp_mon_dashboard-0.0.1-2.noarch.rpm

Step 3: Install Ambari Agent node

 

Install dependencies before install Ambari Agent

You should run the following at the command line on Ambari master:

$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
OR $ sudo rpm -Uvh
$ sudo rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
$ sudo rpm -Uvh http://public-repo-1.hortonworks.com/HDP-1.0.13/repos/centos5/hdp-release-1.0.13-1.el5.noarch.rpm

To install necessary PHP modules on Ambari master:

$ sudo yum install php-pecl-json  # version 1.2.1 compatible with php-5.1 or php-5.2
$ sudo yum install php-pdo
$ php -m | grep posix

If the posix module is not found, run:

$ sudo yum install php-process

Depending on which packages you have already installed, you may need to run following on Ambari master:

$ sudo yum install pdsh
$ sudo yum install httpd-devel
$ sudo yum install mod_passenger
$ sudo yum install puppet-2.7.9
$ sudo yum install ruby-devel

Install Agent

Copy ambary agent rpm from ambary build

$ sudo scp root@
:./ambari/hmc/package/rpm/build/rpmbuild/RPMS/noarch/ambari-agent-1.0.0-1.noarch.rpm root@
:/ambari

Install ambari-agent-1.0.0-1.noarch.rpm on each of the cluster nodes by running:

$ sudo rpm -Uvh ambari-agent-1.0.0-1.noarch.rpm

Step 4: Launch Ambari

Hadoop requires JDK. You can download following files from the Oracle website:  After accepting the license and downloading the files, copy them to /var/run/hmc/downloads/ directory on the Ambari master (Note: Upon download, these files may have .sh extension, so make sure you remove the .sh extension from the filenames and also set the execute permission on them)

1) jdk-6u26-linux-x64.bin

2) jdk-6u26-linux-i586.bin

Start Ambari server

$ sudo service ambari start

Start Install Hadoop cluster by Ambari

Now that Ambari server is installed and started, you can start installing Apache Hadoop and its ecosystem components on your cluster nodes by visiting from your browser.

master server>/hmc/html/

Issues : You may have

 

Hostname issue

Please double check you host name on master nodes and slave node, please change them to FQDN name, like <hostname.domain.com>.

$  hostname –f
$ vi /etc/hosts

Certificate issue

Some node you might have issue when you test:

$ puppetd --test --server server.puppet.com

Error: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key

Solution: You probally need remove/backup /etc/lib/puppet/ssl

Then retest this command, new cert will be generated. In my case, this issue gets resolved

转载于:https://my.oschina.net/zhujinbao/blog/70404

你可能感兴趣的文章
“黑科技”安防界遍地开花 公安实战如何应用?
查看>>
《C++编程规范:101条规则、准则与最佳实践》——2.9 确保资源为对象所拥有。使用显式的RAII和智能指针...
查看>>
《Web异步与实时交互——iframe AJAX WebSocket开发实战》—— 2.1 简介
查看>>
《SOA达人迷》目录—导读
查看>>
Apache Kylin权威指南1.5 Apache Kylin的主要特点
查看>>
Java IO: 其他字节流(上)
查看>>
Java中的锁
查看>>
节省60%费用!巧用阿里云归档存储降低基因测序成本
查看>>
《Adobe Dreamweaver CS6中文版经典教程》——1.7 创建自定义的快捷键
查看>>
linux学习笔记三: secureCRT小键盘输入数字键的时候,出现字母的解决方法:
查看>>
beego打印请求http内容
查看>>
手机自动化测试:Appium源码分析之跟踪代码分析二
查看>>
老李推荐:第8章7节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-小结
查看>>
Java语言概述
查看>>
支持 web sftp的Jumpserver 1.4.2 发布
查看>>
企业环境下MySQL5.5调优
查看>>
【阿里云MVP Meetup 第四期】产业中的“图像识别”分享与探索,干货来袭!
查看>>
集体通宵发版怎么破?阿里敏捷教练开出四道“药方”
查看>>
git常用命令
查看>>
3.07-JS合并两个JSON对象
查看>>