【干货】快速搭建CDH的yum本地源的详细过程
2018-04-13 18:10
405 查看
为了方便在局域网中安装CDH集群,搭建一个CDH的yum本地源,方便局域网内各节点安装。
在Cloudera的官网中给出了CDH本地源的搭建过程(官网说明文档链接),下面是本人亲自搭建的详细过程,首先要找一台能联网的主机来制作本地源,可自动下载必要的安装包(如果全部都无法联网,则手动下载相关的rpm安装包,只是麻烦了一些,过程是一样的),制作好本地源后该主机再断网给本地局域网作为yum源使用即可。
1、关闭防火墙、关闭selinux
2、下载repo文件
根据操作系统下载repo文件(本人使用的是centos 6.9,x86_64位),到cloudera官网上下载repo文件,这是centos6对应的repo文件下载链接
下载后,将cloudera-cdh5.repo文件保存到/etc/yum.repos.d/目录下
3、安装本地http服务器
官网推荐的http服务器是lighttpd,这是一款极轻量级的http服务器,安装也非常简单
本人习惯使用apache httpd,因此最后安装的是apache httpd
设置可读取目录列表,对于lighttpd的设置如下:
对于apache httpd的设置方式为修改httpd.conf文件,加入以下配置项
4、制作repo文件
安装createrepo程序
下载CDH相关的rpm包
将下载的rpm包放到http服务器的目录
在该http目录下,制作repo文件
下载RPM-GPG-KEY-cloudera文件,放到该http目录下,下载链接
5、修改repo文件中的本地源
修改/etc/yum.repos.d/cloudera-cdh5.repo中的下载url,指向本地源
baseurl=http://172.17.0.2/cdh/5/
6、更新源,安装CDH hadoop
然后再安装JDK,安装后cdh-hadoop就能运行了,非常方便。
欢迎关注本人的微信公众号“大数据与人工智能Lab”(BigdataAILab),获取更多资讯
在Cloudera的官网中给出了CDH本地源的搭建过程(官网说明文档链接),下面是本人亲自搭建的详细过程,首先要找一台能联网的主机来制作本地源,可自动下载必要的安装包(如果全部都无法联网,则手动下载相关的rpm安装包,只是麻烦了一些,过程是一样的),制作好本地源后该主机再断网给本地局域网作为yum源使用即可。
1、关闭防火墙、关闭selinux
service iptables stop chkconfig iptables off
[root@test001 selinux]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted
2、下载repo文件
根据操作系统下载repo文件(本人使用的是centos 6.9,x86_64位),到cloudera官网上下载repo文件,这是centos6对应的repo文件下载链接
下载后,将cloudera-cdh5.repo文件保存到/etc/yum.repos.d/目录下
3、安装本地http服务器
官网推荐的http服务器是lighttpd,这是一款极轻量级的http服务器,安装也非常简单
yum install epel-release yum update yum install lighttpd
本人习惯使用apache httpd,因此最后安装的是apache httpd
yum install httpd
设置可读取目录列表,对于lighttpd的设置如下:
vi /etc/lighttpd/conf.d/dirlisting.conf dir-listing.activate = "enable" dir-listing.hide-dotfiles = "enable"
对于apache httpd的设置方式为修改httpd.conf文件,加入以下配置项
<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow allow from all </Directory>
4、制作repo文件
安装createrepo程序
sudo yum install yum-utils createrepo
下载CDH相关的rpm包
reposync -r cloudera-cdh5
将下载的rpm包放到http服务器的目录
/var/www/html/cdh/5/RPMS/x86_64
在该http目录下,制作repo文件
# 注意后面加上空格和点,表示当前目录 createrepo .
下载RPM-GPG-KEY-cloudera文件,放到该http目录下,下载链接
5、修改repo文件中的本地源
修改/etc/yum.repos.d/cloudera-cdh5.repo中的下载url,指向本地源
baseurl=http://172.17.0.2/cdh/5/
6、更新源,安装CDH hadoop
yum update yum install hadoop
然后再安装JDK,安装后cdh-hadoop就能运行了,非常方便。
欢迎关注本人的微信公众号“大数据与人工智能Lab”(BigdataAILab),获取更多资讯
相关文章推荐
- CentOS7使用yum详细搭建zabbix3.2过程
- 【干货】直播聊天室详细分解,让你一眼学会快速搭建!
- 【干货】Apache Hadoop 2.8 完全分布式集群搭建超详细过程,实现NameNode HA、ResourceManager HA高可靠性
- 【干货】Apache Hadoop 2.8 完全分布式集群搭建超详细过程,实现NameNode HA、ResourceManager HA高可靠性...
- 快速搭建SSM(Spring,SpringMVC,Mybatis)环境详细过程
- LVS DR模式详细搭建过程
- redhat利用yum快速搭建LAMP环境
- maven+springMVC+mybatis+junit详细搭建过程 【转】
- 3-6·yum命令、三步快速搭建yum
- 关于在Windows搭建Open***的详细过程-如有问题请大家咨询我QQ:397879843(一般都是隐身)
- Centos LVS DR模式详细搭建过程
- Centos6 使用yum快速搭建LAMP环境
- Centos LVS DR模式详细搭建过程
- yum环境的本地源搭建(基于VSFTP)
- contos7 使用yum快速 搭建lnmp 环境
- 快速搭建yum服务器
- 为学习Hadoop使用VMware准备3台一模一样的Linux虚拟机的详细搭建过程
- maven+springMVC+mybatis+junit详细搭建过程