elasticsearch-head corresponds to ES (7.4)

ES-head plugin installation guide


Preliminary summary: ES7.4 version, installation example: https://blog.csdn.net/rao991207823/article/details/108558616

1. Download elasticsearch-head

Official website download address: https://github.com/mobz/elasticsearch-head, because the code is placed on github, the download method is divided into git clone download and zip download

1.1. Download by git

Git download command: git clone git://github.com/mobz/elasticsearch-head.git
Use the git tool, under the folder that needs to be stored, right-click to find Git Bash Here, and enter the command in the cmd box that pops up (Note: This method must have the distributed code version management tool git installed in the local environment).

1.2. Download by zip

zip download: Find "Code" at the download address and select "Download ZIP".
Insert picture description here

2. Install elasticsearch-head under window10

2.1. Install node.js

The elasticsearch-head plug-in is developed using the node.js environment, so you need to install node.js, the official website download address: https://nodejs.org/en/
The node.js version installed here is 12.18.2 LTS, it’s The installation package is of the .msi file type, so you can run the installation directly in the window environment.
Insert picture description here
This address is recommended to download under a good network, after all, foreign resources (you know)
here to share my version of the Baidu network disk link:
https://pan.baidu.com/s/1myBFEj4qEuWkquai_5kufw , extraction code: 4dtf.

2.2. Elasticsearch-head is initialized and executed

The official commands are:
1) cd elasticsearch-head(switch to the elasticsearch-head directory)
2) npm install(install the node.js project dependency)
3) npm run start(run the elasticsearch-head project)
4) access address (default): http://localhost:9100/
Insert picture description here
Note: In win10, you can use shift+ctrl+right mouse button to directly open the powershell window in the elasticsearch-head directory, and you can directly navigate to the current directory (similar: manually switch to this directory)
Insert picture description here

2.3. Start access (the es connected by default is local)

Insert picture description here

3. Install elasticsearch-head under Linux

3.1. Download and install node.js in the Linux environment

Download address of previous version of node.js: https://nodejs.org/download/release/ The
downloaded Linux version is: node-v12.18.2-linux-x64.tar.gz
Baidu network disk link: https://pan .baidu.com/s/1ypD3-nuJ2UjlzRalTciCGg , extraction code: ua2q
1. Upload the installation package to the Linux server (specify a storage path, here: /usr/apps/node.js), and execute the decompression command: tar- zxvf node-v12.18.2-linux-x64.tar.gz
2. Rename the unzipped folder to nodejs, command: mv node-v12.18.2-linux-x64 nodejs
2-1. Confirm whether there are node and npm files in the bin directory under nodejs, execute the command to check whether node is installed If successful, the command is as shown: ./node -v
3. Configure environment variables
Configure the following information in the /etc/profile environment variable setting file.

export NODE_HOME= /usr/apps/node.js/nodejs
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules

Command to reload the file to make it effective:source /etc/bashrc
Insert picture description here

3.2. The official process of installing the plug-in

1) Install git, command: yum install git
2) Download plug-in: git clone https://github.com/mobz/elasticsearch-head.git
3) Switch to the elasticsearch-head directory: cd elasticsearch-head
4) Installation dependency: npm install(May wait some time, it is recommended to try several times)
Insert picture description here
5) Modify the server listening address, modify the file Gruntfile. js, add: "hostname:'*'," position as shown

connect: {
    
    
        server: {
    
    
                options: {
    
    
                        hostname: '*',
                        port: 9100,
                        base: '.',
                        keepalive: true
                }
        }
}

6) Start the plug-in, start in the foreground:, npm run startdisplay information as shown:
Insert picture description here
7) Open access port 9100 to
add an open port command: firewall-cmd --zone=public --add-port=9100/tcp --permanent
restart the firewall: firewall-cmd --reload
view open ports: firewall-cmd --list-port
8) Start in the background, command: grunt server &(Note: need to be in the elasticsearch-head directory)
Note:
9) Since the monitoring address is "*", the browser can access it by entering the server address + 9100.
10) lsof -i:9100Used to view the occupancy of port 9100

Guess you like

Origin blog.csdn.net/rao991207823/article/details/113804611