ELK Manual ---- installed elasticssearch

The software is uploaded to the server 192.168.1.21
$ cd / usr / local / src /
$ LS
elasticsearch-6.5.1.rpm the JDK-8u191-x64.rpm Linux-
ready hard drive for storing log data
$ the -l fdisk
$ fdisk / dev / SDB
$ the fdisk -l
$ BLKID / dev / sdb1
$ the mkfs.xfs / dev / sdb1
$ BLKID / dev / sdb1
$ Vim / etc / fstab
the UUID = "15210161-83f7-48eb-8b79-40e94911a31b" / XFS Data Defaults 0 0
$ ount -a
$ reboot
installation configuration elasticssearch
$ CD / usr / local / the src /
$ yum the install JDK -Y-8u191-Linux-x64.rpm
$ yum -Y-6.5.1.rpm elasticsearch the install
Java -version $
Vim /etc/elasticsearch/elasticsearch.yml $
cluster.name: Elk-Cluster
node.name: server21
Path.Data: / Data / elasticsearch
path.logs: / the Data / log / elasticsearch
# bootstrap.memorylock: Open to true # memory Once locked, the service may not start
network.host: 192.168.1.21
http.port: 9200
discovery.zen.ping.unicast.hosts: [ " 192.168.1.21 "," 192.168.1.22 "]

$ grep" ^ [aZ] "/etc/elasticsearch/elasticsearch.yml
$ Vim /usr/lib/systemd/system/elasticsearch.service
LimitMEMLOCK = Infinity
$ Vim / etc / elasticsearch /jvm.options
-Xms3g # set to half the memory, do not exceed 32G
-Xmx3g

$ mkdir -p / the Data / elasticsearch
$ mkdir -p / the Data / log / elasticsearch
$ chown elasticsearch.elasticsearch / the Data / elasticsearch / / the Data / log / elasticsearch /
$ systemctl enable elasticsearch.service
$ systemctl start elasticsearch.service
$ SS -tnl # 9200 and 9300 ports must have only represented a successful start
LISTEN 0 128 ::ffff:192.168.1.21:9200 :::
LISTEN 0 128 ::ffff:192.168.1.21:9300 :::

$ curl http://192.168.1.21:9200

Head mounting plug
$ -Y yum the install Git
$ -Y yum the install NPM
$ Git clone Git: //github.com/mobz/elasticsearch-head.git
$ elasticsearch CD-head /
$ NPM the install Grunt -save
$ NPM the install
$ NPM Start & RUN
$ vim /etc/elasticsearch/elasticsearch.yml
# at the bottom Add
http.cors.enabled: to true
"": http.cors.allow-Origin

$ systemctl restart elasticsearch
es access with plug
http: //192.168. 1.21: 9100 ( http://192.168.1.21:9200/--- connector )

Guess you like

Origin blog.51cto.com/dongdong/2428470