CentOS7下利用Ambari搭建HDP大数据平台(下)

简介: CentOS7下利用Ambari搭建HDP大数据平台(下)

五、安装ambari-server


yum -y install ambari-server

640.png

六、安装MariaDB数据库并配数据库


1、安装MariaDB数据库


yum -y install mariadb-server
systemctl enable mariadb.service
systemctl start mariadb.service
netstat -anp | grep 3306


640.png

640.png

2、设置数据库初始密码


mysqladmin -uroot password "ambari"

3、设置可以远程登录


mysql -uroot -pambari
grant all privileges on *.* to 'root'@'ambari' identified by 'ambari' with grant option;
grant all privileges on *.* to 'root'@'10.20.90.59' identified by 'ambari' with grant option;
flush privileges;
systemctl restart mariadb.service


4、创建ambari数据库


mysql -uroot -pambari -hambari 
create database ambari DEFAULT CHARSET utf8;
use ambari
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql


640.png

七、ambari-server初始化配置


[root@ambari home]# ambari-server setup
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):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): 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/local/jdk
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)? n
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): root
Enter Database Password (bigdata): ambari
Re-enter password: 
Configuring ambari database...
WARNING: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java and set property "server.jdbc.driver.path=[path/to/custom_jdbc_driver]" in ambari.properties.
Press <enter> to continue.
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.2.1.jar
.......
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.


拷贝jdbc驱动包,并在ambari.properties配置文件中添加jdbc驱动的配置


mkdir /usr/share/java
cp /home/mysql-connector-java-8.0.20.jar /usr/share/java/mysql-connector-java.jar
vi /etc/ambari-server/conf/ambari.properties 
#追加一行
server.jdbc.driver.path=/usr/share/java/mysql-connector-java.jar

640.png

ambari-server start

640.png


八、ambari web界面向导搭建集群

640.png640.png640.png

640.png


640.png



注意:这里的URL最后面的/斜杠需要去掉,(图误)

640.png

640.png640.png

640.png

640.png


640.png


640.png


640.png

640.png

640.png

640.png

640.png

640.png

640.png



九、排错


1、Confirm Hosts时出现安装ambari-agent的报错的解决方法


修改 /etc/ambari-agent/conf/ambari-agent.ini 文件,在 [security] 配置部分添加
[security]
...
force_https_protocol=PROTOCOL_TLSv1_2


2、yum.conf配置文件修改


vi /etc/yum.conf 
installonly_limit=5改为
installonly_limit=600


相关实践学习
基于MaxCompute的热门话题分析
Apsara Clouder大数据专项技能认证配套课程:基于MaxCompute的热门话题分析
相关文章
|
分布式计算 Hadoop 数据库
Hadoop学习笔记(HDP)-Part.08 部署Ambari集群
本文为HDP集群部署系列教程第八部分,详细介绍如何通过Ambari搭建HDP集群。涵盖Ambari数据库配置、ambari-server与ambari-agent的安装部署、自动化设置及Web界面登录等步骤,助力用户高效完成集群管理平台搭建。
512 0
|
分布式计算 Java Linux
centos7通过Ambari2.74部署Hadoop
centos7通过Ambari2.74部署Hadoop
|
数据可视化 Linux Apache
CentOS部署Apache Superset大数据可视化BI分析工具并实现无公网IP远程访问
CentOS部署Apache Superset大数据可视化BI分析工具并实现无公网IP远程访问
|
SQL 分布式计算 Hadoop
最新大数据集群安装方法CentOS7.6__大数据环境安装和配置
最新大数据集群安装方法CentOS7.6__大数据环境安装和配置
545 0
|
关系型数据库 MySQL Java
安装Ambari和HDP
安装Ambari和HDP
605 1
|
分布式计算 运维 大数据
盘点下近几年退役的顶级 Apache 大数据项目 - 继 Sentry,Sqoop 之后,Ambari 正式退役!
盘点下近几年退役的顶级 Apache 大数据项目 - 继 Sentry,Sqoop 之后,Ambari 正式退役!
|
安全 Java 大数据
CDH/HDP/CDP等大数据平台中如何快速应对LOG4J的JNDI系列漏洞
CDH/HDP/CDP等大数据平台中如何快速应对LOG4J的JNDI系列漏洞
|
SQL Oracle 关系型数据库
【大数据学习篇14】centos6安装Mysql(下)
【大数据学习篇14】centos6安装Mysql
128 0
|
SQL Oracle 关系型数据库
【大数据学习篇14】centos6安装Mysql(上)
【大数据学习篇14】centos6安装Mysql
317 0
|
缓存 分布式计算 大数据
大数据 | (三)centos7图形界面无法执行yum命令
大数据 | (三)centos7图形界面无法执行yum命令
389 0