Cloudera Manager平臺部署說明書
一、基礎環境
1. 修改主機名
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master1
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master2
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node1
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node2
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node3
2. 配置網路對映
# vim /etc/hosts
192.168.233.101 master1
192.168.233.102 master2
192.168.233.103 node1
192.168.233.104 node2
192.168.233.105 node3
3. 關閉防火牆
# service iptables stop
# chkconfig iptables off
# chkconfig --list | grep iptables
4. 禁用selinux
# vim /etc/selinux/config
SELINUX=disabled
5. 禁用IPv6
# echo " " >> /etc/modprobe.d/dist.conf
# echo "alias net-pf-10 off" >> /etc/modprobe.d/dist.conf
# echo "alias ipv6 off" >> /etc/modprobe.d/dist.conf
6. 配置SSH無祕鑰登入
6.1 生產公鑰和私鑰
# ssh-keygen
6.2 拷貝公鑰給目標伺服器
# ssh-copy-id -i master1
# ssh-copy-id -i master2
# ssh-copy-id -i node1
# ssh-copy-id -i node2
# ssh-copy-id -i node3
7. 叢集時間同步
# ntpdate -u time.nuri.net
8. 設定使用者的可開啟最大檔案數及程序數
# vim /etc/security/limits.conf
* soft nofile 32728
* hard nofile 1024567
* soft nproc 65535
* hard nproc unlimited
* soft memlock unlimited
* hard memlock unlimited
二、基礎軟體
1. JDK安裝
1.1 下載JDK安裝包
- 本平臺採用 JDK-8u172 的版本:jdk-8u172-linux-x64.tar.gz
- http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
1.2 解壓JDK安裝程式
# mkdir -p /opt/java/
# tar zxf /opt/tools/jdk-8u172-linux-x64.tar.gz -C /opt/java/
1.3 拷貝JDK至其它節點
# scp -r java/ master2:/opt/
# scp -r java/ node1:/opt/
# scp -r java/ node2:/opt/
# scp -r java/ node3:/opt/
1.4 配置JDK環境變數
vim /etc/profile
# JAVA_HOME
export JAVA_HOME=/opt/java/jdk1.8.0_172
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$PATH:$JAVA_HOME/bin
1.5 驗證JDK環境
# source /etc/profile
# java -version
2. MySQL安裝
三、Cloudera Manager安裝
1. 安裝介質
1.1 下載Cloudera Manager
- 本平臺採用 Cloudera Manager-5.12.0的版本:cloudera-manager-el6-cm5.12.0_x86_64.tar.gz
- http://archive.cloudera.com/cm5/cm/5/
1.2 下載MySQL JDBC驅動
- 本平臺採用 MySQL-5.1.46的JDBC驅動:mysql-connector-java-5.1.46.jar
- http://dev.mysql.com/downloads/connector/j/
2. 部署準備
2.1 MySQL建立元資料庫
# mysql -uroot -pmysqlpasswd
create database activity default charset utf8 collate utf8_general_ci;
grant all on activity.* to 'cm'@'%' identified by '[email protected]#edc';
flush privileges;
2.2 建立cloudera-scm使用者
引數 |
引數說明 |
---|---|
--system |
表示系統使用者 |
--home=/opt/cm-5.12.0/run/cloudera-scm-server --no-create-home |
指定使用者的主目錄 |
--shell=/bin/false |
不作為登陸使用者 |
--comment "Cloudera SCM User" |
|
cloudera-scm |
使用者名稱 |
useradd --system \
--home=/opt/cm-5.12.0/run/cloudera-scm-server --no-create-home \
--shell=/bin/false \
--comment "Cloudera SCM User" cloudera-scm
3. 部署Cloudera Manager
3.1 解壓Cloudera Manager安裝程式
# tar zxf /opt/tools/cloudera-manager-el6-cm5.12.0_x86_64.tar.gz -C /opt/
3.2 初始化Cloudera Manager資料庫
- 拷貝MySQL驅動
# cp /opt/tools/mysql-connector-java-5.1.46.jar /opt/cm-5.12.0/share/cmf/lib/
- 初始化Cloudera Manager資料庫,建立的資料庫名為cm,對應的使用者名稱為cm,密碼為[email protected]#edc
# /opt/cm-5.12.0/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost -uroot -p'mysqlpasswd' cm '[email protected]#edc'
3.3 修改配置
# vim /opt/cm-5.12.0/etc/cloudera-scm-agent/config.ini
server_host=master1
3.4 拷貝CM至其它節點
# scp -r /opt/cm-5.12.0 master2:/opt/
# scp -r /opt/cm-5.12.0 node1:/opt/
# scp -r /opt/cm-5.12.0 node2:/opt/
# scp -r /opt/cm-5.12.0 node3:/opt/
4. 啟動Cloudera Manager
4.1 master1節點啟動CM服務和代理
# /opt/cm-5.12.0/etc/init.d/cloudera-scm-server start
# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
4.2 其它節點啟動CM代理
# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
5. Cloudera Manager控制檯
- 訪問WEB UI:http://192.168.233.101:7180
- 使用者名稱:admin
- 密碼:admin