设为首页 收藏本站
查看: 492|回复: 0

[经验分享] centos6.5下安装ambari

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2017-3-3 11:21:24 | 显示全部楼层 |阅读模式
Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应、管理和监控。Ambari目前已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeper、Sqoop和Hcatalog等。

一、前期环境准备
1.安装epel源
2.安装pdsh
1
yum -y install pdsh




3.在master和slave上配置hosts
1
2
3
4
5
cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.40.217  ambari
192.168.40.216  slave




4.设置免密码登录
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ssh-keygen  -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): #输入空格
Enter same passphrase again: #输入空格
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
01:f9:c3:e6:e2:cc:46:1c:55:68:c4:2d:2b:eb:77:09 root@localhost.localdomain
The key's randomart image is:
+--[ RSA 2048]----+
|      .+.+.      |
|      ..* .      |
|       =.o       |
|      o *.       |
|     . *S.       |
|      = E        |
|     * . . .     |
|      * . o      |
|     . . .       |
+-----------------+
[iyunv@ambari ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[iyunv@ambari ~]# scp ~/.ssh/authorized_keys master:/root/.ssh/
[iyunv@ambari ~]# scp ~/.ssh/authorized_keys slave:/root/.ssh/




5.关闭selinux 和防火墙

二、安装ambari
1.配置yum源
1
2
[iyunv@ambari ~]# wget http://public-repo-1.hortonworks ... s/2.0.1/ambari.repo
[iyunv@ambari ~]# mv ambari.repo  /etc/yum.repos.d/




2.安装ambari-server
1
[iyunv@ambari ~]# yum  -y install ambari-server  #过程比较慢,ambari-server包有80M大小



3.本地配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[iyunv@ambari ~]# ambari-server setup
Using python  /usr/bin/python2.6
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):
Adjusting ambari-server permissions and ownership...
Checking iptables...
Checking JDK...
[1] Oracle JDK 1.7
[2] Oracle JDK 1.6
[3] - Custom JDK
==============================================================================
Enter choice (1): 1
JDK already exists, using /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
Installing JDK to /usr/jdk64/
Successfully installed JDK to /usr/jdk64/
Downloading JCE Policy archive from http://public-repo-1.hortonworks ... edJCEPolicyJDK7.zip to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
UnlimitedJCEPolicyJDK7.zip... 100%
Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/UnlimitedJCEPolicyJDK7.zip
Installing JCE policy...
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL
[4] - PostgreSQL
==============================================================================
Enter choice (1):
Database name (ambari):
Postgres schema (ambari):
Username (ambari):
Enter Database Password (bigdata):
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take upto a minute.
Initializing database: [  OK  ]
About to start PostgreSQL
Configuring local database...
Connecting to local database...done.
Configuring PostgreSQL...
Restarting PostgreSQL
Extracting system views...
..ambari-admin-2.0.1.45.jar
.
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
###这里由于下载jdk速度过慢。我提前把jdk下载下来放到了/var/lib/ambari-server/resources/目录
[iyunv@ambari ~]# cd /var/lib/ambari-server/resources/
[iyunv@ambari resources]# mv /root/jdk-7u67-linux-x64.tar.gz  .



4.启动服务
1
2
3
4
5
6
7
8
9
[iyunv@ambari ~]# ambari-server start
Using python  /usr/bin/python2.6
Starting ambari-server
WARNING: The hostname was not found in the reverse DNS lookup. This may result in incorrect behavior. Please check the DNS setup and fix the issue.
Ambari Server running with administrator privileges.
Organizing resource files at /var/lib/ambari-server/resources...
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log




启动ambari报错
1
2
WARNING: The hostname was not found in the reverse DNS lookup. This may result in incorrect behavior. Please check the DNS setup and fix the issue. ‘
这个问题是由于没有把主机名已经对应的ip加到/etc/hosts 导致的。




5.访问web
http://ip:8080  默认用户是admin,密码admin


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-349679-1-1.html 上篇帖子: kubernets kube-proxy原理分析 下篇帖子: Rancher v1.2:网络架构解读
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表