docker安裝elastic search的詳細過程
1. ELASTICSEARCH
1、安裝elastic search
dokcer中安裝elastic search
(1)下載ealastic search和kibana
docker pull elasticsearch:7.6.2 docker pull kibana:7.6.2
(2)配置
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/
(3)啟動Elastic search
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.6.2
設置開機啟動elasticsearch
docker update elasticsearch --restart=always
(4)啟動kibana:
docker run --name kibana -e ELASTICSEARCH_HOSTS=http://192.168.137.14:9200 -p 5601:5601 -d kibana:7.6.2
設置開機啟動kibana
docker update kibana --restart=always
(5)測試
查看elasticsearch版本信息: http://192.168.137.14:9200/
{ "name": "0adeb7852e00", "cluster_name": "elasticsearch", "cluster_uuid": "9gglpP0HTfyOTRAaSe2rIg", "version": { "number": "7.6.2", "build_flavor": "default", "build_type": "docker", "build_hash": "ef48eb35cf30adf4db14086e8aabd07ef6fb113f", "build_date": "2020-03-26T06:34:37.794943Z", "build_snapshot": false, "lucene_version": "8.4.0", "minimum_wire_compatibility_version": "6.8.0", "minimum_index_compatibility_version": "6.0.0-beta1" }, "tagline": "You Know, for Search" }
顯示elasticsearch 節點信息http://192.168.137.14:9200/_cat/nodes ,
127.0.0.1 76 95 1 0.26 1.40 1.22 dilm * 0adeb7852e00
訪問Kibana: http://192.168.137.14:5601/app/kibana
到此這篇關於docker安裝elastic search的文章就介紹到這瞭,更多相關docker安裝elastic search內容請搜索WalkonNet以前的文章或繼續瀏覽下面的相關文章希望大傢以後多多支持WalkonNet!
推薦閱讀:
- 使用Docker Compose搭建部署ElasticSearch的配置過程
- Docker部署Mysql,.Net6,Sqlserver等容器
- logstash將mysql數據同步到elasticsearch方法詳解
- Docker Compose一鍵ELK部署的方法實現
- 基於Docker搭建ELK 日志系統的方法