[root@yz219 ~]# ambari-server setup # 1. 检查SELinux状态。 # 如果是enable状态,则在步骤2输入:n,关闭SELinux后重新执行ambari-server setup。 Using python /usr/bin/python Setup ambari-server Checking SELinux... SELinux status is 'disabled' # 2. 提示是否自定义设置。输入:y Customize user account for ambari-server daemon [y/n] (n)? y # 3. ambari账户,默认是root。 Enter user account for ambari-server daemon (root): Adjusting ambari-server permissions and ownership... # 4. 检查防火墙状态 Checking firewall status... # 5. 检查JDK Checking JDK... [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8 [2] Custom JDK ============================================================================== # 6. 选择“Custom JDK”,然后按以上JDK实际配置继续ambari配置。 Enter choice (1): 2 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: Property cannot be blank. Path to JAVA_HOME: /usr/java/jdk1.8.0_271-amd64/ Validating JDK on Ambari Server...done. Check JDK version for Ambari Server... JDK version found: 8 Minimum JDK version is 8 for Ambari. Skipping to setup different JDK for Ambari Server. Checking GPL software agreement... GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html # 7. 下载GPL协议,输入:y。 Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? y Completing setup... Configuring database... # 8. 配置(存储ambari数据的)数据库,输入:y。 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 ============================================================================== # 这里根据实际情况配置数据库,这里选择PostgreSQL作为数据库。 Enter choice (1): 4 Hostname (localhost): Port (5432): Database name (ambari): Postgres schema (ambari): Username (ambari): Enter Database Password (bigdata): Configuring ambari database... Configuring remote database connection properties... WARNING: Before starting Ambari Server, you must run the following DDL directly from the database shell to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql # 9. 准备连接数据库创建ambari数据库 Proceed with configuring remote database connection properties [y/n] (y)? y Extracting system views... ambari-admin-2.7.4.0.118.jar .... Ambari repo file doesn t contain latest json url, skipping repoinfos modification Adjusting ambari-server permissions and ownership... # 10. 完成 Ambari Server 'setup' completed successfully.