Small note --------- Elasticsear build

Elasticsear build

Create a user:
useradd elasticsearch
passwd elasticsearch
 

1, extract

t ar on the  zxvf elasticsearch-552targz
 

2, modify the configuration file

Vim /config/elasticsearch.yml
cluster.name: cluster_es
node.name: es_1 [ name of the current node represents ]
path.data : /usr/local/elk/elasticsearch-5.5.2/es_data/datas
path.logs : /usr/local/elk/elasticsearch-5.5.2/es_data/logs
 
network.host: 192.168.77.10 [ Note: the current node ip ]
 
discovery.zen.ping.unicast.hosts : ["192.168.77.10","192.168.77.11","192.168.77.12"]
bootstrap.memory_lock : false
 
bootstrap.system_call_filter : false
 
 
http.cors.enabled: true
http.cors.allow-origin: "*"
 
xpack.security.enabled : false
##xpack.monitoring.enabled : true
 
 bootstrap.memory_lock: Set to true to lock the memory. Because when jvm starts swapping es efficiency will be reduced, so to ensure that it does not swap, and can ES_MIN_MEM two ES_MAX_MEM environment variable to the same value, and to ensure that the machine has enough memory allocated es. But also allows elasticsearch process can lock memory
bootstrap.system_call_filter detect your operating system support: Seccomp ; false identity is not detected, linux is a security mechanism (reduction of external exposure system)
head plug can be accessed es :
http.cors.enabled: true
http.cors.allow-origin: "*"
 
xpack.security.enabled   the X-Pack-if you want to secure authentication, false identity is not certified
xpack.monitoring.enabled  whether the X- - Pack said they did not monitor the false certification
discovery.zen.ping.unicast.host : node cluster
network.host :( domain name of the current node or ip)
cluster.name : the name of the cluster
 
Once you have configured after es information, create the following files in the path es configurations:
path.data : /usr/local/elk/elasticsearch-5.5.2/es_data/datas
path.logs : /usr/local/elk/elasticsearch-5.5.2/es_data/logs
 
 

3, x-pack download

Excuting an order:
bin/elasticsearch-plugin install x-pack
It indicates when there is illustrated in FIG x-pack installed successfully:
 
 
【note】
If there is an error:
`Plugin x-pack already exists, please remove before installing a new version
 
Execute: bin / elasticsearch-plugin remove x-pack
And then reinstall:
bin/elasticsearch-plugin install x-pack
[More] To each machine

4, download elasticsearch-head

Unzip Master .zip  to elasticsearch / bin / directory
 
 

5, the installation node plug

1):tar -zxvf node-v4.4.7-linux-x64.tar.gz
( 2): the configuration environment variable , edit / etc / profile add
export NODE_HOME=/export/servers/elk/node-v4.4.7-linux-x64
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules
( 3): Installation grunt
grunt is a build tool Node.js project-based work can be compressed package, test, execute and so on, head plug is through the grunt start
cd /bin/elasticsearch-head-master
npm install -g grunt-cli   after // execution will generate node_modules folder
Check whether the installation was successful :
 

6, modify the source code plug-in head

Modify server listening address : Gruntfile.js (elasticsearch-5.5.2 / bin / elasticsearch-head-master / Gruntfile.js)
 
Modify Connection Address: _SITE / app.js
 

7, running head

In the elasticsearch-head-master directory
NPM  the install ((downloaded installation packages) steps and time-consuming )
启动head:grunt server(elasticsearch-head-master)

8, visit http: // xxx: 9100


Kibana 搭建

1, extract

t -zxvf Kibana-5.5.2-linux-x86_64.tar.gz

2, the modified kibana config / kibana.yml file

server.host: "hadoop01"
server.port: 5601
elasticsearch.url: "http://hadoop01:9200"
kibana.index: ".kibana"
 

3, x-pack mounting

bin/kibana-plugin install x-pack
If the installation fails
`Plugin x-pack already exists, please remove before installing a new version
bin/kibana-plugin remove x-pack
Successful installation look
 

4, start kibana

bin / kibana
 
 

Logstash build

1, extract

t ar on the  zxvf logstash-552targz

2, x-pack mounting

bin/logstash-plugin install x-pack

3, to test whether the installation is successful

bin/logstash -e 'input { stdin { } } output { stdout { codec => rubydebug } }'
If the output format is as follows behalf of success:
 
 

Enabling and disabling

X-Pack to enable and disable the function
By default, all X-Pack functions are enabled. You can enable or disable specific features of X-Pack elasticsearch.yml, kibana.yml and logstash.yml profile.
Set up
description
xpack.graph.enabled
Set to false to disable X-Pack graphics capabilities.
xpack.ml.enabled
Set to false to disable X-Pack machine learning.
xpack.monitoring.enabled
设置为false禁用X-Pack监视功能。
xpack.reporting.enabled
设置为false禁用X-Pack报告功能。
xpack.security.enabled
设置为false禁用X-Pack安全功能。
xpack.watcher.enabled
设置false为禁用观察器。
 

Guess you like

Origin www.cnblogs.com/yzqyxq/p/11594668.html