Install the Elasticsearch Head tool on Linux. MD

Source: Internet
Author: User
Tags install node

Installing Elasticsearch Head tool 1 on Linux, modifying the parameters of Elasticsearch

Edit the Elasticsearch configuration file elasticsearch.yml

/data/elasticsearch/elasticsearch-5.5.3/config/elasticsearch.yml

Add the following configuration

# 增加新的参数,这样head插件可以访问eshttp.cors.enabled: truehttp.cors.allow-origin: "*"

Restart Elasticsearch Service

2. Install node and install Grunt

Slightly

3. Modify head Source code

Headhttps://github.com/mobz/elasticsearch-head

Download the installation package Elasticsearch-head-master.zip, upload to the/data/elasticsearch/directory

Because the head code is also version 2.6, there are many restrictions on direct execution, such as the inability to access across machines. So users need to modify two places:

Modify Server Listener Address

Directory:head/Gruntfile.js

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

Add hostname property, set to*

To modify the connection address:

Directory:head/_site/app.js

To modify the connection address of the head:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";

Change localhost to the server address of your ES, such as:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.10.10:9200";
4. Running Head

First turn on Elasticsearch.

Then in head目录 , execute npm install the package since the download:

install

Finally, start Nodejs

grunt server

Visit: Http://192.168.1.124:9100/

This time, access to http://xxx:9100 can access the head plugin.

5. Background start Elasticsearch-head

Background start grunt Server command;

nohup grunt server &exit
nohup grunt server &

If you want to close the head plugin, use the Linux find process command:

ps aux|grep head

End Process:

Kill Process Number

Reference

head官方文档 https://github.com/mobz/elasticsearch-head#running-with-built-in-serverhttp://www.cnblogs.com/xing901022/p/6030296.htmlhttp://blog.csdn.net/hit0803107/article/details/54669909
5, permission 6, set up firewall 7, boot up

Install the Elasticsearch Head tool on Linux. MD

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.