1.查看linux下java版本
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
2.安装gradle
cd /usr/local
wget https://downloads.gradle-dn.com/distributions/gradle-4.0.1-bin.zip
3. 运行gradle命令
unzip gradle-4.0.1-bin.zip
export PATH=$PATH:/usr/local/gradle-4.0.1/bin
安装成功:
gradle -v
------------------------------------------------------------
Gradle 4.0.1
------------------------------------------------------------
Build time: 2017-07-07 14:02:41 UTC
Revision: 38e5dc0f772daecca1d2681885d3d85414eb6826
Groovy: 2.4.11
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)
OS: Linux 3.10.0-1127.19.1.el7.x86_64 amd64
安装es的jieba插件
wget wget https://github.com/sing1ee/elasticsearch-jieba-plugin/archive/refs/tags/v7.4.2.zip
unzip v7.4.2.zip
cd elasticsearch-jieba-plugin-7.4.2
gradle pz
发现build文件创建成功
cd build/distributions
unzip elasticsearch-jieba-plugin-7.4.2.zip
docker cp ../distributions 镜像id:/usr/share/elasticsearch/plugins/
进入到容器
docker exec -it 56af517be8b7 /bin/bash
cd plugins/
mv distributions jieba
cd jieba
rm elasticsearch-jieba-plugin-7.4.2.zip
重启docker
docker restart 镜像id
查看日志
docker logs 镜像id
安装jieba成功