Elasticsearch-head Plug-in installation

Source: Internet
Author: User
Tags config git clone

The following is the Elasticsearch-head plug-in installation in ElasticSearch-5.3.1 use:

1. Installing the NODEJS Environment

1) wget https://npm.taobao.org/mirrors/node/latest-v4.x/node-v4.4.7-linux-x64.tar.gz
2) TAR-ZXVF node-v4.4.7-linux-x64.tar.gz
3) Export path= $PATH:/opt/node-v4.4.7-linux-x64/bin

Test  node--version
     v4.4.7

2. Install NPM

Download the NMP installation package, the general Nodejs package already contains, set the environment variable can be used directly with the NMP command, if not installed, first download:

Website address: www.npmjs.com

Taobao Address: https://npm.taobao.org/mirrors/npm/

The installation uses the following command:

  Node Cli.js install NPM-GF

3. Installing grunt

1) Install Grunt command line tool grunt-cli NPM install-g grunt-cli

2) Install grunt and its plugin npm install grunt--save-dev

You can use Grunt-version to view the installation version

Then, on the 220 server,

git clone git://github.com/mobz/elasticsearch-head.git

CD Elasticsearch-head

NPM Install

NPM Install grunt--save

Modify Elasticsearch-head under the Gruntfile.js file, the default listener in 127.0.0.1 under 9200 port,

Then Cd/usr/local/elasticsearch-head executes grunt server

Browser Access Http://172.16.31.220:9100/

The interface appears:

The problem with the Head master page can be displayed, but the connection fails "cluster health value: Not Connected" 4, Solution Modify the Elasticsearch.yml file

1 2 3 4 Vim $ES _home$/config/elasticsearch. YML # Add the following fields Http.cors.enabled:true http.cors.allow-origin: "*"

Restart ES to


Change Server listener address

Catalog: Head/gruntfile.js

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

Add hostname property, set to * Modify connection Address:

Catalog: 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";


Ok here, the ElasticSearch-5.3.1 cluster, and the head plug-in installation is over.

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.