CDH 5.16.1 离线部署 通过 CDH 部署 Hadoop 服务(3)

注意:部署JDBC在任意节点,则后续"CDH安装配置"阶段Reports Manager被分配在任意节点都可以

cp /usr/local/src/mysql-connector-java-8.0.13.jar /opt/cloudera-manager/cm-5.16.1/share/cmf/lib/ chown cloudera-scm:cloudera-scm /opt/cloudera-manager/cm-5.16.1/share/cmf/lib/mysql-connector-java-8.0.13.jar

在master节点重启MySQL服务

service mysqld restart

在任意节点初始化CM

注意:Cloudera服务需要的相关database如下:

表中给出的是CM相关服务配置文件中默认的database与user,但不是必须使用;

database在数据库中可直接创建,但CM初始化时如果没有database,则自动创建。

ServiceDatabaseUser
Cloudera Manager Server   scm   scm  
Activity Monitor   amon   amon  
Reports Manager   rman   rman  
Hue   hue   hue  
Hive Metastore Server   metastore   metastore  
Sentry Server   sentry   sentry  
Cloudera Navigator Audit Server   nav   nav  
Cloudera Navigator Metadata Server   navms   navms  
Oozie   oozie   oozie  
# 格式:scm_prepare_database.sh [options] (postgresql|mysql|Oracle) database username [password] # scm_prepare_database.sh:创建与配置CMS需要的数据库脚本,默认在"/opt/cloudera-manager/cm-5.16.1/share/cmf/schema/"目录; # postgresql|mysql|oracle:必选项,数据库类型; # database:必选项,针对postgresql|mysql,创建SCM数据库;针对oracle,填写sid; # username:必选项,SCM数据库的账号; # password:选填项,SCM数据库的账号密码,如果不指定,会提示输入; # options: # -h:数据库主机ip或hostname,默认是"localhost"; # -u:数据库账号,需要具备增删改查的权限,默认是"root"; # -p:账号密码,默认无密码; # --scm-host:SCM server主机名,默认是"localhost" /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % scm scm scm_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % amon amon amon_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % rman rman rman_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % hue hue hue_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % metastore metastore metastore_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % sentry sentry sentry_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % nav nav nav_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % navms navms navms_pass /opt/cloudera-manager/cm-5.16.1/share/cmf/schema/scm_prepare_database.sh mysql -h master -uroot -pcdh12#hadoop --scm-host % oozie oozie oozie_pass

返回如下信息,表示配置成功

[main] INFO com.cloudera.enterprise.dbutil.DbCommandExecutor - Successfully connected to database. All done, your SCM database is configured correctly!

3.5 创建本地parcel源

在master节点制作本地parcel源

# 创建本地parcel源目录 mkdir -p /opt/cloudera/parcel-repo # 将parcel相关安装包放置到"/opt/cloudera/parcel-repo"目录; # 说明:"/opt/cloudera/parcel-repo"目录可放置多套parcel安装包; # 将"CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha1"重命名为"CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha",否则会重新下载"CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel"安装包 mv /usr/local/src/CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel /opt/cloudera/parcel-repo/ mv /usr/local/src/CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha1 /opt/cloudera/parcel-repo/CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha mv /usr/local/src/manifest.json /opt/cloudera/parcel-repo/ # 赋权 chown -R cloudera-scm:cloudera-scm /opt/cloudera/

在所有salve节点创建软件安装目录

mkdir -p /opt/cloudera/parcels # 赋权 chown -R cloudera-scm:cloudera-scm /opt/cloudera/

3.6 启动CM服务

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/5a1d2e75088f1e10f7fb76514d2e52c7.html