[root@hdc-data1 ~]# ambari-server setupUsing python /usr/bin/python
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 firewall status...
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7[3] Custom JDK==============================================================================Enter choice (1): 3WARNING: 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_181
Validating JDK on Ambari Server...done.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n](n)? y
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 / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)[6] - SQL Anywhere
[7] - BDB==============================================================================Enter choice (1): 3Hostname (localhost):
Port (3306):
Database name (ambari):
Username (ambari):
Enter Database Password (bigdata):
Re-enter password:
Configuring ambari database...
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n](y)? y
Extracting system views...
.....ambari-admin-2.6.2.0.155.jar
......
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
将Ambari数据库脚本导入到数据库
1
2
3
4
#用Ambari用户(上面设置的用户)登录mysqlmysql -u ambari -p
use ambari;source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
启动Ambari
1
ambari-server start
WebUI配置
图截得有点糊...
创建集群名称
选择HDP版本和选择本地仓库
配置HDP的Repository
输入集群节点host(FQDN)和Ambari节点SSH的私钥
等待ambari-agents注册
若报错
【遇到问题 Confirm Hosts】 注册ambari-agents时failed NetUtil.py:96 - EOF occurred in violation of protocol (_ssl.c:579) SSLError: Failed to connect. Please check openssl library versions. 解决:如下第三个方案,/etc/ambari-agent/conf/ambari-agent.ini文件只有执行该步骤进行注册才生成。修改后点击“Retry Failed”按钮,等待注册成功进入下一步。