1.下载CM启动文件
[root@ip-172-31-23-107 ec2-user]# wget http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
--2015-01-26 14:25:42-- http://archive.cloudera.com/cm5/installer/latest/cloudera-manager-installer.bin
Resolving archive.cloudera.com... 54.230.71.55, 54.240.188.97, 54.230.68.13, ...
Connecting to archive.cloudera.com|54.230.71.55|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 514295 (502K) [application/octet-stream]
Saving to: `cloudera-manager-installer.bin'
100%[================================================================================================================================================================>] 514,295 --.-K/s in 0.06s
2015-01-26 14:25:42 (8.75 MB/s) - `cloudera-manager-installer.bin' saved [514295/514295]
2. 关闭SELINX
[root@ip-172-31-23-107 ec2-user]# vi /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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
3.关闭防火墙
[root@ip-172-31-23-107 ec2-user]# chkconfig iptables off
4.重启服务器,使2-3步修改生效
5.安装
修改cloudera-manager-installer.bin的权限,并以root用户执行
发生错误,查看日志:
[root@ip-10-248-41-177 ec2-user]# vi /var/log/cloudera-manager-installer/2.install-oracle-j2sdk1.7.log
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, security
Determining fastest mirrors
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
修改文件“/etc/yum.repos.d/epel.repo”, 将baseurl的注释取消, mirrorlist注释掉。即可。
5.安装向导走完。最好进入CM界面:54.187.193.80:7180
6.在CM界面中遇到ec2-user的问题,
-
Edit the /etc/ssh/sshd_config file and change the line that says “PermitRootLogin forced-commands-only” to “PermitRootLogin without-password”.- Restart the sshd server with “service sshd restart”.
- Edit the /root/.ssh/authorized_keys file. This file should have one line only. It starts by “echo” or “command … sleep 10;” then you can see “ssh-rsa [big long key]”. Remove the text from the beginning of the line until where it says “ssh-rsa”.
[root@ip-10-248-41-177 ec2-user]# vi /etc/ssh/sshd_config
#PermitRootLogin yes -->
PermitRootLogin without-password
[root@ip-10-248-41-177 ec2-user]# /etc/init.d/sshd reload
[root@ip-10-248-41-177 ec2-user]# vi ~/.ssh/authorized_keys
7.安装过程中,发现卡在“Acquiring installation lock...”
[root@ip-10-248-41-177 ~]# rm -rf /tmp/.scm_prepare_node.lock
并重试
8.发现如下错误:
>>[19/Nov/2013 15:00:55 +0000] 1922 HTTPServer Thread-2 _cplogging ERROR [19/Nov/2013:15:00:55] ENGINE Error in HTTP server: shutting down
>>Traceback (most recent call last):
>> File "/usr/lib/cmf/agent/build/env/lib/python2.7/site-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/process/servers.py", line 187, in _start_http_thread
>> self.httpserver.start()
>> File "/usr/lib/cmf/agent/build/env/lib/python2.7/site-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/wsgiserver/wsgiserver2.py", line 1825, in start
>> raise socket.error(msg)
>>error: No socket could be created on ('NexusHadoopVM', 9000) -- [Errno 99] Cannot assign requested address
不知道为什么,AWS把HOSTNAME搞错了。所有的机器的hostname都一样:
python -c 'import socket; print socket.getfqdn(), socket.gethostbyname(socket.getfqdn())'
都返回:
ip-10-248-41-177.us-west-2.compute.internal 10.248.41.177
用hostname ip-172-31-23-107.us-west-2.compute.internal改正确
9.在安装oozie时发现:
Failed to create Oozie database.
日志错误信息:
Error: DB schema exists Stack trace for the error was (for debug purposes): -------------------------------------- java.lang.Exception: DB schema exists at org.apache.oozie.tools.OozieDBCLI.validateDBSchema(OozieDBCLI.java:877) at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:184) at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:127) at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:78)
进行如下操作后并重试,
rm -rf /var/lib/oozie/*