CDH6.1.0离线安装部署

下载CM6.1的安装包
https://archive.cloudera.com/cm6/6.1.0/redhat7/yum/RPMS/x86_64/cloudera-manager-agent-6.1.0-769885.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.1.0/redhat7/yum/RPMS/x86_64/cloudera-manager-daemons-6.1.0-769885.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.1.0/redhat7/yum/RPMS/x86_64/cloudera-manager-server-6.1.0-769885.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.1.0/redhat7/yum/RPMS/x86_64/cloudera-manager-server-db-2-6.1.0-769885.el7.x86_64.rpm
https://archive.cloudera.com/cm6/6.1.0/redhat7/yum/RPMS/x86_64/oracle-j2sdk1.8-1.8.0+update141-1.x86_64.rpm
https://archive.cloudera.com/cm6/6.1.0/allkeys.asc

下载CDH6.1的安装包
https://archive.cloudera.com/cdh6/6.1.0/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702-el7.parcel
https://archive.cloudera.com/cdh6/6.1.0/parcels/CDH-6.1.0-1.cdh6.1.0.p0.770702-el7.parcel.sha256
https://archive.cloudera.com/cdh6/6.1.0/parcels/manifest.json

CDH6.1.0 rpm软件包下载
https://archive.cloudera.com/cdh6/6.1.0/redhat7/yum/RPMS/noarch/
https://archive.cloudera.com/cdh6/6.1.0/redhat7/yum/RPMS/x86_64/
[root@kolla ~]# mkdir /opt/cloudera-manager/
所有的master节点
[root@kolla ~]# yum install cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server
所有的datanode节点
[root@kolla ~]# yum install cloudera-manager-daemons cloudera-manager-agent
[root@kolla ~]# systemctl enable cloudera-scm-agent
[root@kolla ~]# systemctl enable cloudera-scm-server
[root@kolla ~]# vi /etc/cloudera-scm-agent/config.ini
[General]
# Hostname of the CM server.
#server_host=localhost
server_host=kolla
# Port that the CM server is listening on.
server_port=7182


初始化数据库,启动服务
[root@kolla ~]# /opt/cloudera/cm/schema/scm_prepare_database.sh mysql -h 192.168.229.132 --scm-host 192.168.229.132 scm scm
Enter SCM password: 123456
JAVA_HOME=/usr/local/jdk1.8.0_171
Verifying that we can write to /etc/cloudera-scm-server
Creating SCM configuration file in /etc/cloudera-scm-server
Executing:  /usr/local/jdk1.8.0_171/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/java/postgresql-connector-java.jar:/opt/cloudera/cm/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db.
[                          main] DbCommandExecutor              INFO  Successfully connected to database.
All done, your SCM database is configured correctly!
[root@kolla ~]# systemctl status cloudera-scm-agent
[root@kolla ~]# systemctl status cloudera-scm-server
[root@kolla cloudera-scm-server]# systemctl start cloudera-scm-server


[root@kolla ~]# /opt/cloudera/cm/schema/scm_prepare_database.sh mysql -h kolla.example.com --scm-host kolla.example.com scm root 123456



# 若安装了deltarpm,但是报错no presto metadata available for cloudera-manager。则添加下面的一行。
[root@kolla yum.repos.d]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

deltarpm=0
#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d




[root@kolla ~]# grep "temporary password" /var/log/mysqld.log
2019-01-08T06:14:52.501469Z 1 [Note] A temporary password is generated for root@localhost: l_bIpbQ(r0gn
[root@kolla ~]# mysql -uroot -p
mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=3;  #设置密码长度最小为6个字符
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
设置mysql远程链接
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456';
create database scm default character set utf8 default collate utf8_general_ci;
grant all on scm.* to 'scm'@'%' identified by '123456';
create database amon default character set utf8 default collate utf8_general_ci;
grant all on amon.* to 'amon'@'%' identified by '123456';
create database rman default character set utf8 default collate utf8_general_ci;
grant all on rman.* to 'rman'@'%' identified by '123456';
create database hue default character set utf8 default collate utf8_general_ci;
grant all on hue.* to 'hue'@'%' identified by '123456';
create database metastore default character set utf8 default collate utf8_general_ci;
grant all on metastore.* to 'hive'@'%' identified by '123456';
create database sentry default character set utf8 default collate utf8_general_ci;
grant all on sentry.* to 'sentry'@'%' identified by '123456';
create database nav default character set utf8 default collate utf8_general_ci;
grant all on nav.* to 'nav'@'%' identified by '123456';
create database oozie default character set utf8 default collate utf8_general_ci;
grant all on oozie.* to 'oozie'@'%' identified by '123456';
flush privileges;



目前位置数据库操作完成
[root@kolla html]# ls
cdh6.1  centos  cm6.1
[root@kolla html]# ls cdh6.1/
CDH-6.1.0-1.cdh6.1.0.p0.770702-el7.parcel         manifest.json
CDH-6.1.0-1.cdh6.1.0.p0.770702-el7.parcel.sha256
[root@kolla html]# ls cm6.1/
allkeys.asc
cloudera-manager-agent-6.1.0-769885.el7.x86_64.rpm
cloudera-manager-daemons-6.1.0-769885.el7.x86_64.rpm
cloudera-manager-server-6.1.0-769885.el7.x86_64.rpm
cloudera-manager-server-db-2-6.1.0-769885.el7.x86_64.rpm
oracle-j2sdk1.8-1.8.0+update141-1.x86_64.rpm
repodata
[root@kolla html]#

制作Cloudera Manager的repo源
[root@kolla yum.repos.d]# cat centos.repo
[centos]
name=centos
baseurl=http://192.168.229.132/centos
enabled=1
gpgcheck=0
priority=1
[root@kolla yum.repos.d]# cat cm.repo
[cmrepo]
name = cm_repo
baseurl=http://192.168.229.132/cm6.1
enable = true
gpgcheck = false
[root@kolla yum.repos.d]#

验证安装jdk
[root@kolla ~]#  yum install oracle-j2sdk1.8-1.8.0+update141-1.x86_64 -y
安装cloudera Manager Server
[root@kolla ~]# yum install -y cloudera-manager-server

初始化数据库
例子: sudo /opt/cloudera/cm/schema/scm_prepare_database.sh [options]    
[root@kolla ~]# /opt/cloudera/cm/schema/scm_prepare_database.sh mysql  -h192.168.229.132 scm scm 123456
或者
[root@kolla ~]# /opt/cloudera/cm/schema/scm_prepare_database.sh mysql  -h kolla.chenshake.com --scm-host kolla.chenshake.com  scm scm 123456

启动cloudera-scm-server
[root@kolla ~]# systemctl start cloudera-scm-server
查看启动日志
[root@kolla ~]# tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log

等待7180端口开启
[root@kolla ~]# netstat -lnp | grep 7180
tcp        0      0 0.0.0.0:7180            0.0.0.0:*               LISTEN      59538/java
[root@kolla ~]#
https://192.168.229.132:7180



[root@kolla ~]# systemctl status cloudera-scm-agent
[root@kolla ~]# systemctl status cloudera-scm-server
[root@kolla cloudera-scm-server]# systemctl start cloudera-scm-server

你可能感兴趣的:(大数据环境搭建)