IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 大数据 -> 基于Ambari大数据集群安装03-ambari安装 -> 正文阅读

[大数据]基于Ambari大数据集群安装03-ambari安装

安装mysql

yum install mariadb* -y
service mariadb start
chkconfig mariadb on

配置mariadb

mysql_secure_installation

创建ambari依赖数据库

use mysql;
update user set Host='%' where user='root' and Host='127.0.0.1';
FLUSH PRIVILEGES;
CREATE DATABASE `ambari` DEFAULT CHARACTER SET utf8;
use ambari; 
CREATE USER 'ambari'@'%' IDENTIFIED BY 'bigdata';  
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';  
FLUSH PRIVILEGES;  
CREATE DATABASE `hive` DEFAULT CHARACTER SET latin1 ;
use hive;  
CREATE USER 'hive'@'%' IDENTIFIED BY 'hivepasswd';  
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';  
FLUSH PRIVILEGES;  
CREATE DATABASE `oozie` DEFAULT CHARACTER SET latin1 ;
use oozie;  
CREATE USER 'oozie'@'%' IDENTIFIED BY 'ooziepasswd';  
GRANT ALL PRIVILEGES ON *.* TO 'oozie'@'%';  
FLUSH PRIVILEGES;
CREATE DATABASE `ranger` DEFAULT CHARACTER SET latin1 ;
use ranger;  
CREATE USER 'ranger'@'%' IDENTIFIED BY 'rangerpasswd';  
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%';  
CREATE USER 'rangeradmin'@'%' IDENTIFIED BY 'rangeradminpasswd'; 
GRANT ALL PRIVILEGES ON *.* TO 'rangeradmin'@'%';  
FLUSH PRIVILEGES;
CREATE DATABASE `rangerkms` DEFAULT CHARACTER SET latin1 ;
use rangerkms;  
CREATE USER 'rangerkms'@'%' IDENTIFIED BY 'rangerkmspasswd';  
GRANT ALL PRIVILEGES ON *.* TO 'rangerkms'@'%';  
FLUSH PRIVILEGES;
CREATE DATABASE `druid` DEFAULT CHARACTER SET utf8 ;
use druid;  
CREATE USER 'druid'@'%' IDENTIFIED BY 'druidpasswd';  
GRANT ALL PRIVILEGES ON *.* TO 'druid'@'%';  
FLUSH PRIVILEGES;
CREATE DATABASE `superset` DEFAULT CHARACTER SET latin1 ;
use superset;  
CREATE USER 'superset'@'%' IDENTIFIED BY 'supersetpasswd';  
GRANT ALL PRIVILEGES ON *.* TO 'superset'@'%';  
FLUSH PRIVILEGES;

创建ambari元数据

use ambari; 
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql  

安装ambari-server

yum -y install ambari-server

配置ambari

[root@hadoop3 jdk1.8.0_202-amd64]# 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):
Adjusting ambari-server permissions and ownership...
Checking firewall status...
WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.
OK to continue [y/n] (y)? 
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
==============================================================================
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: /usr/java/jdk1.8.0_202-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
Enable Ambari Server to download and install GPL Licensed LZO packages [y/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): hadoop2
Port (3306): 
Database name (ambari): 
Username (ambari): 
Enter Database Password (bigdata): 
Configuring ambari database...
Enter full path to custom jdbc driver: /root/mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar
Copying /root/mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar to /usr/share/java
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-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)? 
Extracting system views...
ambari-admin-2.7.5.0.72.jar
....
Ambari repo file doesn't contain latest json url, skipping repoinfos modification
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.

service ambari-server start
chkconfig ambari-server on

第一次报错

[root@hadoop3 ~]# service ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Ambari Server running with administrator privileges.
ERROR: Exiting with exit code -1. 
REASON: 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.

修改该异常

[root@hadoop3 ~]# rm -rf /usr/share/java
[root@hadoop3 ~]# mkdir -p /usr/share/java
[root@hadoop3 ~]# cp mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar /usr/share/java/
[root@hadoop3 ~]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java-5.1.40-bin.jar 
Using python  /usr/bin/python
Setup ambari-server
Copying /usr/share/java/mysql-connector-java-5.1.40-bin.jar to /var/lib/ambari-server/resources/mysql-connector-java-5.1.40-bin.jar
Creating symlink /var/lib/ambari-server/resources/mysql-connector-java-5.1.40-bin.jar to /var/lib/ambari-server/resources/mysql-connector-java.jar
If you are updating existing jdbc driver jar for mysql with mysql-connector-java-5.1.40-bin.jar. Please remove the old driver jar, from all hosts. Restarting services that need the driver, will automatically copy the new jar to the hosts.
JDBC driver was successfully initialized.
Ambari Server 'setup' completed successfully.

再次启动
启动成功

在这里插入图片描述
输入默认用户名密码admin/admin
在这里插入图片描述
由此可以通过ambari的安装界面进行集群安装和管理。

  大数据 最新文章
实现Kafka至少消费一次
亚马逊云科技:还在苦于ETL?Zero ETL的时代
初探MapReduce
【SpringBoot框架篇】32.基于注解+redis实现
Elasticsearch:如何减少 Elasticsearch 集
Go redis操作
Redis面试题
专题五 Redis高并发场景
基于GBase8s和Calcite的多数据源查询
Redis——底层数据结构原理
上一篇文章      下一篇文章      查看所有文章
加:2021-10-20 12:33:20  更:2021-10-20 12:33:53 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/24 2:51:48-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码