Cloudera Manager安装
系統(tǒng)環(huán)境搭建
1、網(wǎng)絡(luò)配置(所有節(jié)點(diǎn))
vi /etc/sysconfig/network
vi /etc/hosts
2、SSH免密鑰登錄
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
ssh-copy-id
3、防火墻關(guān)閉
service iptables stop
chkconfig iptables off
4、SELINUX關(guān)閉
setenforce 0 vi /etc/selinux/config (SELINUX=disabled)
5、安裝JDK配置環(huán)境變量
export JAVA_HOME=/usr/java/jdkXXX
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
6、安裝NTP
設(shè)置開機(jī)啟動 chkconfig ntpd on
設(shè)置時(shí)間同步 ntpdate 202.120.2.101
7、安裝配置mysql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;
flush privileges
8、下載第三方依賴包
chkconfig、python、bind-utils、psmisc、libxslt、zlib、sqlite、cyrus-sasl-plain、 cyrus-sasl-gssapi、fuse、fuse-libs、redhat-lsb
即:yum install -y chkconfig python bind-utils psmisc libxslt zlib sqlite cyrus-sasl-plain cyrus-sasl-gssapi fuse fuse-libs redhat-lsb
前提環(huán)境搭好后:
進(jìn)入ClouderaManager安裝:
1、安裝Cloudera Manager Server、Agent
mkdir /opt/cloudera-manager
tar xvzf cloudera-manager*.tar.gz -C /opt/cloudera-manager
?
2、創(chuàng)建用戶cloudera-scm
useradd --system --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
?
3、配置CM Agent
修改文件/opt/cloudera-manager/cm-5.4.3/etc/cloudera-scm-agent/config.ini中server_host
4、配置CM Server數(shù)據(jù)庫
拷貝mysql jar文件到目錄 /usr/share/java/
注意jar包名稱要修改為mysql-connector-java.jar
?
grant all on *.* to 'temp'@'%' identified by 'temp' with grant option;
cd /opt/cloudera-manager/cm-5.4.3/share/cmf/schema/
./scm_prepare_database.sh mysql temp -h node1 -utemp -ptemp --scm-host node1 scm scm scm
格式:數(shù)據(jù)庫類型、數(shù)據(jù)庫、數(shù)據(jù)庫服務(wù)器、用戶名、密碼、cm server服務(wù)器
?
5、創(chuàng)建Parcel目錄
Server節(jié)點(diǎn)
mkdir -p /opt/cloudera/parcel-repo
chown cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo
Agent節(jié)點(diǎn)
mkdir -p /opt/cloudera/parcels
chown cloudera-scm:cloudera-scm /opt/cloudera/parcels
6、制作CDH本地源
下載好文件CDH-5.4.0-1.cdh5.4.0.p0.27-el6.parcel以及manifest.json,將這兩個(gè)文件放到server節(jié)點(diǎn)的/opt/cloudera/parcel-repo下。
打開manifest.json文件,里面是json格式的配置,找到與下載版本相對應(yīng)的hash碼,新建文件,文件名與你的parel包名一致,并加上.sha后綴,將hash碼復(fù)制到文件中保存。
?
?
7、啟動CM Server、Agent
cd /opt/cloudera-manager/cm-5.4.3/etc/init.d/
./cloudera-scm-server start
Sever首次啟動會自動創(chuàng)建表以及數(shù)據(jù),不要立即關(guān)閉或重啟,否則需要刪除所有表及數(shù)據(jù)重新安裝
./cloudera-scm-agent start
**
訪問:http://ManagerHost:7180,
用戶名、密碼:admin
若可以訪問,則CM安裝成功。
?
?
【友情補(bǔ)充】
三節(jié)點(diǎn)均創(chuàng)建 [root@cm1 soft]# mkdir /opt/cloudera-manager Cm1: [root@cm1 soft]# tar xf cloudera-manager-el6-cm5.4.3_x86_64.tar.gz -C /opt/cloudera-manager/ [root@cm1 soft]# cd /opt/cloudera-manager/cm-5.4.3/etc/cloudera-scm-agent [root@cm1 cloudera-scm-agent]# vi config.ini [General] # Hostname of the CM server. server_host=cm1 三節(jié)點(diǎn)均創(chuàng)建 useradd --system --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm Cm1: [root@cm1 cloudera-scm-agent]# mkdir -p /opt/cloudera/parcel-repo [root@cm1 parcel-repo]# chown cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo 三節(jié)點(diǎn)均創(chuàng)建 [root@cm1 cloudera]# mkdir -p /opt/cloudera/parcels [root@cm1 cloudera]# chown cloudera-scm:cloudera-scm /opt/cloudera/parcels Cm1: [root@cm1 share]# cd /usr/share [root@cm1 share]# mkdir java [root@cm1 java]# mv /root/soft/mysql-connector-java.jar ./ [root@cm1 java]# service mysqld start [root@cm1 java]# mysql -uroot -p mysql> grant all on *.* to 'temp'@'%' identified by 'temp' with grant option; mysql> flush privileges; mysql> quit; [root@cm1 java]# cd /opt/cloudera-manager/cm-5.4.3/share/cmf/schema/ [root@cm1 schema]# ./scm_prepare_database.sh mysql temp -h cm1 -utemp -ptemp --scm-hos t cm1 scm scm scm [root@cm1 parcel-repo]# cd /opt/cloudera/parcel-repo [root@cm1 parcel-repo]# mv /root/soft/CDH-5.4.0-1.cdh5.4.0.p0.27-el6.parcel* ./ [root@cm1 parcel-repo]# mv /root/soft/*.json ./[root@cm1 cloudera-manager]# cd /opt/cloudera-manager [root@cm1 cloudera-manager]# scp -r ./* root@cm2:`pwd` [root@cm1 cloudera-manager]# scp -r ./* root@cm3:`pwd` [注]過程很漫長!!! [root@cm1 init.d]# cd /opt/cloudera-manager/cm-5.4.3/etc/init.d [root@cm1 init.d]# ./cloudera-scm-server start 查看日志,tail -f三節(jié)點(diǎn): /opt/cloudera-manager/cm-5.4.3/etc/init.d/cloudera-scm-agent start 【補(bǔ)充】排錯(cuò)所在日志:/opt/cloudera-manager/cm-5.4.3/log?
總結(jié)
以上是生活随笔為你收集整理的Cloudera Manager安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Cloudera Manager是什么?
- 下一篇: 如何使用IO流将数字输出到文件中