ambari安装文档

Ambari安装文档

一、系统版本和环境要求

系统:CentOS 7

Ambari: ambari-2.6.1.5

内存:主节点 至少4G内存以上

二、 准备工作

1、准备机器172.172.160.101-107

2、各个机器进行hostname配置

         Vi   /etc/hostname

关闭SELinux  setenforce 0

 

  • 临时关闭SELinux 

setenforce 0

  • 临时打开SELinux 

setenforce 1

  • 查看SELinux状态 

getenforce

  • 开机关闭SELinux 

编辑/etc/selinux/config文件,如下图,将SELINUX的值设置为disabled。下次开机SELinux就不会启动了。

3、进行管理服务主机与其他机器免密访问

         在101机器上执行

         Ssh-keygen

         ssh-copy-id   其他机器地址(例如 ssh-copy-id 172.172.160.102)

4、进行各个服务器的防火墙关闭

systemctl stop firewalld.service

 

systemctl disable firewalld.service

 

systemctl status firewalld.service

5、时间同步

         安装ntp:

yum install ntp

具体操作请参见教程:

https://www.linuxidc.com/Linux/2015-11/124911.htm

6、各个机器安装java

7、在其中一台机器上配置hosts,例如101

    Vi /etc/hosts

    添加内容:

  172.172.160.101 bigdata101.com

172.172.160.102 bigdata102.com

172.172.160.103 bigdata103.com

172.172.160.104 bigdata104.com

172.172.160.105 bigdata105.com

172.172.160.106 bigdata106.com

172.172.160.107 bigdata107.com

    分发给各个机器:

    Scp –r /etc/hosts 172.172.160.102:/etc/hosts

三、 开始安装ambari及搭建集群

1、首先将做好的离线源ambari.repo放在101机器的/etc/yum.repos.d/目录下

2、安装并启动httpd服务

         yum install httpd –y

service httpd restart

3、安装ambari-server

    yum -y install ambari-server

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

Adjusting ambari-server permissions and ownership...

Checking firewall status...

Checking JDK...

Do you want to change Oracle JDK [y/n] (n)? y

[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):

To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.

Do you accept the Oracle Binary Code License Agreement [y/n] (y)?

Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-8u112-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz

jdk-8u112-linux-x64.tar.gz... 100% (174.7 MB of 174.7 MB)

Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz

 

Installing JDK to /usr/jdk64/

Successfully installed JDK to /usr/jdk64/

Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jce_policy-8.zip

 

Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip

Installing JCE policy...

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 (4): 1

Database admin user (postgres):

Database name (ambari):

Postgres schema (ambari):

Username (ambari):

Enter Database Password (bigdata):

Default properties detected. Using built-in database.

Configuring ambari database...

Checking PostgreSQL...

Running initdb: This may take up to a minute.

Initializing database ... OK

About to start PostgreSQL

Configuring local database...

Configuring PostgreSQL...

Restarting PostgreSQL

Creating schema and user...

done.

Creating tables...

done.

Extracting system views...

............

Adjusting ambari-server permissions and ownership...

Ambari Server 'setup' completed successfully.

可以参考:

https://blog.csdn.net/dopamy_busymonkey/article/details/50687820

4、启动ambari服务器

ambari-server start

5、访问http://172.172.160.101:8080/

6、根据信息提示安装hadoop集群

         注:在HDP和HDP-UTILS选择URL时,使用我们自己的下载地址

         http://dev.huadongdata.net:83/HDP/centos7/2.6.4.0/

         http://dev.huadongdata.net:83/HDP-UTILS/centos7/1.1.0.22/

 

你可能感兴趣的:(ambari安装文档)