离线centos6下安装Ambari2.2.1和HDP2.4

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

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

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

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

2.立本地资源库 在var/www/html下创建一个hdp目录,若是没有的请先安装httpd yum install httpd 把下到的三个资源安装解压完毕以后,传到hdp目录下,而后重启httpd服务,用下面三个地址来测试一下是否能够经过网址访问了,而后准备三个文件,hdp.repo,ambari.repo,hdp-util.repo 不要按照官方说的那个作,那个是会报错的,我把个人放出来,你们本身照着弄,修改一下地址就行,而后把这三个文件复制集群中的全部机器的/etc/yum.repos.d/目录下linux

下面我发一下他们的内容sql

hdp.reposhell


[HDP-2.3.0.0]
name=HDP Version - 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.repocentos


[HDP-UTILS-1.1.0.20]
name=HDP Utils Version - 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.安装以前的准备工做bash

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

(2)设置ntpd自动启动,全部机器

chkconfig --level 5 ntpd on      
service ntpd start

(3)禁用selinux,全部机器  

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

(4)设置时间同步,全部机器

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

没有安装ntpdate的能够yum一下    yum install -y ntpdate   

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

crontab -e    

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

0-59/10 * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP

 (5)修改/etc/hosts文件,全部机器,设置以下:

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


4.修改配置文件,全部机器

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


5.安装自定义的mysql服务

yum install -y mysql-server

安装完成以后用root帐户登录,执行下列命令

create database hive ; 
grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive'; 
create database oozie DEFAULT CHARACTER SET utf8; 
grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie';

若是mysql也装在集群中的某个机器上面,并且该服务也装在这个台机器上面。。好比个人hadoop.SlaveT1上面挂了hive服务,mysql也在它上面就会链接不上 还须要运行如下命令

grant all on hive.* TO 'hive'@'hadoop.SlaveT1' IDENTIFIED BY 'hive';

5.安装ambari服务

yum install -y epel-release 
yum install ambari-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


问题:

  1. mysql 找不到驱动

yum install mysql-connector-java

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

mysql> create database ambari character set utf8 ;  

mysql> use ambari;  

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

mysql> grant all privileges on ambari.* to ambari@'%' identified by '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 -e snappy-1.1.0-1.el6.x86_64 --nodeps

4. Does not contain a valid host:port authority

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: Execution of '/usr/hdp/current/hbase-master/bin/hbase-daemon.sh --config /usr/hdp/current/hbase-master/conf start master' returned 127. su: warning: cannot change directory to /home/hbase: Permission denied
-bash: /home/hbase/.bash_profile: Permission denied
-bash: /usr/hdp/current/hbase-master/bin/hbase-daemon.sh: No such file or directory

发现hbase-master下没有bin/hbase-daemon.sh 文件
须要手工拷入bin 、lib
相关文章
相关标签/搜索