CDH6.2.1安装部署Elastic Search
参考文章
https://www.cnblogs.com/zhangrui153169/p/11447423.html
https://blog.csdn.net/guoliduo/article/details/105072857
环境版本
CDH:6.2.1
jdk:1.8
ES:7.0.1
maven:3.3.9
maven和ES的下载链接: https://pan.baidu.com/s/1hkQpClglts5T2ZhXXisf4Q 提取码: 9v2w
vi /etc/profile
export MVN_HOME=/usr/local/maven
export PATH=$MVN_HOME/bin:$PATH
source /etc/profile
mvn -v
如下图
开始安装
安装步骤,如图即可完成
以下步骤都有对应的对照图
1. git clone https://github.com/cloudera/cm_ext.git
2. cm_ext 下 mvn clean package -Dmaven.test.skip=true
3. git clone https://github.com/ibagomel/elasticsearch-parcel.git
4. elasticsearch-parcel 下
4.1:parcel-src/meta/parcel.json >>>> 修改为:"depends": "CDH (>= 5.0), CDH (<< 10.0)",
4.2:csd-src/descriptor/service.sdl >>>> 修改为:"cdhVersion": {
"min": 6
}
4.3:POINT_VERSION=5 VALIDATOR_DIR=/cdh/software/es/cm_ext OS_VER=el7 PARCEL_NAME=ElasticSearch ./build-parcel.sh /cdh/software/es/es/elasticsearch-7.0.1-linux-x86_64.tar.gz
4.4:VALIDATOR_DIR=/cdh/software/es/cm_ext CSD_NAME=ElasticSearch ./build-csd.sh
5. build-csd下的 ELASTICSEARCH-1.0.jar 复制到 /opt/cloudera/csd
6. build-parcel下的 ****.parcel 和 manifest.json 复制到了 /var/www/html/es/ 下
7. /opt/cloudera/csd
/opt/cloudera/parcel-repo
赋权给CM的用户: cd /opt/cloudera/csd
chown -R cloudera-scm:cloudera-scm ./*
cd /opt/cloudera/parcel-repo
chown -R cloudera-scm:cloudera-scm ./*
8. CM web页面重启服务
9. 主机-parcel-配置 添加远程Parcel存储库URL http:/UserHostname/es/ eg:(http://CDH01/esnew/)
10. 检查新parcel 找到ELASTICSEARCH 下载、分发、**
11. 重启cm 添加服务
注意:以下问题全部节点执行
Q1: could not find java in JAVA_HOME or bundled at /usr/java/latest/bin/java
执行: 建立JAVA_HOMR的软连接: ln -s /usr/java/jdk1.8.0_11/ /usr/java/latest (不需要按照上面的步骤重新打包来一遍)
或者:elasticsearch-parcel/csd-src/scripts/control.sh (重新打包)
Q2: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: org.elasticsearch.cli.UserException:
unable to create temporary keystore at [/opt/cloudera/parcels/ELASTICSEARCH/config/elasticsearch.keystore.tmp], please check filesystem permissions
Likely root cause: java.nio.file.AccessDeniedException: /opt/cloudera/parcels/ELASTICSEARCH-0.0.5.elasticsearch.p0.5/config/elasticsearch.keystore.tmp
执行: chmod 777 /opt/cloudera/parcels/ELASTICSEARCH-0.0.5.elasticsearch.p0.5/config/
第一步对照图
bash: git: 未找到命令...
执行命令:yum install -y git
等待安装完成
第二步对照图
第三步对照图
第四步对照图
第五步对照图
第六步对照图
验证:(这里是要配置httpd服务 https://blog.csdn.net/yi247630676/article/details/84324660)
yum -y install httpd
systemctl start httpd
systemctl enable httpd
第九步对照图
第十步对照图:找到ELASTICSEARCH 下载、分发、**
第十一对照图
选择好以后,点击继续
注意:以下问题全部节点执行
Q1: could not find java in JAVA_HOME or bundled at /usr/java/latest/bin/java
执行: 建立JAVA_HOMR的软连接: ln -s /usr/java/jdk1.8.0_11/ /usr/java/latest (不需要按照上面的步骤重新打包来一遍)
或者:elasticsearch-parcel/csd-src/scripts/control.sh 修改JAVA_HOME(重新打包)
Q2: Exception in thread “main” org.elasticsearch.bootstrap.BootstrapException: org.elasticsearch.cli.UserException: unable to create temporary keystore at [/opt/cloudera/parcels/ELASTICSEARCH/config/elasticsearch.keystore.tmp], please check filesystem permissions
Likely root cause: java.nio.file.AccessDeniedException: /opt/cloudera/parcels/ELASTICSEARCH-0.0.5.elasticsearch.p0.5/config/elasticsearch.keystore.tmp
执行: chmod 777 /opt/cloudera/parcels/ELASTICSEARCH-0.0.5.elasticsearch.p0.5/config/
上一篇: SQL自主学习之常见问题总结