Hadoop第二课:Hadoop集群环境配置

 

一、Yum配置

           1.检查Yum是否安装

rpm -qa|grep yum

             2.修改yum源,我使用的是163的镜像源(http://mirrors.163.com/),根据自己的系统选择源,

#进入目录
cd /etc/yum.repos.d/
#列表
ls -al

              3.备份CentOS-Base.repo为CentOS-Base.repo.back,下载163.repo(http://mirrors.163.com/.help/centos.html)

二、配置NTP

   2.1所有集群的电脑安装NTP

yum install ntp

   2.2  H30配置ntp.conf

#启动
service ntpd start
#开机启动
chkconfig ntpd on
#状态
service ntpd status

   2.3 其他主机配置

ntpdate 192.168.1.30
#开启服务
systemctl start ntpd 
#开机启动 
systemctl enable ntpd 

#检查状态
systemctl status ntpd

#查看时间
watch ntpq -p

三、安装httpd服务

  

yum install httpd

systemctl status httpd

systemctl start httpd

systemctl enable httpd

我们打开浏览器,输入192.168.1.30

四、安装createrepo 和 yum-utils

yum install createrepo

yum install yum-utils

五、制作ambari和Hadoop本地源

 1. 下载ambari地址(http://docs.hortonworks.com/index.html)

   2.下载ambari的包我使用的系统是centos所以选centos的包(http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-installation/content/ambari_repositories.html)

 

 

      3.下载Hadoop和HDP-UTILS

     4.创建本地库

        进入var 创建路径www/html

cd /var/www/html
ls -al
#创建hdp目录
mkdir hdp

    使用xftp上传下载的三个包到HDP文件夹,然后解压

  

tar zxvf HDP-2.3.0.0-centos6-rpm.tar.gz 

tar zxvf HDP-UTILS-1.1.0.20-centos6.tar.gz

 

   试着用路径访问,如果访问正常就说明本地库架设成功。

 

posted @ 2017-05-22 16:04  BeierWu  阅读(222)  评论(0编辑  收藏  举报