cloudra manager 集群部署

时间:2021-06-24 15:12:27

服务端:

基于Centos 6.x,其它版本不适应。
1. 配置hosts文件
2. 安装mysql
sudo yum install mysql-server
service mysqld start
cp mysql-connector-java-5.1.26-bin.jar /opt/cm-5.1.3/share/cmf/lib
mysqladmin -u root password "123456"
create database cmf DEFAULT CHARACTER SET utf8;
grant all privileges on *.* to root@'localhost' identified by '123456';
create database amon DEFAULT CHARACTER SET utf8;
grant all privileges on amon.* TO 'root'@'localhost' IDENTIFIED BY '123456';
create database rman DEFAULT CHARACTER SET utf8;
grant all privileges  on rman.* TO 'root'@' localhost ' IDENTIFIED BY '123456';
create database nav DEFAULT CHARACTER SET utf8;
grant all privileges on nav.* TO 'root'@' localhost ' IDENTIFIED BY '123456';
3. rpm -ivh jdk-6u31-linux-amd64.rpm
rpm -ivh oracle-j2sdk1.7-1.7.0+update45-1.x86_64.rpm
4. tar zvxf cloudera-manager-el6-cm5.1.3_x86_64.tar.gz -C /opt/
5. useradd --system --home=/opt/cm-5.1.3/run/cloudera-scm-server --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
6. 建立以下文件夹
/var/log/cloudera-scm-headlamp
/var/log/cloudera-scm-firehose
/var/log/cloudera-scm-alertpublisher
/var/log/cloudera-scm-eventserver
/var/lib/cloudera-scm-headlamp
/var/lib/cloudera-scm-firehose
/var/lib/cloudera-scm-alertpublisher
/var/lib/cloudera-scm-eventserver

chown -R cloudera-scm:cloudera-scm /var/log/cloudera-scm-*


7. vim /opt/cm-5.1.3/etc/cloudera-scm-server/db.properties

cloudra manager 集群部署
vim /opt/cm-5.1.3/etc/cloudera-scm-agent/config.init

cloudra manager 集群部署
 
8. cd /opt/cm-5.1.3/etc/init.d
./cloudera-scm-server start
./cloudera-scm-agent start
9. cp /opt/cdh/ CDH-5.0.3-1.cdh5.0.3.p0.35-el6.parcel  /opt/cloudera/parcel-repo
10. http://192.168.234.129:7180/cmf/login ( admin / admin)
11. Cloudera Management Service 安装
 
cloudra manager 集群部署
cloudra manager 集群部署
12. 输入服务的数据库和密码等
 
cloudra manager 集群部署





Postgres数据库设置
建立postgres数据库
1. 安装
2. /etc/init.d/postgresql initdb   //初始化数据库
3. /etc/init.d/postgresql start    //启动服务
4. su postgres  //postgres为用户建立该用户
5. psql           //进入数据库           
6. ALTER USER postgres WITH PASSWORD 'postgres';
7. create user root with password ‘123456’;
8. create database cmf owner root;
9. create database amon owner root;
10. create database rman owner root;
11. create database nav owner root;
12. 修改配置
/var/lib/pgsql/data/postgresql.conf
1.监听任何地址访问,修改连接权限
          #listen_addresses = ‘localhost’改为 listen_addresses = ‘*’
2.启用密码验证
          #password_encryption = on改为password_encryption = on
   3.可访问的用户ip段
     /var/lib/pgsql/data/pg_hba.conf 末尾添加:
host all all 0.0.0.0 0.0.0.0 md5
重启PostgreSQL数据库
   /etc/init.d/postgresql restart
13. 修改server启动配置
/opt/cm-5.0.0/etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.type=postgresql
com.cloudera.cmf.db.host=cdh3
com.cloudera.cmf.db.name=cmf
com.cloudera.cmf.db.user=root
com.cloudera.cmf.db.password=123456


客户端:

基于Centos 6.x,其它版本不适应。

1.  配置hosts文件

2.  安装jdk

rpm -ivh jdk-6u31-linux-amd64.rpm

3.  启动ntpd服务

service ntpd start

4.  解压tar

tar zxfcloudera-manager-el6-cm5.0.0_x86_64.tar.gz -C /opt/

5.  修改配置

/opt/cm-5.0.0/etc/cloudera-scm-agent/config.ini

# Hostname of theCM server.

server_host=192.168.100.217

6.  useradd --system--home=/opt/cm-5.1.3/run/cloudera-scm-server --no-create-home--shell=/bin/false --comment "Cloudera SCM User" cloudera-scm

7.  rpm -ivh cloudera-manager-daemons-5.1.3-1.cm513.p0.155.el6.x86_64.rpm

8.  yum install -y cyrus-sasl-gssapi fusefuse-libs redhat-lsb

9.  rpm -ivhcloudera-manager-agent-5.1.3-1.cm513.p0.155.el6.x86_64.rpm

10.cd /opt/cm-5.1.3/etc/init.d

    ./cloudera-scm-agentstart

11.查看log,或者启动网页看能否加载该agent