配置ambari server

来自CloudWiki
跳转至: 导航搜索
  1. master
  1. yum -y install ambari-server

1 配置MariaDB数据库。

  1. master

安装MariaDB数据库。

  1. yum install mariadb mariadb-server mysql-connector-java

启动MariaDB数据库。

  1. systemctl enable mariadb
  1. systemctl start mariadb

配置MariaDB数据库。

  1. mysql_secure_installation

按Enter 键确认后设置数据库 root 密码,这里设置为“bigdata”

Remove anonymous users? [Y/n] y

Disallow root login remotely? [Y/n] n

Remove test database and access to it? [Y/n] y

Reload privilege tables now? [Y/n] y

创建Ambari数据库。

  1. mysql -uroot -pbigdata

MariaDB [(none)]> create database ambari;

MariaDB [(none)]> grant all privileges on ambari.* to 'ambari'@'localhost' identified by 'bigdata';

MariaDB [(none)]> grant all privileges on ambari.* to 'ambari'@'%' identified by 'bigdata';

MariaDB [(none)]> use ambari;

MariaDB [ambari]> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

MariaDB [ambari]> Bye

2 安装配置Ambari Server。

  1. master
  1. ambari-server setup

WARNING: SELinux is set to 'permissive' mode and temporarily disabled. OK to continue [y/n] (y)?

Customize user account for ambari-server daemon [y/n] (n)? n

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

Path to JAVA_HOME: /usr/jdk64/jdk1.8.0_77

Validating JDK on Ambari Server...done. 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

[4] - PostgreSQL

[5] - Microsoft SQL Server (Tech Preview) [6] - SQL Anywhere

==================================================================== Enter choice (1): 3

Hostname (localhost):

Port (3306):

Database name (ambari):

Username (ambari):

Enter Database Password (bigdata):

Proceed with configuring remote database connection properties [y/n] (y)?

Ambari Server 'setup' completed successfully.

3 启动Ambari Server服务。

  1. ambari-server start

检查ambari-server服务启动情况,

  1. ambari-server status

ambari-server is running.

查看端口状态显示出8080端口,即可。

  1. netstat -ntpl |grep 8080

打开浏览器,登录页面 http://192.168.200.131:8080/,在“用户名”的文本框中输入“admin”,在“密码”的文本框中输入“admin”,如图2-6所示。

[1519980648057058596.jpg]