Elasticsearch Advanced articles (a) - installation and configuration of the head plug

1. Install node.js

1.1, through the official website to download binary packages

https://nodejs.org/en/download/

 Select the corresponding version, right-copy the download link, enter linux directory, switch to the directory of the disk you want to install. Here we have the software installed in / usr / local directory, execute the following command to download the installation package

cd /usr/local/
wget https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz

After the download has finished you can see the download is complete archive in the disk directory

1.2, extracting installation package

takes -xJf node V10. 16.3 -linux-x64. takes .xz

1.3, configure the environment variables

we / etc / profile

In the final document face additional node.js environment variables

export NODE_HOME=/usr/local/node-v10.16.3-linux-x64
export PATH=$NODE_HOME/bin:$PATH

1.4, reload the configuration file and verify that the installation was successful

source /etc/profile
node - v 
npm -v

Node.js see descriptions on the configuration shown in FIG installed successfully!

Plug-in installation and configuration 2.head

Please install the plug-in installation package head, but by downloading git, git so we first need to install the plug-in system, before you can download and install

2.1, install git plugin

yum install -y git

2.2, verify whether the installation was successful git plugin

git --version

FIG see the following description of the plug-in installed successfully git

2.3, download and install the plug-in head

git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head/
npm install

2.4, configuration elasticsearch, allow remote access to the plug head

cd elasticsearch- 6.5 . 1 / config /
 vi elasticearch.yml

Add the following to the end of the configuration file, restart the service elasticsearch

http.cors.enabled: true
http.cors.allow-origin: "*"

2.5, start elasticsearch-head service

cd elasticsearch-head/
npm run start

You can see the head plug occupied by default port 9100, the browser input: http://192.168.31.170:9100/ to display the head plug-in interface

2.6, head plug connection service through elasticsearch

Enter elasticsearch service address, click the link on the right displays a yellow information indicating successful connection is, so far elasticsearch-head plug-in installed successfully

Guess you like

Origin www.cnblogs.com/sunny1009/p/11429775.html