资源划分

192.168.56.102 cdh-test-001
192.168.56.103 cdh-test-002
192.168.56.104 cdh-test-003

关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service

# 查看状态
systemctl status firewalld.service

修改hostname

vi /etc/hostname

# 依次修改
cdh-test-001
cdh-test-002
cdh-test-003

配置静态IP

vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

DEVICE="enp0s3"
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
UUID="c5ced8fd-2729-48fe-8ae1-57179cb424f1"
ONBOOT="yes"
NM_CONTROLLED="yes"
BOOTPROTO="static"
IPADDR="192.168.56.102"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no" 
IPV6INIT="no"
NAME="enp0s3"

配置hosts文件

vi /etc/hosts

192.168.56.102 cdh-test-001
192.168.56.103 cdh-test-002
192.168.56.104 cdh-test-003

关闭SELinux

vi /etc/selinux/config

SELINUX=disabled

修改Linux的swappiness

vi /etc/sysctl.conf

vm.swappiness=1

内存问题,关闭THP

vi /etc/rc.local

echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled

修改可打开的文件上限

vi /etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536

配置ssh免密码登录

ssh-keygen -t rsa

ssh-copy-id -i ~/.ssh/id_rsa.pub cdh-test-001
ssh-copy-id -i ~/.ssh/id_rsa.pub cdh-test-002
ssh-copy-id -i ~/.ssh/id_rsa.pub cdh-test-003

NTP时间同步

sudo yum install ntp -y

……
配置 略

安装Java

rpm -ivh jdk-8u301-linux-x64.rpm

vi /etc/profile

# java
export JAVA_HOME=/usr/java/jdk1.8.0_301-amd64
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH

source /etc/profile

上传JDBC包

mkdir /usr/share/java

cp /share/mysql-connector-java-5.1.49.jar /usr/share/java/mysql-connector-java.jar

安装依赖

yum install -y perl libaio net-tools fuse bind-utils psmisc libxslt cyrus-sasl-plain cyrus-sasl-gssapi portmap fuse-libs /lib/lsb/init-functions httpd mod_ssl openssl-devel python-psycopg2 MySQL-python libpq.so.5

Cloudera Manager安装(master安装)

rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
rpm -ivh cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm

Cloudera Manager安装(slave安装)

rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm

配置Agent(每个节点)

vi /etc/cloudera-scm-agent/config.ini
server_host=cdh-test-001

创建scm数据库

create database scm DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON *.* TO 'scm'@'%' IDENTIFIED BY 'scm' WITH GRANT OPTION;
flush privileges;


/opt/cloudera/cm/schema/scm_prepare_database.sh mysql -h 192.168.56.110 -P 3306  scm scm

CDH文件导入

# 准备parcels
# 拷贝
cp manifest.json /opt/cloudera/parcel-repo/
cp CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel /opt/cloudera/parcel-repo/
cp CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha1 /opt/cloudera/parcel-repo/
# 改名
mv CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha1 CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha

# 启动Cloudera Manager
# 主切点
systemctl start cloudera-scm-server
systemctl start cloudera-scm-agent

# 其它节点
systemctl start cloudera-scm-agent

# 登陆
http://192.168.56.102:7180/cmf/login
admin/admin