# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master1
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master2
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node1
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node2
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=node3
# vim /etc/hosts
192.168.233.101 master1
192.168.233.102 master2
192.168.233.103 node1
192.168.233.104 node2
192.168.233.105 node3
# service iptables stop
# chkconfig iptables off
# chkconfig --list | grep iptables
# vim /etc/selinux/config
SELINUX=disabled
# echo " " >> /etc/modprobe.d/dist.conf
# echo "alias net-pf-10 off" >> /etc/modprobe.d/dist.conf
# echo "alias ipv6 off" >> /etc/modprobe.d/dist.conf
6.1 生产公钥和私钥
# ssh-keygen
6.2 拷贝公钥给目标服务器
# ssh-copy-id -i master1
# ssh-copy-id -i master2
# ssh-copy-id -i node1
# ssh-copy-id -i node2
# ssh-copy-id -i node3
# ntpdate -u time.nuri.net
# vim /etc/security/limits.conf
* soft nofile 32728
* hard nofile 1024567
* soft nproc 65535
* hard nproc unlimited
* soft memlock unlimited
* hard memlock unlimited
1.1 下载JDK安装包
1.2 解压JDK安装程序
# mkdir -p /opt/java/
# tar zxf /opt/tools/jdk-8u172-linux-x64.tar.gz -C /opt/java/
1.3 拷贝JDK至其它节点
# scp -r java/ master2:/opt/
# scp -r java/ node1:/opt/
# scp -r java/ node2:/opt/
# scp -r java/ node3:/opt/
1.4 配置JDK环境变量
vim /etc/profile
# JAVA_HOME
export JAVA_HOME=/opt/java/jdk1.8.0_172
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export PATH=$PATH:$JAVA_HOME/bin
1.5 验证JDK环境
# source /etc/profile
# java -version
1.1 下载Cloudera Manager
1.2 下载MySQL JDBC驱动
2.1 MySQL创建元数据库
# mysql -uroot -pmysqlpasswd
create database activity default charset utf8 collate utf8_general_ci;
grant all on activity.* to 'cm'@'%' identified by 'cm!@#edc';
flush privileges;
2.2 创建cloudera-scm用户
参数 |
参数说明 |
---|---|
--system |
表示系统用户 |
--home=/opt/cm-5.12.0/run/cloudera-scm-server --no-create-home |
指定用户的主目录 |
--shell=/bin/false |
不作为登陆用户 |
--comment "Cloudera SCM User" |
|
cloudera-scm |
用户名 |
useradd --system \
--home=/opt/cm-5.12.0/run/cloudera-scm-server --no-create-home \
--shell=/bin/false \
--comment "Cloudera SCM User" cloudera-scm
3.1 解压Cloudera Manager安装程序
# tar zxf /opt/tools/cloudera-manager-el6-cm5.12.0_x86_64.tar.gz -C /opt/
3.2 初始化Cloudera Manager数据库
# cp /opt/tools/mysql-connector-java-5.1.46.jar /opt/cm-5.12.0/share/cmf/lib/
# /opt/cm-5.12.0/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost -uroot -p'mysqlpasswd' cm 'cm!@#edc'
3.3 修改配置
# vim /opt/cm-5.12.0/etc/cloudera-scm-agent/config.ini
server_host=master1
3.4 拷贝CM至其它节点
# scp -r /opt/cm-5.12.0 master2:/opt/
# scp -r /opt/cm-5.12.0 node1:/opt/
# scp -r /opt/cm-5.12.0 node2:/opt/
# scp -r /opt/cm-5.12.0 node3:/opt/
4.1 master1节点启动CM服务和代理
# /opt/cm-5.12.0/etc/init.d/cloudera-scm-server start
# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
4.2 其它节点启动CM代理
# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start