Ambari使用入门(CentOS 6) 2015-05-04 17:00

介绍

Ambari是一款Hadoop软件部署、运维工具,由Hotonworks贡献给Apache.

前提条件

  • 已经安装好JDK
  • 已经关闭SELinux
  • 已经安装好数据库(存储Ambari数据)

安装步骤

  • 安装过程
cd /etc/yum.repos.d/
wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.0/ambari.repo
yum install ambari-server
#具体配置过程见下一个章节
ambari-server setup
ambari-server start
  • 配置过程
[root@ctrl yum.repos.d]# 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)?
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): 3
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /usr/java/jdk1.7.0_67
Validating JDK on Ambari Server...done.
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): 3
Hostname (localhost): 10.255.1.6
Port (3306):
Database name (ambari):
Username (ambari): root
Enter Database Password (bigdata):
Re-enter password:
Configuring ambari database...
WARNING: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java.
Press <enter> to continue.
ERROR: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java.
ERROR: Exiting with exit code -1.
REASON: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java.
[root@ctrl yum.repos.d]#
  • 拷贝MySQL JDBC驱动

拷贝MySQL JDBC驱动到/usr/share/java目录下:

cp /opt/hive/lib/mysql-connector-java-5.1.22-bin.jar /usr/share/java
  • 初始化Ambari数据库
mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

使用

http://<ambari-server-host>:8080
默认用户名密码是:admin/admin

Tags: #Ambari    Post on Hadoop