1,前期環(huán)境檢查
- hosts文件
- jdk版本
- 主機操作系統(tǒng)是否與CDH版本匹配
- 檢查主機hostname是否合法(主機域名不能帶'_',血淚史。)
- ntp時間同步
- 防火墻(iptables)
2,下載cloudera manager相關安裝包
下載包列表
(以5.9.0為例,完整地址:http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.9.0/RPMS/x86_64/)
- cloudera-manager-daemons-5.9.0-1.cm590.p0.249.el7.x86_64.rpm
- cloudera-manager-server-5.9.0-1.cm590.p0.249.el7.x86_64.rpm
- cloudera-manager-server-db-2-5.9.0-1.cm590.p0.249.el7.x86_64.rpm
- oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
- cloudera-manager-agent-5.9.0-1.cm590.p0.249.el7.x86_64.rpm
3,安裝cloudera manager server相關服務
$ sudo yum --nogpgcheck localinstall oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm
$ sudo yum --nogpgcheck localinstall cloudera-manager-daemons-5.9.0-1.cm590.p0.249.el7.x86_64.rpm
$ sudo yum --nogpgcheck localinstall cloudera-manager-server-*.rpm
4,啟動內(nèi)置數(shù)據(jù)庫
$ sudo service cloudera-scm-server-db start
# scm 密碼:/etc/cloudera-scm-server/db.properties
# postgre 密碼: /var/lib/cloudera-scm-server-db/data/generated_password.txt [psql -h localhost -p 7432 -U cloudera-scm -d postgres]
5,啟動cloudera manager server服務
$ sudo service cloudera-scm-server start
# 日志目錄:/var/log/cloudera-scm-server/cloudera-scm-server.log
6,檢查前臺頁面是否能夠訪問
地址:hostip:7180/
用戶名/密碼:admin/admin
6,啟動cloudera manager agent服務
# 修改/etc/cloudera-scm-agent/config.ini 中 server_host項
$ vi /etc/cloudera-scm-agent/config.ini
server_host={你搭建的cloudera manager server ip地址}
$ sudo service cloudera-manager-agent start
# 日志目錄:/var/log/cloudera-scm-agent/cloudera-scm-agent.log
7,登錄頁面查看hosts中是否存在這臺主機
8,在其他節(jié)點安裝并配置agent
9,下載CDH安裝包
下載包列表
(以cdh5.8.4為例,完整地址:http://archive.cloudera.com/cdh5/parcels/5.8.4/)
- CDH-5.8.4-1.cdh5.8.4.p0.5-el7.parcel
- CDH-5.8.4-1.cdh5.8.4.p0.5-el7.parcel.sha1
10,將文件上傳至cloudera manager server主機 /opt/cloudera/parcel-repo目錄
11,登錄CM頁面,開始安裝服務。
問題排查
agent未啟動且無日志信息
問題描述:
$ sudo service cloudera-scm-agent start
Starting Cloudera Manager Agent...
BEGIN /sbin/service cloudera-scm-agent status
● cloudera-scm-agent.service - LSB: Cloudera SCM Agent
Loaded: loaded (/etc/rc.d/init.d/cloudera-scm-agent; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
END (3)
BEGIN /sbin/service cloudera-scm-agent start
Starting cloudera-scm-agent (via systemctl): [ OK ]
END (0)
# 顯示agent服務啟動失敗,檢查/var/log/cloudera-scm-agent目錄下只有.out文件,無.log日志文件,執(zhí)行'/etc/rc.d/init.d/cloudera-scm-agent start'返回值為0玷禽。
# 使用CM頁面安裝時報錯如下:
Installation failed. Failed to receive heartbeat from agent.
Ensure that the host's hostname is configured properly.
Ensure that port 7182 is accessible on the Cloudera Manager Server (check firewall rules).
Ensure that ports 9000 and 9001 are not in use on the host being added.
Check agent logs in /var/log/cloudera-scm-agent/ on the host being added. (Some of the logs can be found in the installation details).
If Use TLS Encryption for Agents is enabled in Cloudera Manager (Administration -> Settings -> Security), ensure that /etc/cloudera-scm-agent/config.ini has use_tls=1 on the host being added. Restart the corresponding agent and click the Retry link here.
解決方案:修改主機hostname(主機名必須符合規(guī)范,不能包含下劃線'_',如果社區(qū)沒這先例,我估計只能以死謝罪了)
問題描述:
安裝hive服務時使用外置mysql數(shù)據(jù)庫,測試連接報錯:
User can't run DDL statements on the specified database. Attempt to create and drop a table failed.
報錯信息為執(zhí)行ddl失敗,我們后臺使用命令行連接正常,找dba調(diào)了半天的權(quán)限,還是不行。
后面在頁面測試時DBA發(fā)現(xiàn)數(shù)據(jù)庫并未建立連接,開始查看官方文檔哺呜,發(fā)現(xiàn)5.8.4版本只支持5.6版本的mysql,而我們DBA使用的是5.7版本。重建5.5版本數(shù)據(jù)庫后解決問題箕戳。這報錯不是一般的坑,居然說ddl執(zhí)行失敗某残。
解決方案:檢查數(shù)據(jù)庫版本是否在cdh版本支持列表中.