Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install es for docker

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to install es in docker". In daily operation, I believe many people have doubts about how to install es in docker. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to install es in docker". Next, please follow the editor to study!

Copy the configuration file of the container to the current directory (take nginx as an example):

Docker container cp nginx:/etc/nginx.

0. Install nginx

Docker run-p 80:80-- name nginx-v/mydata/nginx/ html:/usr/share/nginx/html-v/mydata/nginx/ logs:/var/log/nginx-v/mydata/nginx/conf:/etc/nginx-d nginx:1.10

View the log-docker container logs-f elasticsearch

1. Install elasticsearch

(1) docker pull elasticsearch:7.4.2

(2) docker pull kibana:7.4.2

(3) mkdir-p / mydata/elasticsearch/config

(4) mkdir-p / mydata/elasticsearch/data

(5) echo "http.host: 0.0.0.0" > > / mydata/elasticsearch/config/elasticsearch.yml

(6)

Docker run-- name elasticsearch-p 9200 discovery.type=single-node-e ES_JAVA_OPTS= "- Xms64m-Xmx128m"-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

* chmod-R 777 / mydata/elasticsearch

two。 Install kibana

Docker run-- name kibana-e ELASTICSEARCH_HOSTS= http://192.168.56.10:9200/-p 5601 ELASTICSEARCH_HOSTS= 5601-d kibana:7.4.2

* docker run-- name kibana-e ELASTICSEARCH_HOSTS=121.89.193.237:9200-p 5601-d kibana:7.4.2-- restart=always

Ip of the ELASTICSEARCH_HOSTS=121.89.193.237:9200 server

Docker install mysql

* docker update mysql-- the restart=always virtual machine starts, and the image starts.

(1)

Docker run-p 3306 mydata/mysql/log:/var/log/mysql 3306-- name mysql-v / mydata/mysql/log:/var/log/mysql-v / mydata/mysql/log:/var/log/mysql-v / mydata/mysql/data:/var/lib/mysql-v / mydata/mysql/conf:/etc/mysql-e MYSQL_ROOT_PASSWORD=mysql-d mysql:5.7

(2) configure mysql file / mydata/mysql/conf/my.conf

[client]

Default-character-set=utf8

[mysql]

Default-character-set=utf8

[mysqld]

Init_connect='SET collation_connection = utf8_unicode_ci'

Init_connect='SET NAMES utf8'

Character-set-server=utf8

Collation-server=utf8_unicode_ci

Skip-character-set-client-handshake

Skip-name-resolve

Docker install redis

* the docker update redis--restart=always virtual machine starts, and the image starts.

(1)

Docker run-p 6379 mydata/redis/data:/data 6379-- name redis- v / mydata/redis/data:/data-v / mydata/redis/conf/redis.conf:/etc/redis/redis.conf-d redis redis-server / etc/redis/redis.conf

(2) start redis docker exec-it redis redis-cli

(3) configure the configuration file / mydata/redis/conf/redis.conf of redis

Appendonly yes # redis persistence

Maven configuration

Nexus-aliyun

Central

Nexus aliyun

Http://maven.aliyun.com/nexus/conect/groups/public

< profiles >

< profile >

< id >

Jdk-1.8

< activation >

< activeByDefault >

True

< jdk >

1.8

< properties >

< maven.compiler.source >

1.8

< maven.compiler.target >

1.8

< maven.compiler.compilerVersion >

1.8

At this point, the study on "how to install es in docker" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report