文档章节

Step by step: Install Ambari

woodo
 woodo
发布于 2012/08/02 11:59
字数 995
阅读 1813
收藏 3

Step by step: Install Ambari

Please also refer to official guide (http://incubator.apache.org/ambari/install.html), 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 by step: Install Ambari 1

Step 1. Build Ambari 1

Step 2: Install Ambari Master server. 2

Step 3: Install Ambari Agent node.. 4

Step 4: Launch Ambari 6

Issues : You may have.. 6

 

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

Install Agent

Copy ambary agent rpm from ambary build

$ sudo scp root@<ambari server>:./ambari/hmc/package/rpm/build/rpmbuild/RPMS/noarch/ambari-agent-1.0.0-1.noarch.rpm root@<ambary node>:/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: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html 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.

http://<ambari 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

© 著作权归作者所有

woodo
粉丝 5
博文 57
码字总数 32118
作品 0
朝阳
高级程序员
私信 提问
Ambari在离线环境中安装Hadoop集群

(WJW)Ambari在离线环境中安装Hadoop集群 如果手工安装Hadoop集群,在管理和后继部署中,越来越多的问题不断出现,主要如下:+ 各集群节点的配置同步+ 新应用的部署:比如为集群添加hbase应用,...

白石
2015/10/26
1K
0
Apache Ambari 2.4 发布,Hadoop 管理监控

Apache Ambari 2.4 发布了,Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应、管理和监控。Ambari目前已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Z...

开源中国股侠
2016/09/08
2.6K
0
centos7.4配置ambari2.4.0.1+HDP-2.5.0.0

前言   由于项目需求,最近需要使用ambari配置hdp,因此在公司找了台搭建一套测试环境,测试环境运行在kvm虚拟机上,ambari版本和hdp版本没有采用最新版进行配置,为了快速进行配置,使用了...

sdhzdtwhm
2018/07/09
0
0
ambari部署hadoop集群

1、基本工具 yum、scp、curl、wget、pdsh、ssh 2、环境准备 2.1、系统环境 Centos6.5 64bit Ambari 1.4.3.38 2.2、ambari server 与 ambari agent 服务器root ssh无密互访 Ambari server服务...

chunhei2008
2014/01/18
1K
0
CentOS6、7局域网离线安装Ambari

(自己安装多遍,踩过各种坑,终于趟顺了,下面绝对完整版) (安装6、7的步骤一样,只是相关执行命令6、7会有差别) 1.1 Ambari Ambari的作用来说,就是创建、管理、监视 Hadoop的集群。Amb...

cp_panda_5
2018/04/18
0
0

没有更多内容

加载失败,请刷新页面

加载更多

前端技术之:Prisma Demo服务部署过程记录

安装前提条件: 1、已经安装了docker运行环境 2、以下命令执行记录发生在MackBook环境 3、已经安装了PostgreSQL(我使用的是11版本) 4、Node开发运行环境可以正常工作 首先需要通过Node包管...

popgis
今天
5
0
数组和链表

数组 链表 技巧一:掌握链表,想轻松写出正确的链表代码,需要理解指针获引用的含义: 对指针的理解,记住下面的这句话就可以了: 将某个变量赋值给指针,实际上就是将这个变量的地址赋值给指...

code-ortaerc
今天
4
0
栈-链式(c/c++实现)

上次说“栈是在线性表演变而来的,线性表很自由,想往哪里插数据就往哪里插数据,想删哪数据就删哪数据...。但给线性表一些限制呢,就没那么自由了,把线性表的三边封起来就变成了栈,栈只能...

白客C
今天
42
0
Mybatis Plus service

/** * @author beth * @data 2019-10-20 23:34 */@RunWith(SpringRunner.class)@SpringBootTestpublic class ServiceTest { @Autowired private IUserInfoService iUserInfoS......

一个yuanbeth
今天
5
0
php7-internal 7 zval的操作

## 7.7 zval的操作 扩展中经常会用到各种类型的zval,PHP提供了很多宏用于不同类型zval的操作,尽管我们也可以自己操作zval,但这并不是一个好习惯,因为zval有很多其它用途的标识,如果自己...

冻结not
昨天
6
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部