CDH6.3.2安装配置
程序员文章站
2022-07-14 21:53:41
...
CDH6.3.2安装
IP | 域名 |
---|---|
192.168.8.11 | node01 |
192.168.8.12 | node02 |
192.168.8.13 | node03 |
设置域名IP映射
echo -e "192.168.8.11 node01\n192.168.8.12 node02\n192.168.8.13 node03" >> /etc/hosts
关闭防火墙
#关闭防火墙
systemctl stop firewalld
#关闭开机自启
systemctl disable firewalld
关闭SELINUX
# 临时关闭
setenforce 0
# 永久关闭
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
配置免密登录
ssh-****** -t rsa
ssh-copy-id node01
ssh-copy-id node02
ssh-copy-id node03
设置swap空间、关闭大页面压缩(性能优化)
echo 10 > /proc/sys/vm/swappiness
# 这样操作重启机器还是还原,要永久改变:
echo 'vm.swappiness = 10' >> /etc/sysctl.conf
# 查看是否已启用透明大页面压缩
cat /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/enabled
# 临时关闭
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
# 永久关闭
echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag' >> /etc/rc.d/rc.local
echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local
# 验证
cat /etc/rc.d/rc.local
NTP时间同步
# 安装
yum -y install ntp
# 服务端节点
vim /etc/ntp.conf
server node01 iburst
# 客户端节点
vim /etc/ntp.conf
server node01
fudge node01 stratum 10
# 启动NTP
systemctl start ntpd
systemctl enable ntpd
配置本地YUM源
# 安装httpd服务
yum -y install httpd
systemctl start httpd
systemctl enable httpd
mkdir -p /var/www/html/cloudera-repos/cm6
未完待续...
安装配置JDK8
rpm -qa | grep java
yum remove java*
rpm -ivh oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm
find / -name java
echo 'export JAVA_HOME=/usr/java/jdk1.8.0_181-cloudera' >> /etc/profile
echo 'export PATH=.:$JAVA_HOME/bin:$PATH' >> /etc/profile
source /etc/profile
安装配置MySQL5.7
# 卸载mariadb
rpm -qa|grep mariadb
rpm -e --nodeps 文件名
rpm -e --nodeps mariadb-libs-5.5.68-1.el7.x86_64
# 安装
yum localinstall -y mysql-community-common-5.7.32-1.el7.x86_64.rpm
yum localinstall -y mysql-community-libs-5.7.32-1.el7.x86_64.rpm
yum localinstall -y mysql-community-libs-compat-5.7.32-1.el7.x86_64.rpm
yum localinstall -y mysql-community-devel-5.7.32-1.el7.x86_64.rpm
yum localinstall -y mysql-community-client-5.7.32-1.el7.x86_64.rpm
yum localinstall -y mysql-community-server-5.7.32-1.el7.x86_64.rpm
# 启动
systemctl start mysqld
systemctl enable mysqld
# 查看临时密码
grep 'temporary password' /var/log/mysqld.log
2021-07-21T18:12:59.181619Z 1 [Note] A temporary password is generated for [email protected]: P)MkN5&zb6,<
# 登录MySQL
mysql -uroot -p'临时密码'
# 修改密码强度策略
set global validate_password_length=4;
set global validate_password_policy=0;
# 修改密码
set password=password('000000');
修改mysql root用户的登录权限
update mysql.user set Host='%' where HOST='localhost' and User='root';
# 创建cdh组件数据库
CREATE DATABASE scm DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE amon DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE hue DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE hive DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE sentry DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE oozie DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE DATABASE rman DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
# 授权
grant all on scm.* to 'scm'@'%' identified by '000000';
grant all on amon.* to 'amon'@'%' identified by '000000';
grant all on hue.* to 'hue'@'%' identified by '000000';
grant all on sentry.* to 'sentry'@'%' identified by '000000';
grant all on oozie.* to 'oozie'@'%' identified by '000000';
grant all on rman.* to 'rman'@'%' identified by '000000';
flush privileges;
# 上传node01配置mysql驱动包
mv mysql-connector-java-5.1.47.jar mysql-connector-java.jar
mkdir /usr/share/java
cp mysql-connector-java.jar /usr/share/java
# 从node01 拷贝到 node02、node03
scp -r /usr/share/java/mysql-connector-java.jar [email protected]:/usr/share/java/
scp -r /usr/share/java/mysql-connector-java.jar [email protected]:/usr/share/java/
主节点安装cm
yum localinstall -y cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm
# 配置 scm 库
/opt/cloudera/cm/schema/scm_prepare_database.sh mysql scm scm 000000
vim /etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=node01
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=scm
com.cloudera.cmf.db.setupType=EXTERNAL
com.cloudera.cmf.db.password=000000
vim /etc/cloudera-scm-agent/config.ini
[General]
# Hostname of the CM server.
server_host=node01
从节点安装cm
yum localinstall -y cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm
准备parcel文件
CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel
CDH-6.3.2-1.cdh6.3.2.p0.1605554-el7.parcel.sha1
manifest.json
# 复制 上面三个文件 到 /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-scm-server
systemctl start cloudera-scm-server
# 查看启动日志
tail -100f /var/log/cloudera-scm-server/cloudera-scm-server.log
启动cloudera-scm-agent
systemctl start cloudera-scm-agent
浏览器地址栏访问登录
192.168.8.11:7180
账号:admin
密码:admin