单机版本CDH6.3.2搭建教程
已正常安装centos7 虚拟机
安装包
链接:https://pan.baidu.com/s/1ZC7U1pu_5KApQn8JOz1aPQ
提取码:ksic
文档
链接:https://pan.baidu.com/s/1gS_4GLlKClA16ZuBDG1nbA
提取码:zb46
–来自百度网盘超级会员V5的分享
前置准备已经把以下包上传到software目录下。
CentOS7.6操作系统,4核16G最低配置(单机)
设置hostname 主机名称
hostname cdh1
查看ip
Ifconfig
设置所有节点的hosts⽂件
echo “192.168.0.234 cdh1”>> /etc/hosts
关闭所有节点的防⽕墙及清空规则
systemctl stop firewalld
systemctl disable firewalld
iptables -F
关闭所有节点的selinux
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能⽣效
退出保存wq
安裝jdk 和scala
mkdir /usr/java
tar -zxvf jdk-8u212-linux-x64.tar.gz -C /usr/java/
#切记必须修正所属⽤户及⽤户组
chown -R root:root /usr/java/jdk1.8.0_212
echo “export JAVA_HOME=/usr/java/jdk1.8.0_212” >> /etc/profile
echo “export PATH=/usr/java/jdk1.8.0_212/bin:${PATH}” >> /etc/profile
source /etc/profile
which java
安装scala
mkdir /usr/scala
tar -zxvf scala-2.11.12.tgz -C /usr/scala/
echo “export PATH=/usr/scala/scala-2.11.12/bin:${PATH}” >> /etc/profile
source /etc/profile
输入scala弹出如下
Ctrl+c退出
安装mysql5.7.27
先卸载mariadb防止mysql冲突
rpm -qa |grep mariadb
rpm -e --nodeps mariadb-libs-5.5.60-1.el7_5.x86_64
按顺序执行下面五句话安装mysql
rpm -ivh mysql-community-common-5.7.27-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-5.7.27-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-compat-5.7.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.27-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-5.7.27-1.el7.x86_64.rpm --nodeps --force
查看mysql是否启动
service mysqld status
启动mysql
service mysqld start
停止mysql
service mysqld stop
重启mysql
service mysqld restart
设定开机自启动
vi /etc/rc.local
添加 service mysqld start
确认mysql初始密码
more /var/log/mysqld.log |grep password
登录mysql
mysql -p
修改密码(大写+小写+特殊字符)
mysql> set password = password(“Mysql_123456”);
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql远程连接配置
grant all privileges on . to root@’%’ identified by “Mysql_123456”;
flush privileges;
Exit;退出
navicat连接mysql。创建所需的元数据数据库。
create database cmf DEFAULT CHARACTER SET utf8;
create database amon DEFAULT CHARACTER SET utf8;
create database hive DEFAULT CHARACTER SET utf8;
create database hue DEFAULT CHARACTER SET utf8;
create database oozie DEFAULT CHARACTER SET utf8;
拷贝jdbc连接包到公共目录,实现jdbc连接msyql
mkdir -p /usr/share/java/
cp mysql-connector-java-5.1.46.jar /usr/share/java/mysql-connector-java.jar
CDH部署
1.离线部署cm server及agent
1.1.所有节点创建⽬录及解压
mkdir /opt/cloudera-manager
tar -xzvf cm6.3.1-redhat7.tar.gz -C /opt/cloudera-manager/
1.2.选择cdh1 为cm server,不下载依赖包直接部署
cd /opt/cloudera-manager/cm6.3.1/RPMS/x86_64
rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-server-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
1.3.所有节点(包含cdh1)为cm agent,不下载依赖包直接部署
cd /opt/cloudera-manager/cm6.3.1/RPMS/x86_64
rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
所有节点修改agent的配置,指向server的节点cdh1
vi /etc/cloudera-scm-agent/config.ini
wq保存退出
主节点修改server的配置:
vi /etc/cloudera-scm-server/db.properties
com.cloudera.cmf.db.type=mysql
com.cloudera.cmf.db.host=cdh1:3306
com.cloudera.cmf.db.name=cmf
com.cloudera.cmf.db.user=root
com.cloudera.cmf.db.password=Mysql_123456
com.cloudera.cmf.db.setupType=EXTERNAL
注意我把上面的全注释掉了。。 。。。。。。。。。自己粘贴新的
完全离线安装
rpm -ivh mailcap-2.1.41-2.el7.noarch.rpm
rpm -ivh httpd-tools-2.4.6-93.el7.centos.x86_64.rpm
rpm -ivh httpd-2.4.6-93.el7.centos.x86_64.rpm
mkdir -p /var/www/html/cdh6_parcel
拷贝文件
cp
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 /var/www/html/cdh6_parcel/
改名校验
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
systemctl start httpd
启动httpd 访问
启动server
systemctl start cloudera-scm-server
查看⽇志:
cd /var/log/cloudera-scm-server/
tail -F cloudera-scm-server.log
Ctrl+c退出
所有节点启动Agent
systemctl start cloudera-scm-agent
登录admin/admin
Hive on spark 优化配置
Hue连接不上解决
yum install php-devel php-pear httpd-devel
Hue连接不上解决
yum install php-devel php-pear httpd-devel