ambari(二)安裝

1 SUDO權(quán)限及機器名標(biāo)準化

使用root用戶登錄:

1)添加用戶hadoop

groupadd hadoop

useradd -g hadoop hadoop

passwd hadoop dtsw1234

2)sudo權(quán)限配置

chmod u+w /etc/sudoers

vim /etc/sudoers

...

hadoop ALL=(ALL) NOPASSWD:ALL

...

chmod u-w /etc/sudoers

【注:更改完成后記得關(guān)閉寫權(quán)限,sudoers修改注意位置,不可直接加至末尾或開頭】

使用hadoop用戶,機器名標(biāo)準化

sudo hostnamectl set-hostname dtsw-001

sudo vim /etc/hosts

11111.11.11.11? qq



2 SSH無密碼登錄

hadoop用戶執(zhí)行: ssh-keygen -t rsa?

ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop@aa

3 安裝元數(shù)據(jù)庫(MySQL為例)

wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm

sudo rpm -ivh mysql57-community-release-el7-8.noarch.rpm --nodeps --force

sudo yum install mysql-server

sudo systemctl start mysqld

sudo systemctl enable mysqld

找到初始密碼,設(shè)置新密碼

grep 'temporary password' /var/log/mysqld.log

mysql -u root -p

mysql> Enter password: (輸入剛才查詢到的隨機密碼)

mysql> SET PASSWORD FOR 'root'@'da1'= "aaa";

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'aa' WITH

GRANT OPTION;

mysql>FLUSH PRIVILEGES;

創(chuàng)建ambari元數(shù)據(jù)庫

create database ambari character set utf8 ;

CREATE USER 'ambari'@'%'IDENTIFIED BY 'bigdata';

GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';

FLUSH PRIVILEGES;

4 安裝Ambari

4.1 安裝ambari-server

sudo yum install ambari-server

4.2 ambari-server設(shè)置

sudo ambari-server setup

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

Enter user account for ambari-server daemon (root):ambariAdjusting ambari-server

permissions and ownership... 輸入ambari

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.4.3 將ambari數(shù)據(jù)庫導(dǎo)入

4.4 啟動ambari-server

5 安裝向?qū)?/p>

Path to JAVA_HOME: /opt/java/jdk1.8.0_121/opt/jdk/jdk1.8.0_121

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

Enter choice (1): 3

Hostname (localhost):dtsw-001

Port (3306):

Database name (ambari):

Username (ambari):

Enter Database Password (bigdata):

Re-enter password:

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)? y

Extracting system views...

....ambari-admin-2.6.2.0.155.jar

Adjusting ambari-server permissions and ownership...

Ambari Server 'setup' completed successfully.

4.3 將ambari數(shù)據(jù)庫導(dǎo)入

mysql -uambari -pbigdata

mysql> use ambari;

Database changed

mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql

4.4 啟動ambari-server


sudo ambari-server start


訪問?ip:8080

添加版本如下操作

http://ip:81/repo/HDP/centos7/3.1.0.0-78/HDP-3.1.0.0-78.xml

http://ip:81/repo/HDP/centos7/3.1.0.0-78

http://ip:81/repo/HDP-UTILS/centos7/1.1.0.22

http://ip:81/repo/HDP-GPL/centos7/3.1.0.0-78

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容