manager node:
yum installcloudera-manager-server cloudera-manager-daemonscloudera-manager-server-db
yum installpostgresql
service postgresql initdb (如果是重启初始化失败,把对应的data目录直接删除重启初始化)
service postgresqlstart
postgres passwd:
cat/var/lib/cloudera-scm-server-db/data/generated_password.txt
login cmd:
psql -Ucloudera-scm -p 7432 -h localhost -d postgres
alteruser amon with password 'amon';
echo'listen_addresses = '*'' >> /var/lib/pgssql/data/postgresql.conf
/var/lib/pgsql/data/pg_hba.conf
host all all 127.0.0.1/32 md5 #ident
/var/lib/pgsql/data/postgresql.conf
shared_buffers -256MB
wal_buffers - 8MB
checkpoint_segments- 16
checkpoint_completion_target- 0.9
CREATE ROLE scmLOGIN PASSWORD 'scm';
CREATE DATABASEscm OWNER scm ENCODING 'UTF8';
CREATE ROLE amonLOGIN PASSWORD 'amon';
CREATE DATABASEamon OWNER amon ENCODING 'UTF8';
CREATE ROLE rmanLOGIN PASSWORD 'rman';
CREATE DATABASErman OWNER rman ENCODING 'UTF8';
CREATE ROLEmetastore LOGIN PASSWORD 'hive';
CREATE DATABASEmetastore OWNER metastore ENCODING 'UTF8';
CREATE ROLE sentryLOGIN PASSWORD 'sentry_password';
CREATE DATABASEsentry OWNER sentry ENCODING 'UTF8';
CREATE ROLE navLOGIN PASSWORD 'nav';
CREATE DATABASEnav OWNER nav ENCODING 'UTF8';
CREATE ROLE navmsLOGIN PASSWORD 'navms';
CREATE DATABASEnavms OWNER navms ENCODING 'UTF8';
CREATE ROLE hiveLOGIN PASSWORD 'hive';
CREATE DATABASEhive OWNER hive ENCODING 'UTF8';
CREATE ROLE oozieLOGIN ENCRYPTED PASSWORD 'oozie';
CREATE DATABASE"oozie" WITH OWNER = oozie;
create database hue;
\c hue
create user hue withpassword 'hue';
grant all privilegeson database hue to hue;
ALTER DATABASEMetastore SET standard_conforming_strings = off;
设置数据库类型及登陆用户
/usr/share/cmf/schema/scm_prepare_database.shpostgresql scm scm scm
/etc/init.d/cloudera-manager-server-dbrestart
agent node:
安装agent,选择parcel方式:
yum installcloudera-manager-agent cloudera-manager-daemons
在ManagerNode的 /opt/cloudera/parcel-repo 目录下载如下两个文件
CDH-5.6.1-1.cdh5.6.1.p0.3-el6.parcelCDH-5.6.1-1.cdh5.6.1.p0.3-el6.parcel.sha
/etc/init.d/cloudera-scm-server restart 如果更改了目录一定要重启服务
在添加WEB上添加服务时,如果不能访问数据库在如下文件中添加访问权限:
vi/var/lib/pgsql/data/pg_hba.conf
host oozie oozie 0.0.0.0/0 md5
host hive hive 0.0.0.0/0 md5
如果是测试Cluster 的Host 不能正常通信,检验/etc/hosts里面是否有 127.0.0.1 ::1 对应的解析。
如果agent 一直安装不上,报错没有权限访问
/var/run/cloudera-scm-agent/process/265-hdfs-DATANODE/supervisor.conf:Permission denied
把这些目录删除
umount cm_processes
/opt/cloudera
/var/run/cloudera-manager-agent/
/etc/cloudera-manager-agent
再把yum remove -ycloudera-manager-agent cloudera-manager-daemons
确认selinux iptables都已经关闭后 reboot
---------------------------------------postgresql -------------------------------------
managernode:
yuminstall cloudera-manager-server cloudera-manager-daemonscloudera-manager-server-db-2
yuminstall postgresql
servicepostgresql initdb
servicepostgresql start
echo'listen_addresses = '0.0.0.0'' >> /var/lib/pgsql/data/postgresql.conf
/var/lib/pgsql/data/pg_hba.conf
host all all 127.0.0.1/32 md5 #ident
/var/lib/pgsql/data/postgresql.conf
shared_buffers- 256MB
wal_buffers- 8MB
checkpoint_segments- 16
checkpoint_completion_target- 0.9
/usr/share/cmf/schema/scm_prepare_database.sh postgresql scm scm scm
/etc/init.d/cloudera-manager-server-db restart
agent node:
yum install cloudera-manager-agent cloudera-manager-daemons
/opt/cloudera/parcel-repo
CDH-5.6.1-1.cdh5.6.1.p0.3-el6.parcelCDH-5.6.1-1.cdh5.6.1.p0.3-el6.parcel.sha
/etc/init.d/cloudera-scm-server restart
vi /var/lib/pgsql/data/pg_hba.conf
host amon amon 0.0.0.0/0 md5
host rman rman 0.0.0.0/0 md5
host hive hive 0.0.0.0/0 md5
host scm scm 0.0.0.0/0 md5
host oozie oozie 0.0.0.0/0 md5
host hue hue 0.0.0.0/0 md5
host nav nav 0.0.0.0/0 md5
host navms navms 0.0.0.0/0 md5
host metastore metastore 0.0.0.0/0 md5