ambari的安装

来源:互联网 发布:信息化校园大数据引领 编辑:程序博客网 时间:2024/06/06 02:09

一、环境初始化

1、配置yum源

用的公司配好的yum源,可以自己配置,repo文件也需要放到agent端机器。

[root@hadoop1 yum.repos.d]# cat ambari.repo #VERSION_NUMBER=2.5.1.0-159[ambari-2.5.1.0]name=ambari Version - ambari-2.5.1.0baseurl=http://mirror.xxxx.com/yum/ambari/centos6/gpgcheck=1gpgkey=http://mirror.xxxx.com/yum/ambari/centos6/RPM-GPG-KEY/RPM-GPG-KEY-Jenkinsenabled=1priority=1

2、时间同步

最简单的是手同步执行date -s 'xxx:xxx:xxx'
ntp时间同步服务器

3、检查防火墙

[root@hadoop1 opt]# service iptables status[root@hadoop1 opt]# service iptables stop

4、检查java是否安装

jdk的tar包安装

5、mysql的安装

mysql-5.5.39版本的安装
mysql-5.7.20版本的安装

二、准备工作

1、ambari数据库创建

[ambari@hadoop1 opt]# mysql -uroot -pmysql> create database ambari character set utf8;mysql> create user ambari identified by '1234';mysql> grant all privileges on ambari.* to 'ambari'@'localhost' identified by '1234';mysql> grant all privileges on ambari.* to 'ambari'@'%' identified by '1234';mysql> grant all privileges on ambari.* to 'ambari'@'192.168.30.145' identified by '1234';mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> quit;Bye

三、ambari的安装

[root@hadoop1 opt]# yum install ambari-server

[root@hadoop1 opt]# ambari-server setup

解决方案:

#除了server端要升级mysql-connetor,agent端也需要安装,切记。[root@hadoop1 opt]# yum install mysql-connector-java -y[root@hadoop1 opt]# cd /usr/share/java/[root@hadoop1 java]# ls

[root@hadoop1 opt]# ambari-server setup[root@hadoop1 mysql]#  ambari-server setupUsing python  /usr/bin/pythonSetup ambari-serverChecking SELinux...SELinux status is 'disabled'Customize user account for ambari-server daemon [y/n] (n)? yEnter user account for ambari-server daemon (root):ambariAdjusting 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): 3WARNING: 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/java      Validating JDK on Ambari Server...done.Completing setup...Configuring database...Enter advanced database configuration [y/n] (n)? yConfiguring 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 (3): 3Hostname (192.168.30.145): 192.168.30.145 Port (3306): 3306Database name (ambari): ambariUsername (ambari): ambariEnter Database Password (1234): Configuring ambari database...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.sqlProceed with configuring remote database connection properties [y/n] (y)? yExtracting system views.............ambari-admin-2.5.1.0.159.jar.Adjusting ambari-server permissions and ownership...Ambari Server 'setup' completed successfully.

ambari数据库脚本导入

[ambari@bgs-8p80-udp-01 soft]# mysql -uambari -pmysql> use ambari;Database changedmysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql;Query OK, 0 rows affected (0.03 sec)Records: 0  Duplicates: 0  Warnings: 0.....Query OK, 0 rows affected (0.03 sec)Records: 0  Duplicates: 0  Warnings: 0Query OK, 0 rows affected (0.08 sec)Records: 0  Duplicates: 0  Warnings: 0Query OK, 0 rows affected (0.02 sec)Records: 0  Duplicates: 0  Warnings: 0Query OK, 0 rows affected (0.00 sec)

设置Setup-JDBC

[root@hadoop1 opt]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jarUsing python  /usr/bin/pythonSetup ambari-serverCopying /usr/share/java/mysql-connector-java.jar to /var/lib/ambari-server/resourcesIf you are updating existing jdbc driver jar for mysql with mysql-connector-java.jar. Please remove the old driver jar, from all hosts. Restarting services that need the driver, will automatically copy the new jar to the hosts.JDBC driver was successfully initialized.Ambari Server 'setup' completed successfully.

启动ambari

[root@hadoop1 opt]# ambari-server start

在浏览器中的打开ambari的访问页面,用户名和密码默认为admin。

阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 公司法人章尺寸 法人章遗失说明 法人章使用范围 法人章 日语 法人章制作软件 法人章的材质 法人章 规格 刻法人章介绍信 公章,财务章,法人章遗失声明 法人章使用规定 法人章的使用范围 法人章 材质 法人章是公章吗 法人章使用登记表 法人章与公章的区别 法人股 法人股东分红要交税吗 法人证 法令线 怎么祛法令纹 如何减轻法令纹 填充法令纹多少钱 法令纹是哪个部位 法令纹去除 20岁法令纹怎么消除 法令纹怎么消除按摩 如何缓解法令纹 法令纹是怎么产生的 怎么消法令纹 怎样去肥胖纹 法令纹怎么形成的 法令纹在哪 法令纹是哪里 法令纹上有痣 法令纹怎么去掉 自体脂肪填法令纹多少钱 怎么样消除法令纹 除法令纹多少钱 去除法令纹价格 自体脂肪填法令纹 法令纹嘴角纹