不采用cloudera全自动安装方式,参考Cloudera官方文章安装指导,一步步下载安装。我有3台ubuntu12.04 64bit VM, 1台ubuntu12.04 x86 vm
192.168.2.31 master
192.168.2.32 slave1
192.168.2.33 slave2
192.168.2.34 管理平台
1.首先每台都安装JDK1.6.0.35(我的机器之前已经有解压版的jdk,在/etc/profile设定了JAVA_HOME)
2.在31 ~ 33上面分分别执行命令:
apt-get install bigtop-utils bigtop-jsvc bigtop-tomcat hadoop hadoop-hdfs
hadoop-httpfs hadoop-mapreduce hadoop-yarn hadoop-client hadoop-0.20-mapreduce
hue-plugins hbase hive oozie oozie-client pig zookeeper. 中间安装失败,主要是因为没有更新包
在/etc/apt/source.list.d/下编辑cloudera.list, 添加如下内容:
deb [arch=amd64] http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh
precise-cdh4 contrib
deb-src http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh precise-cdh4
contrib
deb [arch=amd64] http://archive.cloudera.com/cm4/ubuntu/precise/amd64/cm precise-cm4
contrib
deb-src http://archive.cloudera.com/cm4/ubuntu/precise/amd64/cm precise-cm4 contrib
然后再执行上面的命令就可以了。
3.在34这台安装先安装mysql,然后安装cloudera manager server
apt-get install mysql-server-5.5
apt-get install cloudera-manager-daemons cloudera-manager-server
4. 配置数据库
先创建temp user
grant all on *.* to 'temp'@'%' identified by 'temp' with grant option;
Query OK, 0 rows affected (0.00 sec)
- 报告JAVA_HOME未指定错误。因为我的JAVA_HOME路径,并不是cloudera默认路径,好像在/etc/profile指定,
- 登陆admin cosole后,添加hbase服务,启动失败,看/usr/lib/hbase/logs.报Permission denied: user=root, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x 错误
- switch到hbase user,然后执行
- hadoop fs -mkdir /hbase
- hadoop fs -chown hbase /hbase
- 启动jobtracker失败,报Log相关异常,最后查Log,发现不能打开文件/var/log/hadoop-0.20-mapreduce/*.log.out, 其实也是类似上面的权限问题。切换到mapred,赋予mapred操作该path的权限,这个问题解决。但仍然启动失败,且没有任何错误log,还在研究中。怀疑是因为我的机器内存太小(1G),服务太多的原因。(补充:最后再次检查,首先检查/run/cloudera-scm-agent/process/**-mapreduce-jobtracker/log/stderr.log,然后检查/var/log/hadoop-0.20-mapreduce/*.log,发现基本都是权限问题,解决)