centos6.5下安装ambari

本文涉及的产品
云原生数据库 PolarDB MySQL 版,Serverless 5000PCU 100GB
简介:

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      |
|     . . .       |
+-----------------+
[root@ambari ~] # cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 
[root@ambari ~] # scp ~/.ssh/authorized_keys master:/root/.ssh/
[root@ambari ~] # scp ~/.ssh/authorized_keys slave:/root/.ssh/


5.关闭selinux 和防火墙


 二、安装ambari

1.配置yum源

1
2
[root@ambari ~] # wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo
[root@ambari ~] # mv ambari.repo  /etc/yum.repos.d/


2.安装ambari-server

1
[root@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
[root@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.com /ARTIFACTS/UnlimitedJCEPolicyJDK7 .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/目录
[root@ambari ~] # cd /var/lib/ambari-server/resources/
[root@ambari resources] # mv /root/jdk-7u67-linux-x64.tar.gz  .


4.启动服务

1
2
3
4
5
6
7
8
9
[root@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



本文转自 shouhou2581314 51CTO博客,原文链接:http://blog.51cto.com/thedream/1902609,如需转载请自行联系原作者

相关实践学习
使用PolarDB和ECS搭建门户网站
本场景主要介绍基于PolarDB和ECS实现搭建门户网站。
阿里云数据库产品家族及特性
阿里云智能数据库产品团队一直致力于不断健全产品体系,提升产品性能,打磨产品功能,从而帮助客户实现更加极致的弹性能力、具备更强的扩展能力、并利用云设施进一步降低企业成本。以云原生+分布式为核心技术抓手,打造以自研的在线事务型(OLTP)数据库Polar DB和在线分析型(OLAP)数据库Analytic DB为代表的新一代企业级云原生数据库产品体系, 结合NoSQL数据库、数据库生态工具、云原生智能化数据库管控平台,为阿里巴巴经济体以及各个行业的企业客户和开发者提供从公共云到混合云再到私有云的完整解决方案,提供基于云基础设施进行数据从处理、到存储、再到计算与分析的一体化解决方案。本节课带你了解阿里云数据库产品家族及特性。
相关文章
|
2天前
|
安全 Linux 开发者
CentOS 7安装全解析:适合初学者的指导
CentOS 7安装全解析:适合初学者的指导
|
2天前
|
关系型数据库 MySQL Linux
在Centos7中:通过Docker安装MySQL5.7(保姆级)
在Centos7中:通过Docker安装MySQL5.7(保姆级)
|
2天前
|
存储 安全 Linux
Centos停止更新?这篇博客教会你安装平替Centos的操作系统安装Anolis
Centos停止更新?这篇博客教会你安装平替Centos的操作系统安装Anolis
|
4天前
|
关系型数据库 MySQL Linux
Linux CentOs7 安装Mysql(5.7和8.0版本)密码修改 超详细教程
Linux CentOs7 安装Mysql(5.7和8.0版本)密码修改 超详细教程
|
9天前
|
运维 安全 Linux
如何在CentOS7一键安装宝塔面板并实现固定地址访问内网宝塔进行管理
如何在CentOS7一键安装宝塔面板并实现固定地址访问内网宝塔进行管理
|
9天前
|
Linux 测试技术 数据安全/隐私保护
CentOS安装MeterSphere并实现无公网IP远程访问本地测试平台
CentOS安装MeterSphere并实现无公网IP远程访问本地测试平台
|
10天前
|
Linux Docker 容器
centos7安装docker图文详解
该文档提供了在CentOS上安装Docker的步骤:检查系统内核版本(需大于3.10),更新yum,卸载旧版Docker,安装yum-utils和依赖包,设置Docker仓库,列出并选择Docker版本,安装Docker,最后启动并设置Docker开机启动,通过`docker version`验证安装是否成功。
|
10天前
|
关系型数据库 MySQL 应用服务中间件
centos7在线安装jdk1.8+tomcat+mysql8+nginx+docker
现在,你已经成功在CentOS 7上安装了JDK 1.8、Tomcat、MySQL 8、Nginx和Docker。你可以根据需要配置和使用这些服务。请注意,安装和配置这些服务的详细设置取决于你的具体需求。
35 2
|
12天前
|
NoSQL Linux 网络安全
【专栏】在 RHEL 8 或者 CentOS 8 上顺利安装并运行MongoDB,以处理非结构化数据和扩展技术栈
【4月更文挑战第28天】本文档介绍了如何在RHEL或CentOS 8上安装MongoDB,包括环境准备(系统更新、依赖安装、硬件需求和sudo用户)、导入MongoDB GPG公钥、创建Yum仓库、安装MongoDB社区版,以及后续的基本配置和验证(启动服务、防火墙设置和连接验证)。通过这些步骤,用户可以顺利安装并运行MongoDB,以处理非结构化数据和扩展技术栈。
|
12天前
|
安全 Linux 网络安全
【专栏】CentOS 8 最小安装提供了一个精简高效的环境
【4月更文挑战第28天】本文介绍了如何进行CentOS 8的最小安装,包括准备工作(确认硬件兼容性、下载ISO镜像、制作启动盘及备份数据)和安装步骤(选择语言、最小环境、网络设置、安全策略、分区、用户设置及开始安装)。安装后需进行基础配置,如系统更新、SELinux设置、防火墙配置、安装必要软件包和服务优化。最小安装提供了一个精简高效的环境,便于用户根据需求自定义和管理服务器。

热门文章

最新文章