CentOS7.4 + Ambari 2.6.1.5 + HDP 2.6.4.0 安装部署
1. 参考说明
参考文档:
2. 安装环境说明
2.1. 环境说明
主控终端 |
计算终端1 |
计算终端2 |
计算终端2 |
|
主机名 |
master.smartmap.com |
server1.smartmap.com |
server2.smartmap.com |
server3.smartmap.com |
IP |
192.168.1.30 |
192.168.1.31 |
192.168.1.32 |
192.168.1.33 |
Subnet mask |
255.255.255.0 |
255.255.255.0 |
255.255.255.0 |
255.255.255.0 |
Gateway |
192.168.1.1 |
192.168.1.1 |
192.168.1.1 |
192.168.1.1 |
DNS |
218.30.19.50 61.134.1.5 |
218.30.19.50 61.134.1.5 |
218.30.19.50 61.134.1.5 |
218.30.19.50 61.134.1.5 |
另外一台计算机作为本地源,其IP为:192.168.1.50
2.2. 设置IP与服务器名映射
2.2.1. 设置/etc/hosts文件
[root@master ~]# vi /etc/hosts
192.168.1.30 master master.smartmap.com
192.168.1.31 server1 server1.smartmap.com
192.168.1.32 server2 server2.smartmap.com
192.168.1.33 server3 server3.smartmap.com
2.2.2. 设置/etc/sysconfig/network文件
该文件是:Name Service Caching Daemon (NSCD)
[root@master ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master.smartmap.com
2.3. 修改ulimit(最大进程数和最大文件打开数)
[ambari@master ~]$ sudo vi /etc/security/limits.conf
* soft nofile 204800
* hard nofile 204800
* soft nproc 204800
* hard nproc 204800
[ambari@master ~]$ sudo vi /etc/security/limits.d/20-nproc.conf
# * soft nproc 4096
* soft nproc 204800
* hard nproc 204800
root soft nproc unlimited
2.4. 安装基础软件
[root@master ~]# yum install unzip wget ntp
2.5. 安装与配置NTP
[root@master ~]# yum update
[root@master ~]# yum install unzip wget ntp
[root@master ~]# systemctl is-enabled ntpd
disabled
[root@master ~]# systemctl enable ntpd
Created symlink from /etc/systemd/system/multi-u ser.target.wants/ntpd.service to /usr/lib/system d/system/ntpd.service.
[root@master ~]# systemctl start ntpd
[root@master ~]#
2.6. 添加用户
[root@master ~]# useradd ambari
[root@master ~]# passwd ambari
Changing password for user ambari.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@master ~]# chmod u+w /etc/sudoers
[root@master ~]#
[root@master ~]# vi /etc/sudoers
添加如下内容:
ambari ALL=(ALL) NOPASSWD: ALL
2.7. 配置SSH免密码登录
[ambari@master ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
……
+----[SHA256]-----+
[ambari@master ~]$ cd ~/.ssh/
[ambari@master .ssh]$ cat id_rsa.pub >> authorized_keys
[ambari@master .ssh]$ chmod 700 ~/.ssh
[ambari@master .ssh]$ chmod 600 ~/.ssh/authorized_keys
chmod: cannot access ‘/home/ambari/.ssh/authorized_keys’:
Permission denied
[ambari@master .ssh]$ sudo chmod 600 ~/.ssh/authorized_keys
[ambari@master .ssh]$
[ambari@master .ssh]$ scp ambari@192.168.1.30:/home/ambari/.ssh/authorized_keys /home/ambari/.ssh/authorized_keys_master
[ambari@master .ssh]$ scp ambari@192.168.1.31:/home/ambari/.ssh/authorized_keys /home/ambari/.ssh/authorized_keys_server1
[ambari@master .ssh]$ scp ambari@192.168.1.32:/home/ambari/.ssh/authorized_keys /home/ambari/.ssh/authorized_keys_server2
[ambari@master .ssh]$ scp ambari@192.168.1.33:/home/ambari/.ssh/authorized_keys /home/ambari/.ssh/authorized_keys_server3
[ambari@master .ssh]$ cat authorized_keys_master >> authorized_keys
[ambari@master .ssh]$ cat authorized_keys_server1 >> authorized_keys
[ambari@master .ssh]$ cat authorized_keys_server2 >> authorized_keys
[ambari@master .ssh]$ cat authorized_keys_server3 >> authorized_keys
[root@master .ssh]# scp root@192.168.1.30:/root/.ssh/authorized_keys /root/.ssh/authorized_keys_master
[root@master .ssh]# scp root@192.168.1.31:/root/.ssh/authorized_keys /root/.ssh/authorized_keys_server1
[root@master .ssh]# scp root@192.168.1.32:/root/.ssh/authorized_keys /root/.ssh/authorized_keys_server2
[root@master .ssh]# scp root@192.168.1.33:/root/.ssh/authorized_keys /root/.ssh/authorized_keys_server3
[root@master .ssh]# cat authorized_keys_master >> authorized_keys
[root@master .ssh]# cat authorized_keys_server1 >> authorized_keys
[root@master .ssh]# cat authorized_keys_server2 >> authorized_keys
[root@master .ssh]# cat authorized_keys_server3 >> authorized_keys
3. 软件包下载
3.1. JDK安装与配置
3.1.1. 下载地址
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3.1.2. JDK安装
3.1.2.1. 创建安装的目录
[ambari@master ~]$ cd /opt/
[ambari@master opt]$ sudo mkdir java/
[sudo] password for ambari:
[ambari@master opt]$ sudo chown -R ambari:ambari java/
[ambari@master opt]$
3.1.2.2. 上传软件包到/opt/java/目录下
3.1.2.3. 解压软件包
[ambari@master java]$ ls -la
total 186432
drwxr-xr-x 2 ambari ambari 64 May 4 18:04 .
drwxr-xr-x. 3 root root 18 May 4 18:00 ..
-rw-rw-r-- 1 ambari ambari 8409 May 4 18:04 jce_policy-8.zip
-rw-rw-r-- 1 ambari ambari 190890122 May 4 18:04 jdk-8u171-linux-x64.tar.gz
[ambari@master java]$ tar -zxvf jdk-8u171-linux-x64.tar.gz
……
[ambari@master java]$ ls -la
total 186432
drwxr-xr-x 3 ambari ambari 84 May 4 18:09 .
drwxr-xr-x. 3 root root 18 May 4 18:00 ..
-rw-rw-r-- 1 ambari ambari 8409 May 4 18:04 jce_policy-8.zip
drwxr-xr-x 8 ambari ambari 255 Mar 29 08:18 jdk1.8.0_171
-rw-rw-r-- 1 ambari ambari 190890122 May 4 18:04 jdk-8u171-linux-x64.tar.gz
[ambari@master java]$
3.1.2.4. 将解压后软件包分发到其它服务器
[ambari@master java]$ scp -r jdk1.8.0_171/ ambari@192.168.1.31:/opt/java/
[ambari@master java]$ scp -r jdk1.8.0_171/ ambari@192.168.1.32:/opt/java/
[ambari@master java]$ scp -r jdk1.8.0_171/ ambari@192.168.1.33:/opt/java/
3.1.2.5. 设置环境变量
[ambari@master java]$ sudo vi /etc/profile
export JAVA_HOME=/opt/java/jdk1.8.0_171
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/mysql-connector-java-5.1.46-bin.jar
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
[ambari@master java]$ source /etc/profile
[ambari@master java]$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
[ambari@master java]$
3.2. Java Cryptography Extension (JCE) 安装
3.2.1. 下载地址
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
3.2.2. JCE安装
3.2.2.1. 创建安装的目录
[ambari@master java]$ mkdir jce_policy-8
3.2.2.2. 上传软件包到/opt/java/目录下
3.2.2.3. 解压软件包
unzip -o -j -q jce_policy-8.zip -d /opt/java/jdk1.8.0_171/jre/lib/security/
[ambari@master java]$ unzip -o -j -q jce_policy-8.zip -d /opt/java/jce_policy-8
[ambari@master java]$ cd jce_policy-8
[ambari@master jce_policy-8]$ ll
total 16
-rw-rw-r-- 1 ambari ambari 3035 Dec 21 2013 local_policy.jar
-rw-r--r-- 1 ambari ambari 7323 Dec 21 2013 README.txt
-rw-rw-r-- 1 ambari ambari 3023 Dec 21 2013 US_export_policy.jar
[ambari@master jce_policy-8]$ cd ..
3.2.2.4. 将解压后软件包分发到其它服务器
[ambari@master java]$ scp -r /opt/java/jce_policy-8 ambari@192.168.1.31:/opt/java/
local_policy.jar
[ambari@master java]$ scp -r /opt/java/jce_policy-8 ambari@192.168.1.32:/opt/java/
local_policy.jar
[ambari@master java]$ scp -r /opt/java/jce_policy-8 ambari@192.168.1.33:/opt/java/
local_policy.jar
[ambari@master java]$
3.2.2.5. 复制Jar包
将其中的Jar包复制到/opt/java/jdk1.8.0_171/jre/lib/security/目录下
[ambari@master java]$ cp /opt/java/jce_policy-8/local_policy.jar /opt/java/jdk1.8.0_171/jre/lib/security/
[ambari@master java]$ cp /opt/java/jce_policy-8/US_export_policy.jar /opt/java/jdk1.8.0_171/jre/lib/security/
[ambari@master java]$ cp /opt/java/jce_policy-8/README.txt /opt/java/jdk1.8.0_171/jre/lib/security/
[ambari@master java]$
3.3. MySQL数据库安装(只在Master上)
3.3.1. 下载MySQL源
[ambari@master opt]$ sudo wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
[sudo] password for ambari:
--2018-05-04 19:34:36-- http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
3.3.2. 安装MySQL源
[ambari@master opt]$ sudo yum install mysql57-community-release-el7-8.noarch.rpm
Loaded plugins: fastestmirror
Examining mysql57-community-release-el7-8.noarch.rpm: mysql57-community-release-el7-8.noarch
Marking mysql57-community-release-el7-8.noarch.rpm to be installed
3.3.3. 安装MySQL
[ambari@master opt]$ sudo yum install mysql-server
3.3.4. 启动mysql服务
[ambari@master opt]$ sudo systemctl start mysqld
[ambari@master opt]$ sudo systemctl enable mysqld
3.3.5. 重置root密码
MySQL5.7会在安装后为root用户生成一个随机密码, MySQL为root用户生成的随机密码通过mysqld.log文件可以查找到
[ambari@master opt]$ sudo grep 'temporary password' /var/log/mysqld.log
2018-05-04T11:45:53.177586Z 1 [Note] A temporary password is generated for root@localhost: t/Df,4hjYX;4
[ambari@master opt]$
[ambari@master opt]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.22
…....
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_length=3;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_mixed_case_count=0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_number_count=0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_special_char_count=0;
Query OK, 0 rows affected (0.00 sec)
mysql> alter user 'root'@'localhost' identified by 'gis123';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+-------+
| Variable_name | Value |
+--------------------------------------+-------+
| validate_password_check_user_name | OFF |
| validate_password_dictionary_file | |
| validate_password_length | 4 |
| validate_password_mixed_case_count | 0 |
| validate_password_number_count | 0 |
| validate_password_policy | LOW |
| validate_password_special_char_count | 0 |
+--------------------------------------+-------+
7 rows in set (0.01 sec)
mysql> set global validate_password_length=3;
Query OK, 0 rows affected (0.00 sec)
mysql> alter user 'root'@'localhost' identified by 'gis';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[ambari@master opt]$ mysql -u root -p
Enter password:
3.3.6. 开放数据库访问权限
[root@localsource ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
……
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'gis' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
3.3.7. 安装mysql jdbc 驱动
3.3.7.1. 下载地址
https://dev.mysql.com/downloads/connector/j/5.1.html
3.3.7.2. 上传软件包到/opt/java/目录下
3.3.7.3. 解压软件包
[ambari@master java]$ tar -zxvf mysql-connector-java-5.1.46.tar.gz
3.3.7.4. 设置环境变量
[ambari@master java]$ ls -la /opt/java/mysql-connector-java-5.1.46/
total 2448
drwxr-xr-x 3 ambari ambari 178 Feb 26 21:28 .
drwxr-xr-x 6 ambari ambari 135 May 4 20:25 ..
-rw-r--r-- 1 ambari ambari 91845 Feb 26 21:28 build.xml
-rw-r--r-- 1 ambari ambari 247456 Feb 26 21:28 CHANGES
-rw-r--r-- 1 ambari ambari 18122 Feb 26 21:28 COPYING
-rw-r--r-- 1 ambari ambari 1004840 Feb 26 21:28 mysql-connector-java-5.1.46-bin.jar
-rw-r--r-- 1 ambari ambari 1004838 Feb 26 21:28 mysql-connector-java-5.1.46.jar
-rw-r--r-- 1 ambari ambari 61407 Feb 26 21:28 README
-rw-r--r-- 1 ambari ambari 63658 Feb 26 21:28 README.txt
drwxr-xr-x 8 ambari ambari 79 Feb 26 21:28 src
[ambari@master java]$ sudo vi /etc/profile
加入如下的内容:
export CLASSPATH=$CLASSPATH:/opt/java/mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar
[ambari@master java]$ source /etc/profile
3.3.7.5. 测试
import java.sql.*;
public class SqlTest {
public static void main(String[] args) throws Exception {
try {
String driver="com.mysql.jdbc.Driver";
String url="jdbc:mysql://127.0.0.1:3306/mysql?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false";
String user="root";
String password="gis";
Class.forName(driver);
Connection conn=DriverManager.getConnection(url,user,password);
Statement stmt=conn.createStatement();
System.out.println("mysql test successful!");
stmt.close();
conn.close();
} catch (Exception e) {
e.printStackTrace();
System.out.println("mysql test fail!");
}
}
}
编译执行
javac SqlTest.java
java SqlTest
4. 制作本地源
4.1. Ambari、HDP与HDP-UTILS的下载
软件包地址说明:
组件 |
下载地址 |
Ambari |
http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.5/ambari-2.6.1.5-centos7.tar.gz |
HDP |
http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0/HDP-2.6.4.0-centos7-rpm.tar.gz |
HDP-UTILS |
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/sles12/HDP-UTILS-1.1.0.22-sles12.tar.gz |
4.2. 相关准备工作
4.2.1. 安装 Apache HTTP 服务器
[root@localsource ~]# yum install httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
……
[root@localsource ~]# systemctl start httpd
[root@localsource ~]#
4.2.2. 安装本地源制作相关工具
[root@localsource ~]# yum install yum-utils createrepo
4.2.3. Ambari、HDP与HDP-UTILS的解压
解压后的文件结构如下:
修改HDP/ubuntu16/2.6.4.0-91/index.html中的内容
<html>
<head>
</head>
<body>
<div id="navigation"></div>
<div id="listing"></div>
<script src="jquery.min.js"></script>
<script type="text/javascript">
var S3BL_IGNORE_PATH = true;
//var BUCKET_NAME = 'BUCKET';
var BUCKET_URL = 'http://s3.amazonaws.com/dev.hortonworks.com';
var S3B_ROOT_DIR = 'HDP/ubuntu16/2.x/BUILDS/2.6.4.0-91/';
</script>
<script src="list.js"></script>
</body>
</html>
4.2.4. 制作本地源的repo文件
4.2.4.1. ambari.repo文件
[root@localsource html]# vi ambari.repo
[root@localsource html]#
#VERSION_NUMBER=2.6.1.5-3
[ambari-2.6.1.5]
name=ambari Version - ambari-2.6.1.5
baseurl=http://192.168.1.50/ambari/ambari/centos7/2.6.1.5-3
gpgcheck=1
gpgkey=http://192.168.1.50/ambari/ambari/centos7/2.6.1.5-3/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
4.2.4.2. hdp.repo文件
[root@localsource html]# vi hdp.repo
[root@localsource html]#
#VERSION_NUMBER=2.6.4.0-91
[HDP-2.6.4.0]
name=HDP Version - HDP-2.6.4.0
baseurl=http://192.168.1.50/ambari/HDP/centos7/2.6.4.0-91
gpgcheck=1
gpgkey=http://192.168.1.50/ambari/HDP/centos7/2.6.4.0-91/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
[HDP-UTILS-1.1.0.22]
name=HDP Utils Version - HDP-UTILS-1.1.0.22
baseurl=http://192.168.1.50/ambari/HDP-UTILS
gpgcheck=1
gpgkey=http://192.168.1.50/ambari/HDP-UTILS/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
4.2.5. 将两个repo文件放到Master机器上
将上面新建的源(ambari.repo和hdp.repo)放到Master机器(192.168.1.30)的/etc/yum.repos.d/下面
[root@localsource html]# scp ambari.repo root@192.168.1.30:/etc/yum.repos.d/
root@192.168.1.30's password:
ambari.repo 100% 263 20.2KB/s 00:00
[root@localsource html]# scp hdp.repo root@192.168.1.30:/etc/yum.repos.d/
root@192.168.1.30's password:
hdp.repo 100% 470 128.0KB/s 00:00
[root@localsource html]#
4.3. 创建数据库
[ambari@master java]$ mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
4.3.1. ambari库
mysql> create database ambari character set utf8;
Query OK, 1 row affected (0.16 sec)
mysql> CREATE USER 'ambari'@'%'IDENTIFIED BY 'gis';
Query OK, 0 rows affected (0.28 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.10 sec)
mysql>
4.3.2. hive库
mysql> create database hive character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> CREATE USER 'hive'@'%'IDENTIFIED BY 'gis';
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql>
4.3.3. oozie库
mysql> create database oozie character set utf8;
Query OK, 1 row affected (0.02 sec)
mysql> CREATE USER 'oozie'@'%'IDENTIFIED BY 'gis';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'oozie'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql>
5. 进行安装Ambari
5.1. 安装Ambari2.6.0
5.1.1. 安装Ambari
[ambari@master java]$ sudo yum install ambari-server
[sudo] password for ambari:
[root@master .ssh]# sudo yum install ambari-agent -y
Loaded plugins: fastestmirror, priorities
ambari-2.6.1.5 | 2.9 kB 00:00:00
Loading mirror speeds from cached hostfile
5.1.2. 配置Ambari
[ambari@master java]$ sudo ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
[sudo] password for ambari:
Using 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):ambari
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): 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: /opt/java/jdk1.8.0_171
Validating JDK on Ambari Server...done.
Checking GPL software agreement...
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):3
Hostname (localhost):
Port (3306):
Database name (ambari):
Username (ambari):
Enter Database Password (bigData): gis
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)?
Extracting system views...
ambari-admin-2.6.1.5.3.jar
...........
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
[ambari@master java]$
5.1.3. 配置MySQL的JDBC驱动
[ambari@master java]$ sudo cp /opt/java/mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar /usr/share/java
[root@master ~]# vi /etc/ambari-server/conf/ambari.properties
server.jdbc.driver.path=/opt/java/jdk1.8.0_171/lib/mysql-connector-java-5.1.46-bin.jar
5.1.4. 将Ambari数据库脚本导入到数据库
[ambari@master resources]$ mysql -u ambari -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
……
mysql> use ambari;
Database changed
mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Query OK, 0 rows affected (0.05 sec)
Query OK, 0 rows affected (0.00 sec)
5.2. 启动Amabri
[ambari@master ~]$ ambari-server start
5.3. 进入Web界面配置
http://192.168.1.30:8080/#/login
出现登录界面,默认管理员账户登录, 账户:admin 密码:admin
5.4. 安装HDP 2.6.4 配置集群