红联Linux门户
Linux帮助

Ambari server安装步骤及问题解决

发布时间:2015-08-14 15:14:07来源:dai451954706作者:Oooover

环境: Ubuntu 15.04。


1.配置软件源
cd /etc/apt/source.list.d/
wget  http://s3.amazonaws.com/dev.hortonworks.com/ambari/ubuntu12/2.x/BUILDS/2.1.0-1409/ambaribn.list
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
apt-get update


2.安装Mysql 和 ambari-server
apt-get install -y mysql-server ambari-server
安装mysql 过程中会要求输入mysql数据库的root对应的密码,一定要记住
耐心等待。


3.配置mysql数据库
启动Mysql:
/etc/init.d/mysql start
连接数据库:
mysql -u root -p
mysql> create database ambari;
mysql> use ambari;
Database changed
mysql>source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql


4.设置ambari-server
ambari-server setup
#此过程会要求配置运行用户、jdk、数据库名称、数据库对应的Hostname、连接数据库的用户名及对应的密码


5.启动ambari-server
ambari-server starting
#若启动失败,可以查看日志:/var/log/ambari-server/ambari-server.out
# 应该会有这么一行: Error injecting constructor, java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

解决方法(百度上的方法都不管用):
vi /etc/mysql/mysql.conf.d/mysqld.cnf
#将  bind-address            = localhost 
#改为
bind-address            = 0.0.0.0

重启Mysql:
/etc/init.d/mysql restart
 
再重启ambari-server :
ambari-server start

一切OK。


可参考官方坑爹的文档:https://cwiki.apache.org/confluence/display/AMBARI/Install+Ambari+2.1.0+from+Public+Repositories


CentOS 6.5下安装Ambari:http://www.linuxdiyf.com/linux/10274.html

CentOS 6.5下使用Ambari安装Hadoop集群:http://www.linuxdiyf.com/linux/10283.html

RHEL6.5上使用Ambari快速搭建Hadoop集群:http://www.linuxdiyf.com/linux/10282.html