ElasticSearch-head installation configuration Tutorial

Installation elasticsearch graphical management interface ElasticSearch-head

《elasticsearch-head》Github地址

Do some preparation work before installation, users will switch to the root user itcats

su
echo "itcats ALL = (root) NOPASSWD:ALL" | tee /etc/sudoers.d/itcats

Returns: itcats ALL = (root) NOPASSWD: ALL

chmod 0440 /etc/sudoers.d/itcats

Solve sudo: sorry, you must have a tty to run sudo problem, in / etc / sudoer comment out the line Default requiretty

sudo sed -i 's/Defaults requiretty/Defaults:itcats !requiretty/' /etc/sudoers

Update dependence

sudo yum update -y

Update epel extended source 

sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm

Install npm

sudo yum install npm

Install git 

sudo yum install -y git

Installation bzip2

sudo yum install -y bzip2

Download es-head

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

After downloading source packages to cut the / usr / local / directory, and change their user groups and

sudo chown -R itcats:itcats /usr/local/elasticsearch-head

# Elasticsearch-head into the

cd elasticsearch-head

Compile and install

npm install

Open elasticsearch-head-master / Gruntfile.js, connect to find the following properties, the new hostname: '0.0.0.0', the machine may be changed ip

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

Edit elasticsearch-5.4.3 / config / elasticsearch.yml, add the following: [inform] the plug can be connected to ES

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

[Run services performed first ES, ES-head] after performing plus ES execute the command: /usr/local/elasticsearch-5.4.3/bin/elasticsearch -d

npm run start

If the show is successful as follows:

> [email protected] start /usr/local/elasticsearch-head
> grunt server

Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100

Visit http: // hdp-01: 9100

 

Health found that the value is not connected, only need to modify the localhost to hdp-01 can be, the reader can be modified to correspond ip, click on the link

View to a star only node-1, indicating that node-1 is master.

Published 162 original articles · won praise 237 · views 260 000 +

Guess you like

Origin blog.csdn.net/itcats_cn/article/details/89606146