centos7环境下搭建ambari2.5

下载jdk1.8

[http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html]

Wget下载ambari存储库

wget -O /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.5.1.0/ambari.repo

获取该公共库的所有源文件列表

yum clean all
yum list|grep ambari

安装完成后,开始进行配置

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)? y
Enter user account for ambari-server daemon (root):
Adjusting ambari-server permissions and ownership…
Checking firewall status…
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.
Path to JAVA_HOME: /opt/jdk1.8
Validating JDK on Ambari Server…done.
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 (1): 3
Hostname (localhost): 主机ip
Port (3306):
Database name (ambari):
Username (ambari): root
Enter Database Password (bigdata):
Re-enter password:
Configuring ambari database…
WARNING: Before starting Ambari Server, you must copy the MySQL JDBC driver JAR file to /usr/share/java and set property “server.jdbc.driver.path=[path/to/custom_jdbc_driver]” in ambari.properties.
Press to continue.
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.5.2.0.298.jar

Adjusting ambari-server permissions and ownership…
Ambari Server ‘setup’ completed successfully.
出现上面这个说明就搭建成功了

关闭防火墙

关闭防火墙

systemctl stop firewalld.service

设置开机不自启

systemctl disable firewalld.service

访问页面ip:8080

搭建hadoop环境

错误一:

查看ambari日志:

tail -200 /var/log/ambari-server/ambari-server.log

如果日志显示
18 十二月 2019 15:05:30,575 ERROR [main] DBAccessorImpl:117 - Error while creating database accessor
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database ‘han’
找不到‘han’这个库,原因是在ambari配置文件中没有指定到库,
解决

vi /etc/ambari-server/conf/ ambari.properties

将ambari当中的配置文件打开,找到3306的端口号,将其
配置文件当中的han改为ambari默认的数据库:ambari

重启ambari

ambari-server restart

查看ambari运行状态

ambari-server status

错误二:

以上正常运行后,在web页面访问不了8080页面。
输入:

nproc

在命令行的显示当中如果是64,在vi /etc/ambari-server/conf/ambari.properties配置文件中找到
client.threadpool.size.max=25
将其25改为64,重新访问成功!

Guess you like

Origin blog.csdn.net/weixin_42642671/article/details/103601868