6.如果上面选择3自定义JDK,则需要设置JAVA_HOME。输入:/opt/java/jdk1.8.0_91
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: /opt/java/jdk1.8.0_91
Validating JDK on Ambari Server...done.
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
8.选择数据库类型。输入:3
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
==============================================================================
Enter choice (3): 3
9.设置数据库的具体配置信息,根据实际情况输入,如果和括号内相同,则可以直接回车。
Hostname (localhost):
Port (3306):
Database name (ambari):
Username (ambari):
Enter Database Password (Ambari-123):
WARNING: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java.
Press <enter> to continue.
WARNING: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java.
Press <enter> to continue.
11.将Ambari数据库脚本导入到数据库
如果使用自己定义的数据库,必须在启动Ambari服务之前导入Ambari的sql脚本
用Ambari用户(上面设置的用户)登录mysql
mysql -u ambari -p
use ambari
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql