Skip to content

Instantly share code, notes, and snippets.

@lilongen
Last active April 19, 2018 02:34
Show Gist options
  • Save lilongen/4eb639dd58b6173f1623ec2465290091 to your computer and use it in GitHub Desktop.
Save lilongen/4eb639dd58b6173f1623ec2465290091 to your computer and use it in GitHub Desktop.
- yum upgdae
- ulimit setting
- stop firewalld
- disable selinux
- yum install ntp
- install oracle jdk
- install kdc server, client
- install mysql, postgresql
- ssh with public key
- /etc/hosts map all cluster hosts on all hosts
- create cloudera-cdh5 local repo
wget https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/cloudera-cdh5.repo
reposync -r cloudera-cdh5
- create cloudera-manager local repo
wget https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/cloudera-manager.repo
reposync -r cloudera-manager
https://www.cloudera.com/documentation/enterprise/5-11-x/topics/cdh_ig_yumrepo_local_create.html#topic_30
- download cdh parcel
https://archive.cloudera.com/cdh5/parcels/latest/
CAUTION: must download relative manifest.json file, otherwise ClouderaManager installer can not detect available CDH.
- create Cloudera Manager mysql or postgresql DB
- install Cloudera Manager
yum install cloudera-manager-daemons cloudera-manager-server
- install mysql jdbc driver jar to /usr/share/java/ directory
- create cloudera manager external database
- yum install psmisc (required by cloudera-scm-manager service start script)
/usr/share/cmf/schema/scm_prepare_database.sh -h10.200.70.102 -uroot -pUydc.2910 --scm-host 10.200.70.101 mysql cmf cmf Uydc.cmf
- add new disk device 
  - using parted to add new partition (fdisk can not write gpt table, partition size can not be larger than 2T, so need to use parted)
  - parted -s -a optimal /dev/sdb mklabel gpt mkpart primary xfs 2048s 100%
  - mkfs.xfs /dev/sdb1

drop database if exists cdh_hive;
drop database if exists cdh_activitymonitor;
drop database if exists cdh_reportsmanager;
drop database if exists cdh_oozie;
drop database if exists cdh_hue;

create database cdh_hive default character set utf8;
create database cdh_activitymonitor default character set utf8;
create database cdh_reportsmanager default character set utf8;
create database cdh_oozie default character set utf8;
create database cdh_hue default character set utf8;

delete from mysql.user where mysql.user.user like 'cdh_%';
grant all privileges on cdh_hive.* to cdh_hive@'%' identified by 'uydc.cmf' with grant option;
grant all privileges on cdh_activitymonitor.* to cdh_activitymonitor@'%' identified by 'uydc.cmf' with grant option;
grant all privileges on cdh_reportsmanager.* to cdh_reportsmanager@'%' identified by 'uydc.cmf' with grant option;
grant all privileges on cdh_oozie.* to cdh_oozie@'%' identified by 'uydc.cmf' with grant option;
grant all privileges on cdh_hue.* to cdh_hue@'%' identified by 'uydc.cmf' with grant option;


flush privileges;



when setup interrupted and drop cmf and relative database, and recreate cmf, restart cloudera-scm-server, cm will error at host health check - (agent log "Error, CM server guid updated, expected 85587073-270d-43d9-a44a-e213d9f7e45b, received 4c1402a5-8364-4598-a382-0c760710e897"), 
workaround, delete /var/lib/cloudera-scm-agent/cm_guid and restart clouderd-scm-agent


### unistall cdh
- https://www.cloudera.com/documentation/enterprise/5-14-x/topics/cm_ig_uninstall_cm.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment