第一步:准备3台虚拟机
cloudera-scm server 内存分配4G
cloudera-scm agent 内存分配2G
cloudera-scm agent 内存分配2G
指令:sudo vim /etc/hosts
127.0.0.1 localhost #127.0.1.1 ubuntu-14.04-Server ubuntu-14 #一定要注释掉 10.0.83.201 CDH.aboutyun.com CDH 10.0.83.202 CDH1.aboutyun.com CDH1 10.0.83.173 CDH2.aboutyun.com CDH2指令:sudo vim /etc/hostname 分别修改3台虚拟机的主机名
CHD.aboutyun.com指令:sudo reboot 重启虚拟机
第二步:每台机器安装jdk环境
并查看java版本 java -version
第三步:关闭防火墙
指令:sudo apt-get install ufw
指令:sudo ufw disable
指令:sudo ufw status
第四步:三台机器都安装ssh
指令:sudo apt-get install ssh
指令:sudo mv /usr/bin/host /usr/bin/host.bak
指令:echo 0 > /proc/sys/vm/swappiness
第五步:下载安装cloudera-manager
下载网址:http://archive.cloudera.com/cm5/installer
cd到目录/usr/cloudera
指令:wget -r -O cloudera-manager-installer.bin "http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin"
指令:chmod u+x cloudera-manager-installer.bin 改变执行权限
指令:sudo ./cloudera-manager-installer.bin 安装
安装错误:
在这里安装时出现了点问题:
首先需要执行指令:vim /var/log/cloudera-manager-installer/2.refresh-repo.log 查看安装日志
有如下错误:
Err http://security.ubuntu.com trusty-security/main amd64 Packages 404 Not Found [IP: 91.189.91.26 80] Fetched 1,107 kB in 11s (92.8 kB/s) W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192 W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages 404 Not Found [IP: 91.189.91.26 80] W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-i386/Packages Hash Sum mismatch E: Some index files Failed to download. They have been ignored,or old ones used instead.
搜寻资料显示是源的故障:指令sudo apt-get update 会报同样的错误
所以清空源缓存:指令:sudo rm -vfr /var/lib/apt/lists/*
更改源:指令sudo vim /etc/apt/sources.list
将之前的源去掉,或者添加 # 到源前面。
然后添加下来源 ,并且sudo apt-get update 和 sudo apt-get upgrade
然后再次安装 指令:sudo ./cloudera-manager-installer.bindeb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
第六步:登陆cloudera
win7上登陆 http://10.0.83.201:7180 账号密码都是admin
根据提示点“继续”
直到搜索,输入:10.0.83.173,10.0.83.201,10.0.83.202
到集群安装又遇到新问题如下:
因为设置密码登陆时是需要填写root的登陆密码
遇见问题:
问题原因是步骤1中忘记分别修改三台主机名为:CDH.aboutyun.com;CDH1.aboutyun.com;CDH2.aboutyun.com。并注释掉127.0.1.1那一行
第七步:安装MysqL
因为在配置cloudera-manager 各组件需要使用对应的数据库
首先安装MysqL 指令:sudo apt-get install MysqL-server
创建名为hive_home的数据库:MysqL>create database hive_database;
创建hive_root的用户密码为312715289:grant all on hive_database.* to hive_root@localhost identified by "312715289";
安装jdbc 指令:sudoapt-getinstalllibMysqL-java
不过我们使用cloudera-manager嵌入式数据库
接下来遇见问题:
Unknown host 'ubuntu-14.04-Server:7432'. Unable to find it from host...这里正常情况应该是CDH.aboutyun.com:7432,这是一个bug,好像在用VPN远程登录安装的时候会出现,解决方法是修改/etc/cloudera-scm-server/db.mgmt.properties文件,把所有:7432都改成CDH.aboutyun.com:7432,注意不能用localhost,修改完重启服务: sudo service cloudera-scm-server restart,然后在页面返回上一步,如果提示找不到网页时,直接刷新页面到其显示为止
指令:sudo vim/etc/cloudera-scm-server/db.mgmt.properties
修改所有ubuntu-14.04-Server:7432为CDH.aboutyun.com:7432
指令:sudo service cloudera-scm-server restart