Skip to content

Ambari安装

Apache Ambari 项目旨在通过开发用于预置、管理和监控 Apache Hadoop 集群的软件来简化 Hadoop 管理。 Ambari 提供直观、易于使用的 Hadoop 管理 Web UI,由其 RESTful API 提供支持。 Ambari on ubuntu22.04

组件版本

ComposantVersion ApacheVersion Clemlab
Apache Ambari2.7.11.02.7.11.0
Apache Atlas2.3.02.3.0.1.2.4.0
Apache Flink1.17.01.17.0.1.2.4.0
Apache Hadoop3.3.63.3.6.1.2.4.0
Apache HBase2.5.62.5.6.1.2.4.0
Apache Hive3.1.33.1.3.1.2.4.0
Apache Kafka3.6.23.6.2.1.2.4.0
Apache Knox2.0.02.0.0.1.2.4.0
Apache Livy0.8.00.8.0.1.2.4.0
Apache NiFi1.24.01.24.0.1.2.4.0
Apache NiFi Registry1.24.01.24.0.1.2.4.0
Apache Oozie5.2.15.2.1.1.2.4.0
Apache Ozone1.4.01.4.0.1.2.4.0
Apache Phoenix5.1.35.1.3.1.2.4.0
Apache Ranger2.4.02.4.0.1.2.4.0
Apache Ranger KMS2.4.02.4.0.1.2.4.0
Apache Spark 22.4.82.4.8.1.2.4.0
Apache Spark 33.5.13.5.1.1.2.4.0
Apache TEZ0.10.20.10.2.1.2.4.0
Apache Zeppelin0.10.20.10.2.1.2.4.0
Apache Zookeeper3.8.43.8.4.1.2.4.0

建立本地仓库

wget -c https://clemlabs.s3.eu-west-3.amazonaws.com/ubuntu22-python3/ambari-release/2.7.11.0.0-161/repos-ambari.tar.gz
wget -c https://clemlabs.s3.eu-west-3.amazonaws.com/ubuntu22/odp-release/1.2.4.0-108/repos.tar.gz
wget -c https://clemlabs.s3.eu-west-3.amazonaws.com/ubuntu22/odp-utils/1.2.4.0/repos-utils.tar.gz
tar xvzf repos-ambari.tar.gz -C /
tar xvzf repos.tar.gz -C /
tar xvzf repos-utils.tar.gz -C /
apt install -y apache2
sudo systemctl enable apache2 && sudo systemctl start apache2
echo 'deb http://ambari.kailinesb.com/ambari-release/dist/ubuntu22/1.x/BUILDS/2.7.11.0.0-161/AMBARI AMBARI main' > /etc/apt/sources.list.d/ambari.list
echo 'deb http://ambari.kailinesb.com/odp-release/dist/ubuntu22/1.x/BUILDS/1.2.4.0-108/ODP ODP main' > /etc/apt/sources.list.d/odp.list
echo 'deb http://ambari.kailinesb.com/odp-utils/dist/ubuntu22/1.x/BUILDS/1.2.4.0/ODP-UTILS ODP-UTILS main' > /etc/apt/sources.list.d/odp-utils.list

安装依赖

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 449E83E81403D1C5
apt update -y && sudo apt upgrade -y
apt install -y curl unzip tar wget sed gcc libssl-dev sssd-krb5 python3-dev libsnappy-dev

时间配置

sudo apt-get install -y ntp
sudo update-rc.d ntp defaults

安装Ambari

sudo apt install -y ambari-server postgresql mysql-server
systemctl enable --now postgresql mysql

添加Mysql驱动包

wget 'https://cdn.mysql.com/archives/mysql-connector-java-5.1/mysql-connector-java-5.1.49.tar.gz'
tar xvzf mysql-connector-java-5.1.49.tar.gz
ambari-server setup --jdbc-db=mysql --jdbc-driver=/root/mysql-connector-java-5.1.49/mysql-connector-java-5.1.49.jar

建立Postgresql账号

su - postgres
psql
create database ambari;
\c ambari
create user ambari superuser;
alter user ambari encrypted password 'gaojinbo.com';
psql -U postgres -d ambari < /var/lib/ambari-server/resources/Ambari-DDL-Postgres-CREATE.sql

配置Ambari

ambari-server setup
#选择数据库postgresql 按提示操作

启动服务

sudo systemctl enable ambari-server
sudo systemctl start ambari-server
http://192.168.21.195:18080/
#默认密码admin/admin