CDH大数据环境安装

一、安装虚拟机vmware

二、下载安装操作系统

文件名称 CentOS-6.5-x86_64-bin-DVD1.iso

下载地址 http://www.xitongzhijia.net/linux/201603/69281.html

安装教程 https://jingyan.baidu.com/article/eae0782787b4c01fec548535.html

 

  1. 关闭centOS防火墙

sudo service iptables stop

sudo chkconfig iptables off

sudo chkconfig iptables --list
 

2、关闭SELinux

vi /etc/selinux/config

修改为SELinux=disabled

查看SELinux状态  getenforce

3设置静态ip  

Vmaware复制后的虚拟机不能上网问题解决

http://www.cnblogs.com/magialmoon/archive/2013/08/10/3250393.html

http://www.xitongzhijia.net/xtjc/20150115/34968.html

http://www.linuxidc.com/Linux/2013-01/77709.htm

ip addr

 首先修改/etc/sysconfig/network如下:

NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.129.2

指定网关地址。

然后修改/etc/sysconfig/network-scripts/ifcfg-eth0.

修改 /etc/udev/rules.d/70-persistent-net.rules 文件 
删除掉 关于 eth0 的信息。修改 第二条 eth1 的网卡的名字为 eth0. 

 

设置完之后,要重启虚拟机。

4.修改hosts文件

[root@host1 ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.175.130 master

192.168.175.131 slave1

192.168.175.132 slave2

 

5、安装、设置好一个CentOS虚拟机后,再克隆出两个CentOS虚拟机

 

 

6、修改主机名

vi /etc/sysconfig/network

 

 

7、重启虚拟机

 

 

 

centos 6.5切换root

su 用户名

 

 

CentOS 6.5 ping不通

将操作系统界面右上角的网络图标编辑,将system eth0编辑设置为自动连接。

 

 

查看linux软件安装信息

rpm -qa|grep java

 

 

 

 

三、下载安装CDH5

CDH5 下载安装指南 http://www.jianshu.com/p/57179e03795f

 

安装报错

cloudera-manager-agent-5.2.0-1.cm520.p0.60.el6.x86_64 (/cloudera-manager-agent-5.2.0-1.cm520.p0.60.el6.x86_64)

          需要:libpython2.6.so.1.0()(64bit)

解决办法:

http://www.cnblogs.com/lclq/archive/2016/06/27/5620196.html

 

下载Python-2.6.6.tar.bz2

.tar.bz2 

  解压:tar jxvf FileName.tar.bz2

 

centos7 python多版本切换

http://blog.csdn.net/gcangle/article/details/50098151

 

 

CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH

执行 yum -y install gcc

./configure //配置python源码

make

 make install 

 

 

 

 

遇到问题

Cenos版本不对,导致python版本不对。Cdh 5.2需要python2.6.而我第一次装的centos7自带的python是2.7版本的

 

管理界面

http://192.168.175.133:7180

用户名密码:admin/admin

 

查看任务队列界面(host1)

http://192.168.175.133:8088/cluster

 

 

 

正在安装 cloudera-manager-agent ...

BEGIN yum list installed cloudera-manager-agent 
Loaded plugins: fastestmirror, refresh-packagekit, security 
Installed Packages 
cloudera-manager-agent.x86_64 5.2.0-1.cm520.p0.60.el6 @/cloudera-manager-agent-5.2.0-1.cm520.p0.60.el6.x86_64 
END (0) 
BEGIN echo jdk oracle-j2sdk1.7 cloudera-manager-agent cloudera-manager-daemons | grep cloudera-manager-agent 
END (0) 
BEGIN yum info cloudera-manager-agent 
jdk oracle-j2sdk1.7 cloudera-manager-agent cloudera-manager-daemons 
Loaded plugins: fastestmirror, refresh-packagekit, security 
Determining fastest mirrors 

Error: Cannot find a valid baseurl for repo: base 
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 
14: PYCURL ERROR 7 - "Failed to connect to 2607:f8f8:700:12::10: 网络不可达" 
END (1) 
cloudera-manager-agent must have Version=5.2.0 and Build=60, exiting 
closing logging file descriptor 

注意:hosts文件配置和hostname一一对应

 

数据库

 

 

service cloudera-scm-agent status

 

service cloudera-scm-server status

 

CM管理界面等不了

问题 service httpd没启动

service httpd status

service httpd start

 

 

 

问题:

[root@host1 ~]# yum list|grep cloudera

Error: Cannot find a valid baseurl for repo: base

解决办法:

/etc/sysconfig /network-scripts/ifcfg-eth0

添加 DNS2=114.114.114.114

[root@host1 ~]# cat  /etc/resolv.conf

nameserver 192.168.175.2

nameserver 114.114.114.114

 

 

could not contact scm server at promote.cache-dns.local:7182, giving up

解决办法:mv /usr/bin/host /usr/bin/host.bak

安装telnet

yum -y install telnet

 

 

无法检测到 Agent 发出的检测信号

http://www.aboutyun.com/thread-9293-1-1.html

service cloudera-scm-agent restart 然后再重新安装

 


问题:主机时钟不同步。host1 (May 14, 2017 7:46:09 PM CST) host0 (May 14, 2017 7:08:35 PM CST) 之间的最大差异。

解决办法:安装ntpq服务

http://www.cnblogs.com/kerrycode/archive/2015/08/20/4744804.html

 

问题:[root@host0 ~]# service httpd start

正在启动 httpd:httpd: Could not reliably determine the server's fully qualified domain name

解决办法:

vi /etc/httpd/conf/httpd.conf

找到#ServerName(注意大小写和#号)

再下面新增ServerName localhost:80

然后重启 service httpd restart

 

问题:如何开机自启动httpd服务

查看所有的开机自启动的项

chkconfig --list

添加服务到自启动列表

chkconfig –add

开机自启动服务

chkconfig httpd on

 

 

Cloudera Management Service 设置服务

启动 Service MonitorHost MonitorEvent ServerAlert Publisher

 

永久修改系统时间

CentOS要修改硬件时间

[root@host0 ~]# hwclock --set --date '2017-5-15 14:47:57'

[root@host0 ~]# hwclock --hctosys

[root@host0 ~]# clock -w

猜你喜欢

转载自blog.csdn.net/huangcangbai/article/details/85449845
今日推荐