1.首先要下载它们的安装包,别尝试着在yum来下,特别慢,最好的方式是通过建立本地资源的方式来安装。

 

http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.4.0.0/HDP-2.4.0.0-centos6-rpm.tar.gz

 

http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6/HDP-UTILS-1.1.0.20-centos6.tar.gz

 

http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.1.0/ambari-2.2.1.0-centos6.tar.gz

 

2.立本地资源库 在var/www/html下建立一个hdp目录,如果没有的请先安装httpd yum install httpd 把下到的三个资源安装解压完毕之后,传到hdp目录下,然后重启httpd服务,用下面三个地址来测试一下是否可以通过网址访问了,然后准备三个文件,hdp.repo,ambari.repo,hdp-util.repo 不要按照官方说的那个做,那个是会报错的,我把我的放出来,大家自己照着弄,修改一下地址就行,然后把这三个文件复制集群中的所有机器的/etc/yum.repos.d/目录下

 

下面我发一下他们的内容

 

hdp.repo

[HDP-2.3.0.0]
name=HDPVersion-HDP-2.3.0.0
baseurl=http://10.0.71.15/hdp/HDP/centos6/2.x/updates/2.3.0.0
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1 

ambari.repo


[Updates-ambari-2.2.1.0]
name=ambari-2.2.1.0-Updates
baseurl=http://10.0.71.15/hdp/ambari/centos6/2.2.1.0-161
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1 

hdp-util.repo

[HDP-UTILS-1.1.0.20]
name=HDPUtilsVersion-HDP-UTILS-1.1.0.20
baseurl=http://10.0.71.15/hdp/HDP-UTILS-1.1.0.20/repos/centos6
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1 

 

 

3.安装之前的准备工作

 

(1)设置ssh自动登陆,这个参照ssh自动登陆的那个去做就行,网址是http://www.cnblogs.com/cenyuhai/p/3280668.html

 

(2)设置ntpd自动启动,所有机器


chkconfig--level5ntpdon
servicentpdstart 

(3)禁用selinux,所有机器

 

vi /etc/sysconfig/selinux设置selinux=disabled

 

(4)设置时间同步,所有机器


cp/usr/share/zoneinfo/Asia/Shanghai/etc/localtime#设置时区为北京时间,这里为上海,因为centos里面只有上海。。。
ntpdateus.pool.ntp.org#时间同步 

没有安装ntpdate的可以yum一下yum install -y ntpdate

 

加入定时计划任务,每隔10分钟同步一下时钟

 

crontab -e

 

把下面的内容粘贴进去保存即可


0-59/10****/usr/sbin/ntpdateus.pool.ntp.org|logger-tNTP 

(5)修改/etc/hosts文件,所有机器,设置如下:


192.168.1.133hadoop.Master192.168.1.134hadoop.SlaveT1192.168.1.135hadoop.SlaveT2 

4.修改配置文件,所有机器


yuminstallyum-plugin-priorities
vi/etc/yum/pluginconf.d/priorities.conf
#设置为以下内容
[main]
enabled=1gpgcheck=0 

5.安装自定义的mysql服务

 

yum install -y mysql-server

 

安装完成之后用root账户登陆,执行下列命令


createdatabasehive;
grantallonhive.*TO'hive'@'%'IDENTIFIEDBY'hive';
createdatabaseoozieDEFAULTCHARACTERSETutf8;
grantallonoozie.*TO'oozie'@'%'IDENTIFIEDBY'oozie'; 

如果mysql也装在集群中的某个机器上面,而且该服务也装在这个台机器上面。。比如我的hadoop.SlaveT1上面挂了hive服务,mysql也在它上面就会连接不上 还需要运行以下命令


grantallonhive.*TO'hive'@'hadoop.SlaveT1'IDENTIFIEDBY'hive'; 

5.安装ambari服务


yuminstall-yepel-release
yuminstallambari-server 

//自己下载jdk linux x64,具体哪个版本,可以执行ambari-server setup时看到,放在/var/lib/ambari-server/resources下面 ,就免得它自己下了,速度老慢了。。

 

ambari-server setup

 

我的ambari数据库账号密码全是ambari

 

安装完毕之后启动ambari服务 ambari-server start

 

访问地址 ip:8080 用户名密码 admin/admin

 

 

 

问题:

mysql 找不到驱动

yuminstallmysql-connector-java 

2. 使用mysql数据库,需要手工导入建库建表

 

mysql>createdatabaseambaricharactersetutf8;

 

mysql>useambari;

 

mysql>source/var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

 

mysql>grantallprivilegesonambari.*toambari@'%'identifiedby'ambari';

 

3.


Error:Package:snappy-devel-1.0.5-1.el6.x86_64(epel)
Requires:snappy(x86-64)=1.0.5-1.el6
Installed:snappy-1.1.0-1.el6.x86_64(@anaconda-CentOS-201311272149.x86_64/6.5)
snappy(x86-64)=1.1.0-1.el6
Available:snappy-1.0.5-1.el6.x86_64(epel)
snappy(x86-64)=1.0.5-1.el6
解决方法:rpm-esnappy-1.1.0-1.el6.x86_64--nodeps 

4. Doesnotcontainavalidhost:portauthority

 

hosts 主机名带下划线,应该去掉下划线。。

 

5. ERROR 2015-08-14 17:11:26,557 main.py:272 - Failed to start ping port listener of:[Errno 98]Address already in use

 

将使用amabri的进程kill 掉

 

start hbase

 

6.

resource_management.core.exceptions.Fail:Executionof'/usr/hdp/current/hbase-master/bin/hbase-daemon.sh--config/usr/hdp/current/hbase-master/confstartmaster'returned127.su:warning:cannotchangedirectoryto/home/hbase:Permissiondenied
-bash:/home/hbase/.bash_profile:Permissiondenied
-bash:/usr/hdp/current/hbase-master/bin/hbase-daemon.sh:Nosuchfileordirectory
发现hbase-master下没有bin/hbase-daemon.sh文件
需要手工拷入bin、lib

posted on 2016-09-30 09:47  何石-博客  阅读(894)  评论(0编辑  收藏  举报