es installation and use

Description: elasticsearch is currently the most popular search engine, powerful and very popular. This article introduces the installation of es and the visual interface kibana of es under the Cent OS 7 system, and the remote connection tool is WindTerm;

The first step: install es

Start docker, pull the es image, select the version number: 7.12.1

docker pull elasticsearch:7.12.1

I have already pulled it here, and it will take a little time to pull it for the first time;

insert image description here

Step 2: Install kibana

Pull another es visual interface kibana, version number selection: 7.12.1

docker pull kibana:7.12.1

insert image description here

Step Three: Create the Network

The es container and the kibana container need to be interconnected, and a network environment needs to be created

docker network create es-net

insert image description here

Step 4: Create a container and start it

Create an es container and start it

docker run -d \
	--name es \
    -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
    -e "discovery.type=single-node" \
    -v es-data:/usr/share/elasticsearch/data \
    -v es-plugins:/usr/share/elasticsearch/plugins \
    --privileged \
    --network es-net \
    -p 9200:9200 \
    -p 9300:9300 \
elasticsearch:7.12.1

Create a kibana container and start it

docker run -d \
	--name kibana \
	-e ELASTICSEARCH_HOSTS=http://es:9200 \
	--network=es-net \
	-p 5601:5601  \
kibana:7.12.1

insert image description here

Step Five: Use

Open the browser, first visit port 9200, es platform (http://IP address: 9200)

insert image description here

When accessing port 5601, it is the visual interface of kibana and es. The response may be a bit slow. If the access fails, you can wait and try again;

insert image description here

You can open Dev Tools, enter a sentence, and you can view the sentence segmentation on the right, because es is developed by foreigners, and it is not very compatible with Chinese, so you can install the IK tokenizer;

insert image description here

Guess you like

Origin blog.csdn.net/qq_42108331/article/details/131878164
Recommended