docker部署文档修改

This commit is contained in:
macro 2019-03-22 09:14:12 +08:00
parent 83cd972847
commit c458239ec7
2 changed files with 8 additions and 11 deletions

View File

@ -146,7 +146,7 @@ Mysql | 5.7 | https://www.mysql.com/
Redis | 3.2 | https://redis.io/download
Elasticsearch | 6.2.2 | https://www.elastic.co/downloads
MongoDb | 3.2 | https://www.mongodb.com/download-center
RabbitMq | 5.25 | http://www.rabbitmq.com/download.html
RabbitMq | 3.4.1 | http://www.rabbitmq.com/download.html
nginx | 1.10 | http://nginx.org/en/download.html
### 搭建步骤

View File

@ -85,27 +85,24 @@ rabbitmq:management
## elasticsearch安装
### 下载镜像文件
docker pull elasticsearch:2.4
docker pull elasticsearch:6.2.2
### 创建实例并运行
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch \
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
-d elasticsearch:2.4
-d elasticsearch:6.2.2
### 测试
访问会返回版本信息http://192.168.1.66:9200/
### 安装目录位置
/usr/share/elasticsearch
### 安装head插件
### 安装head插件(可以不安装,仅用于测试)
1. 进入docker内部bash:docker exec -it elasticsearch /bin/bash
2. 安装插件plugin install mobz/elasticsearch-head
2. 安装插件具体参考https://github.com/mobz/elasticsearch-head
3. 测试http://192.168.1.66:9200/_plugin/head/
### 安装中文分词器IKAnalyzer
1. 下载中文分词器https://github.com/medcl/elasticsearch-analysis-ik/releases?after=v5.6.4 的zip包并解压后重新压缩为.tar.gz文件
2. 上传后拷贝到容器中docker container cp elasticsearch-analysis-ik-1.10.6.tar.gz elasticsearch:/usr/share/elasticsearch/plugins
3. 进入容器压缩文件所在目录docker exec -it elasticsearch /bin/bash
4. 进行解压操作tar -xvf elasticsearch-analysis-ik-1.10.6.tar.gz
5. 重新启动容器docker restart elasticsearch
6. 测试:
1. 进入docker内部bash:docker exec -it elasticsearch /bin/bash
2. 安装中文分词插件执行以下命令elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.2.2/elasticsearch-analysis-ik-6.2.2.zip
3. 测试:
- 访问header插件打开地址http://192.168.1.66:9200/_plugin/head/
- 选择复合查询输入地址POST:http://192.168.1.66:9200/_analyze
- 输入参数JSON:{"analyzer":"ik","text":"我们是大数据开发人员"}