1. The Head plugin of Elastic Search
In the first article of Elastic Search, we talked about Kibana, through which we can operate ES, monitor ES, etc. in a UI way. Here is another plug-in that ES is easy to use - Head. The specific use steps are as follows:
Step 1: Download the plugin, the address is: https://github.com/mobz/elasticsearch-head/archive/master.zip;
Step 2: Unzip the file downloaded in the first step. Since the head plugin is a node project, we need to install node locally, and the installation step is skipped here;
Step 3: Execute npm install to install each module of the head plugin, and finally run: npm run start
Step 4: Visit: http://localhost:9100
Note: The Elastic Search and Head plugins are two separate processes after running. You need to modify the ES configuration elasticsearch.yml before they are associated. Add the following two configurations to the ES configuration file:
http.cors.enabled: true
http.cors.allow-origin: "*"
Second, the cluster environment construction of Elastic Search
Step 1: Copy the ES compressed package we downloaded from the official website, and decompress one as the master node and the other as the slave node;
Step 2: As the master node, add the following configuration to the corresponding elasticsearch.yml configuration:
cluster.name: custom cluster name
node.name: master (custom node name)
node.master: true (as the master node)
network.host: 127.0.0. (host IP address)
Step 3: As a slave node, add the following configuration to the corresponding elasticsearch.yml configuration:
cluster.name: custom cluster name, consistent with the configuration of the master node
node.name: slave1 (custom node name)
node.master: true (as the master node)
network.host: 127.0.0. (host IP address)
http.port: port number
discovery.zen.ping.unicast.hosts: ["127.0.0.1"] (find the master node)