MBARI2.7.3安装(ubuntu18¢os)
centos:
https://www.rookiegao.top/
1.首页
2.环境准备
先下载需要用到的官方安装包,分别有如下4个文件:
项目 Value
ambari http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.2.2/ambari-2.6.2.2-centos7.tar.gz
HDP http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.5.0/HDP-2.6.5.0-centos7-rpm.tar.gz
HDP-UTILS http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos7/HDP-UTILS-1.1.0.22-centos7.tar.gz
HDP-GPL http://public-repo-1.hortonworks.com/HDP-GPL/centos7/2.x/updates/2.6.5.0/HDP-GPL-2.6.5.0-centos7-gpl.tar.gz
ambari http://public-repo-1.hortonworks.com/ambari/ubuntu18/2.x/updates/2.7.3.0/ambari-2.7.3.0-ubuntu18.tar.gz
HDP http://public-repo-1.hortonworks.com/HDP/ubuntu18/3.x/updates/3.1.0.0/HDP-3.1.0.0-ubuntu18-deb.tar.gz
HDP-UTILS http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/ubuntu18/HDP-UTILS-1.1.0.22-ubuntu18.tar.gz
HDP-GPL http://public-repo-1.hortonworks.com/HDP-GPL/ubuntu18/3.x/updates/3.1.0.0/HDP-GPL-3.1.0.0-ubuntu18-gpl.tar.gz
3.配置HTTP服务
完成软件源的更新后,输入以下的命令进行安装Apache服务器。
#sudo apt-get install apache2
#mkdir -p /var/www/html
将上文的 ambari HDP HDP-GPL HDP-UTILS 解压后放入 /var/www/html
4.配置APT本地安装
在/etc/apt/sources.list.d目录下,新增以下文件
ambari.list
deb http://127.0.0.1/ambari/ubuntu18/2.7.3.0-139/ Ambari main
ambari-hdp.list
deb http://127.0.0.1/HDP-GPL/ubuntu18/3.1.0.0-78/ HDP-GPL main
deb http://127.0.0.1/HDP-UTILS/ubuntu18/1.1.0.22/ HDP-UTILS main
deb http://127.0.0.1/HDP/ubuntu18/3.1.0.0-78/ HDP main
在浏览器输入url进行简单验证
最后运行 apt-get update 进行更新
5.安装AMBARI-SERVER
5.1 AMBARI配置
执行 apt-get install ambari-server成功后,执行
ambari-server setup 开始建立配置
选择自定义JDK
/usr/local/jdk1.8.0_181
一直选择y,到选择数据库选择1,后一直回车即可
最后成功有这样的提示
5.2 AMBRI-SERVER 启动
执行 ambari-server start ,成功后,打开外网8080端口,即可访问,输入admin/admin
6. 安装组件
6.1 输入集群名字
6.2 选择HDP版本
选择本地仓库,只保留ubuntu,url 输入:
HDP-GPL http://127.0.0.1/HDP-GPL/ubuntu18/3.1.0.0-78/
HDP-UTILS http://127.0.0.1/HDP-UTILS/ubuntu18/1.1.0.22/
HDP http://127.0.0.1/HDP/ubuntu18/3.1.0.0-78/
6.3 配置本机免密
ssh-keygen -t rsa 后,一直回车
cd ~/.ssh
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
然后测试ssh localhost ,如果正确即可,有问题可以自己排查一下
6.4 配置私钥
cat /root/.ssh/id_rsa 或者内容后,copy到输入框
6.5 选择组件
6.6 安装HIVE数据库
安装mysql :
sudo apt-get install mysql-server
执行mysql后,执行下面脚本:
create database hive;
CREATE USER ‘hive’@’%’ IDENTIFIED BY ‘hive’;
GRANT ALL PRIVILEGES ON . TO ‘hive’@ ‘%’ IDENTIFIED BY ‘hive’ WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON . TO ‘hive’@‘localhost’ IDENTIFIED BY ‘hive’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
注册mysql驱动,在shell下面执行:
ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java-8.0.13.jar
配置对应信息,注意修改主机名
6.7 继续完成安装
7. 组件SHELL命令验证
7.1 HADOOP
7.2 HIVE
7.3 HBASE
7.4 SPARK