电商项目高级篇-01 elasticsearch
- 1、linux下安装elasticsearch和可视化工具
1、linux下安装elasticsearch和可视化工具
将安装好jdk1.8和tomcat的centos7下安装elasticsearch
docker pull elasticsearch:7.4.2
docker pull kibana:7.4.2
##docker下安装软件需要配置挂载。方便修改配置文件
mkdir -p /mydata/elasticsearch/config
mkdir -p /mydata/elasticsearch/data
echo "http.host: 0.0.0.0" >> /mydata/elasticsearch/config/elasticsearch.yml
给予最大权限
chmod -R 777 /mydata/elasticsearch/
设置挂载和最大内存占用启动
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms64m -Xmx512m" \
-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-d elasticsearch:7.4.2
##docker下检查容器日志
docker logs 7f
日志是正常的
访问正常