Hostname | IP | CPU(cores) | Memory(GB) | OS | Service | Remark |
---|---|---|---|---|---|---|
master | 172.30.200.75 | 2 | 4 | CentOS 7.5 | jdk, cloudera-scm-server, mysql | 实际部署后,master节点也需要部署cloudera-scm-agent服务,或采用4个slave节点 |
slave01 | 172.30.200.76 | 2 | 4 | centos 7.5 | jdk, cloudera-scm-agent | |
slave02 | 172.30.200.77 | 2 | 4 | centos 7.5 | jdk, cloudera-scm-agent | |
slave03 | 172.30.200.78 | 2 | 4 | centos 7.5 | jdk, cloudera-scm-agent |
相关软件放置在/usr/local/src/目录。
Soft | Version | Download | Remark |
---|---|---|---|
CM(Cloudera Manager) | cloudera-manager-centos7-cm5.16.1_x86_64.tar.gz | bin包,根据版本下载 | |
CDH parcel | CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel | 根据版本下载 | 软件安装包 |
CDH parcel.sha | CDH-5.16.1-1.cdh5.16.1.p0.3-el7.parcel.sha1 | 根据版本下载 | 软件包hash码 |
CDH manifest.json | manifest.json | 根据版本下载 | 版本说明文件 |
JDK | jdk-8u181-linux-x64.tar.gz | bin包,根据版本下载 | |
MySQL | mysql-5.7.24-el7-x86_64.tar.gz | bin包,根据版本下载 | 存放Cloudera Manager配置文件 |
MySQL-connector-Java | mysql-connector-java-8.0.13.jar | jar包,根据版本下载 | JDBC |
所有节点执行以下操作:
firewalld或iptables);
selinux;
ntp。
authorized_keys文件
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
id_rsa.pub放入master节点的authorized_keys文件中
for i in {1..3}; do ssh root@slave0$i cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys; done
authorized_keys文件放置到
集群
每个节点的/root/.ssh/目录,依然命名位authorized_keys
公钥检查,可通过在/etc/ssh/ssh_config文件中设置StrictHostKeyChecking no绕过,或使用-o参数跳过。
for i in {1..3}; do scp /root/.ssh/authorized_keys root@slave0$i:/root/.ssh/authorized_keys; done
所有节点都需要安装JDK。
只有master节点需要安装MySQL。
root@localhost账号的初始密码Hqe6x<Re4jhK
cd /usr/local/mysql/ bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/data
/opt/cloudera-manager
mkdir /opt/cloudera-manager
cloudera-manager-centos7-cm5.16.1_x86_64.tar.gz
for i in {1..3}; do scp /usr/local/src/cloudera-manager-centos7-cm5.16.1_x86_64.tar.gz root@slave0$i:/usr/local/src/ ; done
cloudera-manager-centos7-cm5.16.1_x86_64.tar.gz到/opt/cloudera-manager/目录
tar -zxvf /usr/local/src/cloudera-manager-centos7-cm5.16.1_x86_64.tar.gz -C /opt/cloudera-manager/
/opt/cloudera-manager/cm-5.16.1/etc/cloudera-scm-agent/config.ini的server_host参数为master节点ip或主机名
sed -i "s/server_host=localhost/server_host=master/g" /opt/cloudera-manager/cm-5.16.1/etc/cloudera-scm-agent/config.ini
cloudera-scm账号,这是CM相关服务使用的默认账号
# 禁止使用"cloudera-scm"账号登陆 useradd --system --home=/opt/cloudera-manager/cm-5.16.1/run/cloudera-scm-server/ --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
/opt/cloudera-manager目录赋权
chown -R cloudera-scm:cloudera-scm /opt/cloudera-manager
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
database如下:
database与user,但不是必须使用;
database在数据库中可直接创建,但CM初始化时如果没有database,则自动创建。
Service Database User 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!
cloudera-scm-server服务
# "cloudera-scm-server"启动需要连接数据库,监听端口启动会延迟 service cloudera-scm-server restart service cloudera-scm-server status -l # 通过启动后的状态查看,脚本需要执行"pstree"命令,需要安装依赖包 yum install psmisc -y
cloudera-scm-agent服务
yum install psmisc -y service cloudera-scm-agent restart service cloudera-scm-agent status -l
admin/admin
Cloudera Enterprise 试用版
cloudera-scm-agent正常启动后,可发现相应的节点,指定
集群
服务的安装节点
parcel源配置正确,则"下载"阶段瞬间完成,其余阶段视节点数与内部网络情况决定
自定义服务的HDFS服务
Reports Manager数据库名称rman,用户名rman