A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 武汉分校-小舞 黑马粉丝团   /  2018-12-18 15:39  /  5487 人查看  /  5 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

一、系统环境
1.操作系统
[size=10.5000pt]CentOS Linux release 7.3.1611 (Core)
[size=10.5000pt]最小化、全英文安装
[size=10.5000pt]root密码:root@123.
[size=10.5000pt]分区:

[size=12.0000pt]其他选项:

[size=10.5000pt]
2.节点及IP
[size=10.5000pt]hdp1 192.168.10.131
[size=10.5000pt]hdp2 192.168.10.132
[size=10.5000pt]
3.Ambari版本
[size=10.5000pt]Ambari-2.6.2.2
[size=10.5000pt]
4.HDP版本
[size=10.5000pt]HDP-2.6.5
[size=10.5000pt]
5.JDK版本
[size=10.5000pt]Ambari配置时会自动下载
[size=10.5000pt]
6.Mysql版本
[size=10.5000pt]mysql-5.7.18-1
[size=10.5000pt]
7.基本配置
[size=12.0000pt]1)配置阿里源
[size=10.5000pt]# curl -o /etc/yum.repos.d/CentOS-Base.repo[size=10.5000pt] [size=10.5000pt]http://mirrors.aliyun.com/repo/Centos-7.repo
[size=12.0000pt]2)安装wget
[size=10.5000pt]# yum install wget
[size=12.0000pt]3)网卡名称改名为ethx,以主节点为例,其他节点相同
[size=10.5000pt]# vi /etc/default/grub
[size=10.5000pt]GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet [size=10.5000pt]net.ifnames=0 biosdevname=0[size=10.5000pt]"
[size=10.5000pt]# grub2-mkconfig -o /boot/grub2/grub.cfg
[size=10.5000pt]# reboot
[size=10.5000pt]然后再修改网卡配置文件名称及其内的网卡名称
[size=10.5000pt][root@hdp1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
[size=10.5000pt]TYPE=Ethernet
[size=10.5000pt]BOOTPROTO=static
[size=10.5000pt]DEFROUTE=yes
[size=10.5000pt]NAME=eth0
[size=10.5000pt]DEVICE=eth0
[size=10.5000pt]ONBOOT=yes
[size=10.5000pt]IPADDR=192.168.10.131
[size=10.5000pt]NETMASK=255.255.255.0
[size=10.5000pt]GATEWAY=192.168.10.2
[size=10.5000pt]DNS1=192.168.10.2
[size=10.5000pt]
二、系统配置
1.修改最大可打开文件数(所有节点)
[size=10.5000pt][root@hdp1 ~]# ulimit -n 100000
[size=10.5000pt][root@master ~]# vi /etc/security/limits.conf[size=9.0000pt]
[size=10.5000pt]# End of file
[size=10.5000pt]* soft nofile 100000
[size=10.5000pt]* hard nofile 100000
2.主机名配置(所有节点)
[size=12.0000pt]根据节点修改主机名,如hdp1修改如下:
[size=10.5000pt][root@hdp1 ~]# hostnamectl set-hostname hdp1
[size=10.5000pt][root@hdp1 ~]# hostname -f
[size=10.5000pt]hdp1
[size=10.5000pt]
3.配置hosts文件(所有节点)
[size=10.5000pt][root@hdp1 ~]# vi /etc/hosts
[size=10.5000pt]127.0.0.1 localhost.localdomain localhost
[size=10.5000pt]::1 localhost6.localdomain6 localhost6
[size=10.5000pt]192.168.10.131 hdp1
[size=10.5000pt]192.168.10.132 hdp2
[size=10.5000pt]
4.配置主节点到所有节点的ssh免密登陆(主节点)
[size=10.5000pt][root@hdp1 ~]# ssh-keygen -t rsa
[size=10.5000pt][root@hdp1 ~]# ssh-copy-id hdp1
[size=10.5000pt][root@hdp1 ~]# ssh-copy-id hdp2
[size=10.5000pt]
5.配置NTP(所有节点)
[size=12.0000pt]主节点:
[size=10.5000pt][root@hdp1 yum.repos.d]# yum install -y ntp
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl enable ntpd
[size=12.0000pt]从节点:
[size=10.5000pt][root@hdp1 yum.repos.d]# yum install -y ntp
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl enable ntpd
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl start ntpd
[size=10.5000pt][root@hdp1 yum.repos.d]# crontab -e
[size=10.5000pt]0-59/10 * * * * /usr/sbin/ntpdate -u hdp1
[size=10.5000pt]
6.关闭防火墙(所有节点)
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl stop firewalld
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl stop iptables
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl disable firewalld
[size=10.5000pt][root@hdp1 yum.repos.d]# systemctl disable iptables
[size=10.5000pt][root@hdp1 yum.repos.d]# service iptables stop
[size=10.5000pt][root@hdp1 yum.repos.d]# chkconfig iptables off
[size=10.5000pt]
7.关闭SElinux(所有节点)
[size=10.5000pt][root@hdp1 yum.repos.d]# setenforce 0
[size=10.5000pt][root@hdp1 yum.repos.d]# vi /etc/sysconfig/selinux
[size=10.5000pt]SELINUX=disabled
[size=10.5000pt]
8.其他配置(所有节点)
[size=10.5000pt]# vi /etc/python/cert-verification.cfg
[size=10.5000pt]verify=disable  
[size=12.0000pt]避免安装hadoop集群时候报“heartbeats"[size=12.0000pt]错误错
[size=10.5000pt]
[size=12.0000pt]让端口监听在tcp而不要监听tcp6(可选)
[size=10.5000pt]# sysctl net.ipv6.conf.all.disable_ipv6=1
[size=10.5000pt]# echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf
[size=10.5000pt]
9.配置UMASK,设定用户创建目录的初始权限(所有节点)
[size=10.5000pt]# umask 0022
[size=10.5000pt]
10.禁止离线更新(所有节点)
[size=10.5000pt]# vi /etc/yum/pluginconf.d/refresh-packagekit
[size=10.5000pt]enabled=0
[size=10.5000pt]
三、下载安装文件
1.安装JDBC驱动(主节点)
[size=10.5000pt]# yum install mysql-connector-java -y
[size=12.0000pt]或者创建/usr/share/java目录,拷贝[size=10.5000pt]mysql-connector-java.jar[size=12.0000pt]到这个目录
[size=10.5000pt]
2.下载Ambari包(主节点)
[size=10.5000pt][root@hdp1 ~]# wget http://public-repo-1.hortonworks ... .2.2-centos7.tar.gz
[size=10.5000pt]
3.下载HDP包(主节点)
[size=10.5000pt][root@hdp1 ~]# wget http://public-repo-1.hortonworks ... -centos7-rpm.tar.gz
[size=10.5000pt][root@hdp1 ~]# wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz
[size=10.5000pt][root@hdp1 ~]# wget http://public-repo-1.hortonworks ... -centos7-gpl.tar.gz
[size=10.5000pt]
四、搭建本地仓库(主节点)
1.安装yum工具包
[size=10.5000pt][root@hdp1 ~]# yum install yum-utils createrepo[size=10.5000pt] -y
[size=10.5000pt]
2.安装httpd
[size=10.5000pt][root@hdp1 ~]# yum -y install httpd
[size=10.5000pt][root@hdp1 ~]# systemctl start httpd
[size=10.5000pt][root@hdp1 ~]# systemctl enable httpd
[size=10.5000pt]
3.创建yum仓库目录
[size=10.5000pt][root@hdp1 ~]# mkdir -p /var/www/html/hdp
[size=10.5000pt]
4.解压下载文件
[size=10.5000pt]把之前下载的Amabri包和HDP包解压到hdp目录
[size=10.5000pt]# tar xvf ambari-2.6.2.2-centos7.tar.gz -C /var/www/html/hdp/
[size=10.5000pt]# tar xvf HDP-2.6.5.0-centos7-rpm.tar.gz -C /var/www/html/hdp/
[size=10.5000pt]# tar xvf HDP-GPL-2.6.5.0-centos7-gpl.tar.gz -C /var/www/html/hdp/
[size=10.5000pt]# tar xvf HDP-UTILS-1.1.0.22-centos7.tar.gz -C /var/www/html/hdp/
[size=10.5000pt]拷贝MYSQL和OTHER目录到hdp目录
5.创建yum仓库
[size=10.5000pt]# cd /var/www/html/hdp
[size=10.5000pt]# createrepo ./
[size=10.5000pt]
6.创建repo文件
注意:文件名一定要叫ambari.repo
[size=10.5000pt][root@hdp1 hdp]# vi ambari.repo
[size=10.5000pt][HDP]
[size=10.5000pt]name=ambari-2.6.2.2_hdp-2.6.5
[size=10.5000pt]baseurl=http://192.168.10.131/hdp
[size=10.5000pt]gpgcheck=0
[size=10.5000pt]enabled=1
[size=10.5000pt]priority=1
[size=10.5000pt]
7.拷贝[size=10.5000pt]ambari.repo文件到所有节点的/etc/yum.repos.d目录
[size=10.5000pt][root@hdp1 hdp]# cp ambari.repo /etc/yum.repos.d/
[size=10.5000pt][root@hdp1 hdp]# scp ambari.repo hdp2:/etc/yum.repos.d/
[size=10.5000pt]测试可用性
[size=10.5000pt][root@hdp1 hdp]# yum clean all
[size=10.5000pt][root@hdp1 hdp]# yum repolist
[size=10.5000pt]
[size=10.5000pt]
五、安装Mysql(主节点)
1.卸载原有mariadb
[size=10.5000pt]# yum remove mariadb*
2.安装Mysql
[size=10.5000pt][root@hdp1 MYSQL]# yum install net-tools perl
[size=10.5000pt][root@hdp1 MYSQL]# tar xf mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
[size=10.5000pt][root@hdp1 MYSQL]# rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm
[size=10.5000pt][root@hdp1 MYSQL]# rpm -ivh mysql-community-libs-*
[size=10.5000pt][root@hdp1 MYSQL]# rpm -ivh mysql-community-client-5.7.18-1.el7.x86_64.rpm
[size=10.5000pt][root@hdp1 MYSQL]# rpm -ivh mysql-community-server-5.7.18-1.el7.x86_64.rpm
[size=10.5000pt][root@hdp1 MYSQL]# rpm -ivh mysql-community-devel-5.7.18-1.el7.x86_64.rpm
[size=10.5000pt]或者 yum install mysql-community-server
[size=10.5000pt][root@hdp1 MYSQL]# systemctl enable mysqld
[size=10.5000pt][root@hdp1 MYSQL]# systemctl start mysqld
[size=10.5000pt]
3.登录进mysql,初始化设置root密码
[size=10.5000pt]查看mysql密码
[size=10.5000pt][root@hdp1 MYSQL]# cat /var/log/mysqld.log |grep password
[size=10.5000pt]2018-08-13T15:24:10.808088Z 1 [Note] A temporary password is generated for root@localhost: [size=10.5000pt]7Ub1orhhka;g
[size=10.5000pt]修改root密码
[size=10.5000pt][root@hdp1 MYSQL]# mysql -uroot -p
[size=9.0000pt]set global validate_password_policy=0;
[size=9.0000pt]set global validate_password_mixed_case_count=0;
[size=9.0000pt]set global validate_password_number_count=3;
[size=9.0000pt]set global validate_password_special_char_count=0;
[size=9.0000pt]set global validate_password_length=3;
[size=9.0000pt]ALTER USER 'root'@'localhost' IDENTIFIED BY [size=9.0000pt]'root@123.[size=9.0000pt]';
[size=9.0000pt]use mysql;
[size=9.0000pt]update user set password_expired='N' where password_expired='Y' ;
[size=9.0000pt]update user set host='%' where user='root' and host='localhost';
[size=9.0000pt]flush privileges;
[size=10.5000pt]
4.登录mysql,执行下面的语句
[size=9.0000pt]CREATE DATABASE ambari;
[size=9.0000pt]use ambari;
[size=9.0000pt]CREATE USER 'ambari'@'%' IDENTIFIED BY 'ambari';
[size=9.0000pt]GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'%';
[size=9.0000pt]CREATE USER 'ambari'@'localhost' IDENTIFIED BY '[size=9.0000pt]ambari[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'localhost';
[size=9.0000pt]CREATE USER 'ambari'@'[size=9.0000pt]hdp1[size=9.0000pt]' IDENTIFIED BY '[size=9.0000pt]ambari[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'[size=9.0000pt]hdp1[size=9.0000pt]';
[size=9.0000pt]FLUSH PRIVILEGES;
[size=9.0000pt]CREATE DATABASE hive;
[size=9.0000pt]use hive;
[size=9.0000pt]CREATE USER 'hive'@'%' IDENTIFIED BY '[size=9.0000pt]hive[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'%';
[size=9.0000pt]CREATE USER 'hive'@'localhost' IDENTIFIED BY '[size=9.0000pt]hive[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'localhost';
[size=9.0000pt]CREATE USER 'hive'@'[size=9.0000pt]hdp1[size=9.0000pt]' IDENTIFIED BY '[size=9.0000pt]hive[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON hive.* TO 'hive'@'[size=9.0000pt]hdp1[size=9.0000pt]';
[size=9.0000pt]FLUSH PRIVILEGES;
[size=9.0000pt]CREATE DATABASE oozie;
[size=9.0000pt]use oozie;
[size=9.0000pt]CREATE USER 'oozie'@'%' IDENTIFIED BY '[size=9.0000pt]oozie[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON oozie.* TO 'oozie'@'%';
[size=9.0000pt]CREATE USER 'oozie'@'localhost' IDENTIFIED BY '[size=9.0000pt]oozie[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON oozie.* TO 'oozie'@'localhost';
[size=9.0000pt]CREATE USER 'oozie'@'[size=9.0000pt]hdp1[size=9.0000pt]' IDENTIFIED BY '[size=9.0000pt]oozie[size=9.0000pt]';
[size=9.0000pt]GRANT ALL PRIVILEGES ON oozie.* TO 'oozie'@'[size=9.0000pt]hdp1[size=9.0000pt]';
[size=9.0000pt]FLUSH PRIVILEGES;
[size=9.0000pt]exit;
[size=10.5000pt]
六、安装Ambari-server(主节点)
1.安装postgresql
[size=10.5000pt][root@hdp1 ~]# yum[size=10.5000pt] -y[size=10.5000pt] install postgresql postgresql-libs postgresql-server
2.安装Ambari-server
[size=10.5000pt][root@hdp1 ~]# yum[size=10.5000pt] -y[size=10.5000pt] install ambari-server
[size=10.5000pt]
3.初始化ambari-server
[size=10.5000pt][root@hdp1 ~]# ambari-server setup
[size=9.0000pt]Using python /usr/bin/python
[size=9.0000pt]Setup ambari-server
[size=9.0000pt]Checking SELinux...
[size=9.0000pt]SELinux status is 'enabled'
[size=9.0000pt]SELinux mode is 'permissive'
[size=9.0000pt]WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
[size=9.0000pt]OK to continue [y/n] (y)? y #输入y即可
[size=9.0000pt]Customize user account for ambari-server daemon [y/n] (n)? y #输入y即可
[size=9.0000pt]Enter user account for ambari-server daemon (root):root #使用root用户
[size=9.0000pt]Adjusting ambari-server permissions and ownership...
[size=9.0000pt]Checking firewall status...
[size=9.0000pt]Checking JDK...
[size=9.0000pt][1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[size=9.0000pt][2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[size=9.0000pt][3] Custom JDK
[size=9.0000pt]==============================================================================
[size=9.0000pt]Enter choice (1): 1 #如果能联网,建议选择1
[size=9.0000pt]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/technetwor ... /license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.
[size=9.0000pt]Do you accept the Oracle Binary Code License Agreement [y/n] (y)? y #输入y即可
[size=9.0000pt]Downloading JDK from http://public-repo-1.hortonworks ... 12-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz
[size=9.0000pt]jdk-8u112-linux-x64.tar.gz... 100% (174.7 MB of 174.7 MB)
[size=9.0000pt]Successfully downloaded JDK distribution to /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz
[size=9.0000pt]Installing JDK to /usr/jdk64/
[size=9.0000pt]Successfully installed JDK to /usr/jdk64/
[size=9.0000pt]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
[size=10.5000pt]
[size=9.0000pt]Successfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip
[size=9.0000pt]Installing JCE policy...
[size=9.0000pt]Checking GPL software agreement...
[size=9.0000pt]GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
[size=9.0000pt]Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)?
[size=9.0000pt]Completing setup...
[size=9.0000pt]Configuring database...
[size=9.0000pt]Enter advanced database configuration [y/n] (n)? y #输入y
[size=9.0000pt]Configuring database...
[size=9.0000pt]==============================================================================
[size=9.0000pt]Choose one of the following options:
[size=9.0000pt][1] - PostgreSQL (Embedded)
[size=9.0000pt][2] - Oracle
[size=9.0000pt][3] - MySQL / MariaDB
[size=9.0000pt][4] - PostgreSQL
[size=9.0000pt][5] - Microsoft SQL Server (Tech Preview)
[size=9.0000pt][6] - SQL Anywhere
[size=9.0000pt][7] - BDB
[size=9.0000pt]==============================================================================
[size=9.0000pt]Enter choice (1): 3 #选择3,使用Mysql
[size=9.0000pt]Hostname (localhost):
[size=9.0000pt]Port (3306):
[size=9.0000pt]Database name (ambari):
[size=9.0000pt]Username (ambari):
[size=9.0000pt]Enter Database Password (bigdata): #输入ambari数据库密码,即ambari
[size=9.0000pt]Re-enter password: #输入ambari数据库密码,即ambari
[size=9.0000pt]Configuring ambari database...
[size=9.0000pt]Configuring remote database connection properties...
[size=9.0000pt]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
[size=9.0000pt]Proceed with configuring remote database connection properties [y/n] (y)? y
[size=9.0000pt]Extracting system views...
[size=9.0000pt]ambari-admin-2.6.2.2.1.jar
[size=9.0000pt]...........
[size=9.0000pt]Adjusting ambari-server permissions and ownership...
[size=9.0000pt]Ambari Server 'setup' completed successfully.
[size=10.5000pt]
4.导入Mysql[size=9.0000pt]
[size=10.5000pt]执行以下语句导入数据库
[size=10.5000pt]# mysql -h localhost -uambari -p -Dambari < /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
[size=10.5000pt]
[size=10.5000pt]
[size=10.5000pt]
[size=10.5000pt]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar
5.启动Ambari-server
[size=10.5000pt][root@hdp1 ~]# ambari-server start
[size=10.5000pt]
[size=10.5000pt]
6.错误处理
[size=10.5000pt]  如果出现错误,请注意查看日志,根据具体的错误内容进行处理,默认ambari-server的日志在/var/log/ambari-server/ambari-server.log里面。如果在处理日志的过程中或者后面安装的过程中出现一些莫名的错误,可以重置的安装。如果上面进行的默认数据库的配置,可以使用下面的代码重置ambari-server
[size=10.5000pt][root@hdp1 ~]# ambari-server stop [root@hdp1 ~]# ambari-server reset [root@hdp1 ~]# ambari-server setup
[size=10.5000pt]  如果选择的是第二种方式,就需要先执行上面的语句,然后手动将mysql里面创建的数据库进行删除。然后再重新执行第二步的操作
file:///C:\Users\hg\AppData\Local\Temp\ksohtml\wps7453.tmp.png[size=12.0000pt]
[size=10.5000pt][root@hdp1 ~]# mysql -uroot -p[size=9.0000pt] [size=9.0000pt]mysql> drop database ambari; mysql> drop database hive; mysql> drop database oozie;
[size=10.5000pt]
[size=10.5000pt]  如果在安装的过程中出现了错误,又想重新安装,可以在ambari-server开启的情况下,在所有节点执行下面的语句来移除已安装的包,然后再通过不同的情况选择上面两种方式的一种对ambari-server进行重置
[size=10.5000pt]# python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent
[size=10.5000pt] 删除数据库
[size=10.5000pt]mysql -h localhost -uambari -p -Dambari <[size=10.5000pt] [size=10.5000pt]/var/lib/ambari-server/resources/Ambari-DDL-MySQL-DROP.sql
[size=10.5000pt]
五、安装配置部署HDP集群
1、登录
[size=10.5000pt]登录地址:主机ip+端口8080
[size=10.5000pt]登录界面,默认管理员账户登录, 账户:admin 密码:admin

2、安装向导

1)配置集群的名字为hadoop

2)选择版本并修改为本地源地址
[size=12.0000pt]Repository填写:http://192.168.10.131/hdp

3)安装配置
[size=10.5000pt]选择要安装的服务器和上传上面教程所拷贝出来的秘钥文件id_rsa

4)安装ambariagent,同时检查系统问题

[size=12.0000pt]可以点击Click here to see the check results.[size=12.0000pt]” 查看存在的问题,并解决

如果报错:
[size=10.5000pt]ERROR 2018-05-30 00:12:25,280 NetUtil.py:96 - EOF occurred in violation of protocol (_ssl.c:579)
[size=10.5000pt]ERROR 2018-05-30 00:12:25,280 NetUtil.py:97 - SSLError: Failed to connect. Please check openssl library versions.
[size=10.5000pt]解决方式:
[size=10.5000pt]1.
[size=10.5000pt]修改/etc/python/cert-verification.cfg配置文件:
[size=10.5000pt]# vi /etc/python/cert-verification.cfg
[size=10.5000pt][https]
[size=10.5000pt]verify=disable
[size=10.5000pt]# vi /etc/ambari-agent/conf/ambari-agent.ini
[size=10.5000pt][security]
[size=10.5000pt]ssl_verify_cert=0
[size=10.5000pt]force_https_protocol=PROTOCOL_TLSv1_2
[size=10.5000pt]若还是不能注册ambari-agent,使用下面介绍的方式。
[size=10.5000pt]2.如果上面方式还不能注册,说明jdk版本不通过,使用默认oraclejdk,博主是(centos7.3,所以选择jdk1.8
[size=10.5000pt]1)先停掉:ambari-server stop;然后停止所有节点agent:ambari-agent stop
[size=10.5000pt]2)卸载掉所有节点agent:rpm -qa | grep ambari-agent 得到对应版本,使用rpm -e ambari-agent-XXX卸载;
[size=10.5000pt]3)启动setupambari-server setup,配置你的东西,直到选择jdk如下图:

[size=10.5000pt]
[size=10.5000pt]选择1,等下载安装完成,继续后续步骤。直到结束
[size=12.0000pt]4)启动ambariambari-server start
[size=10.5000pt]
[size=10.5000pt]
[size=10.5000pt]如果这里出了问题,请检查上面所有的步骤有没有遗漏和未设置的参数。同时在重新修改了配置以后,最好是重置ambari-server来重新进行安装
[size=9.0000pt][root@master ~][size=9.0000pt]# # ambari-server stop [size=9.0000pt][root@master ~][size=9.0000pt]# # ambari-server reset #重置命令[size=9.0000pt] [root@master ~][size=9.0000pt]# # ambari-server setup #重新设置[size=9.0000pt] [root@master ~][size=9.0000pt]# # ambari-server start
[size=10.5000pt]
5)选择要安装的服务

6)选择分配服务

7)选择
[size=10.5000pt]建议regionserverclient全都勾选上,第一个datanode根据主机的磁盘容量选择,nodemanager建议和datanode相同。

8)定制化配置
[size=12.0000pt]Metrics设置密码
[size=12.0000pt]

[size=10.5000pt]

[size=12.0000pt]SmartSense设置密码

[size=10.5000pt]
[size=10.5000pt]
[size=10.5000pt]
9 显示配置信息

[size=10.0000pt]
10开始安装
[size=10.0000pt]安装各个服务,并且完成安装后会启动相关服务,安装过程比较长,如果中途出现错误,请根据具体提示或者[size=10.0000pt]log[size=10.0000pt]进行操作。[size=10.0000pt]

[size=10.5000pt]
[size=10.0000pt]
[size=10.0000pt]安装过程可以随时查看每个节点的安装进度及日志[size=10.0000pt]

[size=10.0000pt]
[size=12.0000pt]如果安装过程中出现报错缺少某个包或命令,可以配置一个yum源,如阿里、网易的
[size=10.5000pt]
[size=10.0000pt]全部安装成功界面如下[size=10.0000pt]

[size=10.0000pt]
[size=10.0000pt]
11)安装完成

[size=10.0000pt]

[size=10.0000pt]
六、Hadooop开启高可用
游客,如果您要查看本帖隐藏内容请回复

[size=10.5000pt]


5 个回复

倒序浏览
看看好不好
回复 使用道具 举报

认真学习
回复 使用道具 举报
Ambari部署笔记
回复 使用道具 举报
很好、很好、很好
回复 使用道具 举报
学习学习
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马