[hadoop@hadoop2 ~]$ ssh hadoop3.comThe authenticity of host 'hadoop3.com (192.168.253.190)' can't be established.RSA key fingerprint is 16:c3:fc:d7:fc:db:98:ba:ef:aa:54:e4:d9:f5:51:be.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'hadoop3.com' (RSA) to the list of known hosts.[hadoop@hadoop3 ~]$ 服务器之间可以互相ssh登录,成功
5.安装ambari
[root@hadoop1 ~]# yum install wget安装wget工具 首先需要获取 Ambari 的公共库文件(public repository)。登录到 Linux 主机并执行下面的命令(也可以自己手工下载):wget http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.0.1/ambari.repo将下载的 ambari.repo 文件拷贝到 Linux 的系统目录/etc/yum.repos.d/。拷贝完后,我们需要获取该公共库的所有的源文件列表。依次执行以下命令。yum clean allyum list|grep ambari Cleaning up list of fastest mirrors[root@hadoop1 yum.repos.d]# yum list|grep ambariambari-agent.x86_64 2.0.1-45 Updates-ambari-2.0.1ambari-log4j.noarch 2.0.1.45-1 Updates-ambari-2.0.1ambari-metrics-collector.x86_64 2.0.1-45 Updates-ambari-2.0.1ambari-metrics-common.noarch 2.0.1-45 Updates-ambari-2.0.1ambari-metrics-hadoop-sink.x86_64 2.0.1-45 Updates-ambari-2.0.1ambari-metrics-monitor.x86_64 2.0.1-45 Updates-ambari-2.0.1ambari-server.noarch 2.0.1-45 Updates-ambari-2.0.1hdp_mon_ganglia_addons.noarch 2.0.1.45-1.el6 Updates-ambari-2.0.1hdp_mon_nagios_addons.noarch 2.0.1.45-1.el6 Updates-ambari-2.0.1
6.ambari配置
待安装完成后,便需要对 Ambari Server 做一个简单的配置。执行下面的命令。
amari-server setup
[root@hadoop1 ~]# ambari-server setupUsing python /usr/bin/python2.6Setup ambari-serverChecking SELinux...SELinux status is 'enabled'SELinux mode is 'enforcing'Temporarily disabling SELinuxWARNING: SELinux is set to 'permissive' mode and temporarily disabled.OK to continue [y/n] (y)? yCustomize user account for ambari-server daemon [y/n] (n)? Adjusting ambari-server permissions and ownership...Checking iptables...WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.OK to continue [y/n] (y)? Checking JDK...[1] Oracle JDK 1.7[2] Oracle JDK 1.6[3] - Custom JDK==============================================================================Enter choice (1): 1To download the Oracle JDK and the Java Cryptography Extension (JCE) Policy Files you must accept the license terms found at http://www.oracle.com/technetwork/java/javase/terms/license/index.html and not accepting will cancel the Ambari Server setup and you must install the JDK and JCE files manually.Do you accept the Oracle Binary Code License Agreement [y/n] (y)? Downloading JDK from http://public-repo-1.hortonworks.com/ARTIFACTS/jdk-7u67-linux-x64.tar.gz to /var/lib/ambari-server/resources/jdk-7u67-linux-x64.tar.gz
7.ambari启动
简单的 setup 配置完成后。就可以启动 Ambari 了。运行下面的命令。
ambari-server start
[root@hadoop1 ~]# ambari-server startUsing python /usr/bin/python2.6Starting ambari-serverAmbari Server running with administrator privileges.Organizing resource files at /var/lib/ambari-server/resources...Server PID at: /var/run/ambari-server/ambari-server.pidServer out at: /var/log/ambari-server/ambari-server.outServer log at: /var/log/ambari-server/ambari-server.logWaiting for server start....................Ambari Server 'start' completed successfully.通过命令tail -f /var/log/ambari-server/ambari-server.log 查看服务器日志[root@hadoop1 ~]# tail -f /var/log/ambari-server/ambari-server.log 29 Dec 2015 13:25:44,472 INFO [main] Configuration:514 - Generation of file with password29 Dec 2015 13:25:46,115 INFO [main] Configuration:527 - Reading password from existing file29 Dec 2015 13:25:47,753 INFO [main] Configuration:527 - Reading password from existing file29 Dec 2015 13:25:48,195 INFO [main] ViewExtractor:82 - Creating archive folder /var/lib/ambari-server/resources/views/work/ADMIN_VIEW{2.0.0}.29 Dec 2015 13:25:48,196 INFO [main] ViewExtractor:89 - Extracting files from ambari-admin-2.0.1.45.jar.29 Dec 2015 13:25:49,386 INFO [main] Configuration:527 - Reading password from existing file29 Dec 2015 16:32:07,171 INFO [main] Configuration:527 - Reading password from existing file29 Dec 2015 16:32:07,213 INFO [main] Configuration:747 - Hosts Mapping File null29 Dec 2015 16:32:07,213 INFO [main] HostsMap:60 - Using hostsmap file null29 Dec 2015 16:32:08,470 INFO [main] ControllerModule:173 - Detected POSTGRES as the database type from the JDBC URL29 Dec 2015 16:32:18,870 INFO [main] AmbariServer:655 - Getting the controller29 Dec 2015 16:32:22,555 INFO [main] StackDirectory:408 - Stack '/var/lib/ambari-server/resources/stacks/HDP/2.0.6.GlusterFS' doesn't contain an upgrade directory29 Dec 2015 16:32:22,613 INFO [main] StackDirectory:429 - Role command order info was loaded from file: /var/lib/ambari-server/resources/stacks/HDP/2.0.6.GlusterFS/role_command_order.json29 Dec 2015 16:32:22,703 INFO [main] StackDirectory:408 - Stack '/var/lib/ambari-server/resources/stacks/HDP/2.1.GlusterFS' doesn't contain an upgrade directory
8.完成
打开地址http://192.168.1.122:8080/ 完成 Charles 2015-12-29于Phnom Phen 版权说明:本文由Charles Dong原创,本人支持开源以及免费有益的传播,反对商业化谋利。CSDN博客:http://blog.csdn.net/mrcharles个人站:http://blog.xingbod.cnEMAIL:charles@xingbod.cn