标签:rc.local 自己 基础 ppi ima domain 根据 nod strong
序言
本文集群搭建为三台机器,cdh版本为5.13.0,以下是安装过程中所用到的软件包等,可以自行下载。
一、前期准备
1.安装环境
二、环境配置
注意:所有操作都需要使用root权限操作
10.81.22.184 cdh01 10.81.22.188 cdh02 10.81.22.189 cdh03
NETWORKING=yes
HOSTNAME=cdh01
将selinux的值修改成disabled
SELINUX=disabled
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
# 允许内网其他机器同步时间
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# 中国这边最活跃的时间服务器 : http://www.pool.ntp.org/zone/cn
server 210.72.145.44 perfer # 中国国家受时中心
server 202.112.10.36 # 1.cn.pool.ntp.org
server 59.124.196.83 # 0.asia.pool.ntp.org
# 允许上层时间服务器主动修改本机时间
restrict 210.72.145.44 nomodify notrap noquery
restrict 202.112.10.36 nomodify notrap noquery
restrict 59.124.196.83 nomodify notrap noquery
# 外部时间服务器不可用时,以本地时间作为时间服务
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
#只保留以上内容其他全部注释掉
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
server cdh01 #改成自己的主节点名称
restrict 192.168.1.135 nomodify notrap noquery
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
#只保留以上内容其他全部注释掉
在mysql连接工具下执行(否则可能会报错) create database metastore default character set utf8; CREATE USER ‘hive‘@‘%‘ IDENTIFIED BY ‘hive‘; GRANT ALL PRIVILEGES ON metastore. * TO ‘hive‘@‘%‘; create database hive default character set utf8; GRANT ALL PRIVILEGES ON hive. * TO ‘hive‘@‘%‘; create database cm default character set utf8; CREATE USER ‘cm‘@‘%‘ IDENTIFIED BY ‘cm‘; GRANT ALL PRIVILEGES ON cm.* TO ‘cm‘@‘%‘; create database am default character set utf8; CREATE USER ‘am‘@‘%‘ IDENTIFIED BY ‘am‘; GRANT ALL PRIVILEGES ON am. * TO ‘am‘@‘%‘; create database rm default character set utf8; CREATE USER ‘rm‘@‘%‘ IDENTIFIED BY ‘rm‘; GRANT ALL PRIVILEGES ON rm. * TO ‘rm‘@‘%‘; create database hue default character set utf8; CREATE USER ‘hue‘@‘%‘ IDENTIFIED BY ‘hue‘; GRANT ALL PRIVILEGES ON hue. * TO ‘hue‘@‘%‘; create database oozie default character set utf8; CREATE USER ‘oozie‘@‘%‘ IDENTIFIED BY ‘oozie‘; GRANT ALL PRIVILEGES ON oozie. * TO ‘oozie‘@‘%‘; flush privileges;
/opt/cm-5.13.0/share/cmf/schema/scm_prepare_database.sh mysql -uroot -p123 scm scm scm
server_host=cdh01
useradd --system --home=/opt/cm-5.13.0/run/cloudera-scm-server/ --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
mv CDH-5.13.0-1.cdh5.13.0.p0.29-el7.parcel.sha1 CDH-5.13.0-1.cdh5.13.0.p0.29-el7.parcel.sha
#主节点
/opt/cm-5.13.0/etc/init.d/cloudera-scm-server start
#主节点及其他节点
/opt/cm-5.13.0/etc/init.d/cloudera-scm-agent start
第一个警告直接在所有节点上执行
echo 10 > /proc/sys/vm/swappiness
第二个警告按照上面的说明,在所有节点上执行这两条命令
echo never >/sys/kernel/mm/transparent_hugepage/defrag >> /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/enabled>> /etc/rc.local
同时同一命令添加到 /etc/rc.local 等初始化脚本中,以便在系统重启时予以设置。
解决方法(需要在所有节点上执行)
cp /opt/cm-5.13.0/share/cmf/lib/mysql-connector-java-5.1.47-bin.jar /opt/cloudera/parcels/CDH-5.13.0-1.cdh5.13.0.p0.29/lib/hive/lib/
cp /opt/cm-5.13.0/share/cmf/lib/mysql-connector-java-5.1.47-bin.jar /var/lib/oozie/
标签:rc.local 自己 基础 ppi ima domain 根据 nod strong
原文地址:https://www.cnblogs.com/lxyuuuuu/p/10346360.html