您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 公司方案 > hortonworks测试环境离线安装与配置
目录目录...........................................................................................................................................01.基础环境...................................................................................................................................12.准备工作...................................................................................................................................22.1配置环境.......................................................................................................................22.1.1配置hosts文件...............................................................................................22.1.2SSH无密码登入................................................................................................32.1.3NTP时间同步..................................................................................................32.1.4SELinux&iptables关闭...................................................................................42.2Java环境安装...............................................................................................................52.2.1安装JDK............................................................................................................52.2.2配置环境变量...................................................................................................53.Ambari安装配置......................................................................................................................73.1配置本地源...................................................................................................................73.1.1建立本地资源库...............................................................................................73.1.2配置repo文件.................................................................................................83.1.3配置Media源..................................................................................................93.1.4安装必要工具...................................................................................................93.1.5配置Media的http源....................................................................................103.1.6安装ambari-server服务................................................................................133.1.7安装ambari客户端.......................................................................................373.2ambari服务器配置与管理........................................................................................154.常见问题.................................................................................................................................404.1mapreduce..................................................................................................................404.2oozie安装...................................................................................................................4011.基础环境本人配置操作系统:redhat6.4内核版本:内存大小:处理器:Ambari版本:ambari-1.6.0HDP版本:HDP-2.1-latest-centos6-rpm.tar.gzHDP-UTILS版本:HDP-UTILS-1.1.0.17-centos6.tar.gzJDK版本:jdk-7u45-linux-x642Ambari安装的环境路径(选择安装所有服务的情况):服务安装路径/usr/lib日志路径/var/log配置文件/etcambari-server√√√ambari-agent√√√falcon√√√ganglia√hadoop√√√hbase√√√hive√√√hcatalog√√oozie√√√tez√√√webhcat√zookeeper√√√2.准备工作本次配置使用hdp-m2作为主master节点2.1配置环境2.1.1配置hosts文件所有机器都得执行,使用root用户1)@hostnamehdp-m2(该命令可用于临时修改主机名)2)@vi/etc/hosts(该命令可用于配置主机名和IP的对应信息)10.242.157.115hdp-m110.242.157.117hdp-m210.242.157.122hdp-s13)@vi/etc/sysconfig/network(该命令可用于修改网络主机名)32.1.2SSH无密码登入所有机器都得执行,使用root用户@yuminstallssh(安装SSH协议)@yuminstallrsync(rsync是一个远程数据同步工具,可通过LAN/WAN快速同步多台主机间的文件)@servicesshdrestart(启动服务)注:如果系统中没有安装SSH,需要进行以上操作。@ssh-keygen(该命令生成指定公私秘钥的名字,id_dsa及id_dsa.pub)@cat/root/.ssh/id_dsa.pub/root/.ssh/authorized_keys(把id_rsa.pub追加到授权的key里面去,如果有多个master节点则需把所有的master节点上id_dsa.pub文件内容整合到authorized_keys文件中)@ll/root/.ssh/(查看共私钥、授权key)@ssh-copy-id-iid_dsa.pubroot@hdp-m1(将公钥copy到所有的机器上)@sshhdp-m1(测试SSH无密码登入是否成功)2.1.3NTP时间同步Hdp-m2节点将server上/etc/ntp.conf文件中以下两行的注释打开@vim/etc/ntp.confserver127.127.1.0fudge127.127.1.0stratum10保存并重启ntpd服务(注意关闭防火墙,遇到noserversuitableforsynchronizationfound问题,则需要在从节点上servicentpdstart):@servicentpdstart@chkconfigntpdon@/etc/init.d/ntpdrestart@servicentpdstatus4进入其他从节点进行时间同步:@sshhdp-m1@vim/etc/ntp.confserverhdp-m2fudge127.127.1.0stratum10@ntpdatehdp-m2@exit2.1.4SELinux&iptables关闭Hdp-m2节点@setenforce0(临时关闭selinux)@vi/etc/yum/pluginconf.d/refresh-packagekit.confenabled=0所有节点@chkconfigiptablesoff(关闭防火墙关闭开机启动)@serviceiptablesstop(关闭防火墙)至此环境配置完成,关闭防火墙后方可SSH无密码登入。52.2Java环境安装所有的机器上都要安装JDK,现在就先在hdp-m2服务器安装,然后其他服务器按照步骤重复进行即可。安装JDK以及配置环境变量,需要以root的身份进行。2.2.1安装JDK首先用root身份在/usr下创建java文件夹,再复制/home/hadoop/下的jdk-7u45-linux-x64.gz复制到/usr/java文件夹中。@mkdir/usr/java@cp/home/hambari/hadoop/jdk-7u45-linux-x64.gz/usr/java@tar-zxvfjdk-7u45-linux-x64.gz然后查看/usr/java下面会发现多了一个名为jdk1.7.0_45文件夹,说明我们的JDK安装结束,进入下一个配置环境变量环节。2.2.2配置环境变量编辑/etc/profile文件,在后面添加Java的JAVA_HOME、CLASSPATH以及PATH内容。@vim/etc/profile在/etc/profile文件的尾部添加以下内容:#setjavaenvironmentexportJAVA_HOME=/usr/java/jdk1.7.0_45/exportJRE_HOME=/usr/java/jdk1.7.
本文标题:hortonworks测试环境离线安装与配置
链接地址:https://www.777doc.com/doc-904536 .html