Cloudera(CDH)部署
docker>Evan2019年7月25日 (四) 12:32的版本 (→learn)
pre
系统初始化(每个服务器都要做) # 关闭iptables、禁用selinux sudo systemctl disable firewalld sudo systemctl stop firewalld sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config && setenforce 0 # 每台服务器之间设置免密认证 # CM cat >> /etc/hosts <<EOF 192.168.88.40 cdh.master master 192.168.88.41 cdh.node1 node1 192.168.88.42 cdh.node2 node2 #192.168.1.150 cdh.node3.aniu.so node3 EOF ## 注:在每台服务器配置hosts,master和node1/2/3代表服务器的主机名 sudo hostnamectl set-hostname "master" ssh免密码登录配置(每一台) 1. 在master 生成key 并自己配置自己的pub key ssh-keygen -t dsa ssh-copy-id -i ~/.ssh/id_dsa.pub 192.168.88.40 #这里是master ip 40 2. 主服务器与其它服务器免密码,在主节点上以下命令发送到其他对应服务器: rsync -avz .ssh/ 192.168.88.41:~/ # 设置swap参数 echo never > /sys/kernel/mm/transparent_hugepage/defrag #建议写到开启启动新里 sysctl -w vm.swappiness=0 # 建议写进sysctl.conf cat >>/etc/sysct <<EOF vm.swappiness=0 EOF sysctl -p # 设置ntp同步服务器时间 yum install ntp -y Edit the /etc/ntp.conf file to add NTP servers, as in the following example. server 0.cn.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org sudo systemctl start ntpd sudo systemctl enable ntpd #for centos6 */2 * * * * /usr/sbin/ntpdate 0.cn.pool.ntp.org >> /dev/null 2>&1 https://www.cloudera.com/documentation/enterprise/6/6.2/topics/install_cdh_disable_iptables.html#install_cdh_disable_iptables Cloudera安装步骤 参考:https://www.cloudera.com/documentation/enterprise/latest/topics/installation_installation.html 阶段1:安装JDK(忽略) [Java SE 8 Downloads](http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html) export JAVA_HOME=/usr/java/jdk.1.8.0_nn # java -version java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode) # 注 此处不用安装JDK,因为CM源有封装好的jdk, 阶段2:设置数据库 scp ~/rpm/rpmbuild2019/mysql20190506/RPMS/x86_64/ops_mysql-5.7.18-1.0.x86_64.rpm [email protected]:~ # 使用mysql数据库,提前安装好mysql # mysql -u root -ppassword -e "create database cmf DEFAULT CHARACTER SET utf8;" # mysql -u root -ppassword -e "GRANT ALL PRIVILEGES ON `cmf`.* TO 'cmf'@'localhost' IDENTIFIED BY '224088' ";" 阶段3:安装Cloudera Manager服务器 dns client 改为 8.8.4.4 # 配置cloudera-cdh源和cloudera-manager源 # cloudera-manager cd /etc/yum.repos.d/ wget http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/cloudera-manager.repo # cloudera-cdh wget https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/cloudera-cdh5.repo # 安装jdk和cloudera-manager sudo yum install oracle-j2sdk1.7 -y sudo yum install cloudera-manager-daemons cloudera-manager-server -y sudo yum install cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server axel https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5/RPMS/x86_64/oracle-j2sdk1.7-1.7.0+update67-1.x86_64.rpm axel https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5/RPMS/x86_64/cloudera-manager-daemons-5.16.2-1.cm5162.p0.7.el7.x86_64.rpm aria2c or 迅雷 axel https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5/RPMS/x86_64/cloudera-manager-server-5.16.2-1.cm5162.p0.7.el7.x86_64.rpm 阶段4:启动CM服务并通过浏览器访问 systemctl start cloudera-scm-server #有问题 tailf /var/log/cloudera-scm-server/cloudera-scm-server.log
troubleshooting
安装这个就行了 mysql-connector-java 安装MySQL JDBC Driver wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz tar zxvf mysql-connector-java-5.1.46.tar.gz && mkdir -p /usr/share/java/ cd mysql-connector-java-5.1.46 && cp mysql-connector-java-5.1.46-bin.jar /usr/share/java/mysql-connector-java.jar 下载 mysql-connector-java-8.0.11-1.el7.noarch.rpm https://dev.mysql.com/downloads/connector/j/
mysql-connector-java与mysql版本的对应
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-versions.html
see also
normal ins
docker ins
learn