Hadoop生态圈-HDP之Apache Ambari安装
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.准备环境
1>.内存要求
Ambari主机应具有至少1 GB RAM,500 MB可用空间。(要检查任何主机上的可用内存,请运行:free -m)
如果您计划将Ambari度量服务(AMS)安装到群集中,则应查看在Hortonworks数据平台Apache Ambari操作中使用Ambari度量标准,以获取有关资源要求的指南。通常,您计划运行Ambari Metrics Collector主机的主机应根据群集大小提供以下内存和磁盘空间:
2>.包大小和iNode计数要求
3>.最大打开文件数要求
建议的最大打开文件描述符数为10000或更多。要检查为最大打开文件描述符数设置的当前值,请在每个主机上执行以下shell命令:(ulimit -Sn 查看的是软限制,
ulimit -Hn 查看的是硬限制
),
如果输出不大于10000,请运行以下命令将其设置为合适的默认值:ulimit -n 10000,当然你也可以通过修改“ /etc/security/limit.conf”,“/etc/sysctl.conf”这两个配置文件哟!
4>.设置无密码SSH
5>.设置服务用户帐户
https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.0.0/bk_ambari-installation/content/prepare_the_environment.html
安装MySQL数据库:(关于MySQL的yum源以及rpm安装包我已经下载好了,存放在百度云链接:https://pan.baidu.com/s/1wZS2f-ZiJv0VcpUBZ2hcZQ 密码:yzl7)
一.安装MySQL5.6.3版本的数据库 1>.安装mysql的源 [yinzhengjie@s101 ~]$ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm [sudo] password for yinzhengjie: Preparing... ################################# [100%] Updating / installing... 1:mysql-community-release-el7-5 ################################# [100%] [yinzhengjie@s101 ~]$ 2>.本地安装MySQL [yinzhengjie@s101 ~]$ cd mysql [yinzhengjie@s101 mysql]$ sudo yum -y localinstall *.rpm 二.启动mysql并将其开机启动 [yinzhengjie@s101 mysql]$ systemctl start mysqld ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to manage system services or units. Authenticating as: root Password: ==== AUTHENTICATION COMPLETE === [yinzhengjie@s101 mysql]$ systemctl enable mysqld ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files === Authentication is required to manage system service or unit files. Authenticating as: root Password: ==== AUTHENTICATION COMPLETE === ==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon === Authentication is required to reload the systemd state. Authenticating as: root Password: ==== AUTHENTICATION COMPLETE === [yinzhengjie@s101 mysql]$ [yinzhengjie@s101 mysql]$ 三.更新mysql密码并创建数据库(刚开始安装没有密码) [yinzhengjie@s101 ~]$ mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.38 MySQL Community Server (GPL) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> UPDATE user SET Password=PASSWORD('yinzhengjie') where USER='root'; Query OK, 4 rows affected (0.00 sec) Rows matched: 4 Changed: 4 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> create database hdp; Query OK, 1 row affected (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | hdp | | mysql | | performance_schema | +--------------------+ 4 rows in set (0.00 sec) mysql> quit Bye [yinzhengjie@s101 ~]$
二.实战部署