8. Installation of Elasticsearch under linux

  1. Create a new folder elk under the /opt/install/ file, and put elasticsearch-6.2.2.tar.gz and elasticsearch-analysis-ik-6.2.2.zip under elk via xftp
    Insert picture description here

  2. Then create an elk folder under /opt/bigdata/, and extract elasticsearch-6.2.2.tar.gz under /opt/install/elk to /opt/bigdata/elk

tar -zxvf elasticsearch-6.2.2.tar.gz -C /opt/bigdata/elk
  1. Change the name of the file decompressed to /opt/install/elk
mv elasticsearch-6.2.2/ es622
  1. Enter the elasticsearch.yml file under the config of es622 (note the space)
cd config/vi elasticsearch.yml
cluster.name: cyyserver
node.name: vbserver03
node.master: false
network.host:192.168.6.203
discovery.zen.ping.unicast.hosts: ["vbserver", "vbserver03"]
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
  1. vi /etc/sysctl.conf
vm.max_map_count=655360
  1. vi /etc/security/limits.conf (note the space),
* soft nofile 65536* hard nofile 65536* soft nproc 4096* hard nproc 4096
  1. sysctl -p makes the configuration take effect

  2. Authorization, allowing the user to have execution authority (because ela cannot be executed under root, for security reasons, it can only be executed by user)

chown -R chenyuying:chenyuying es622
  1. Switch user and execute in the bin directory of elasticsearch
./elasticsearch

Guess you like

Origin blog.csdn.net/weixin_44695793/article/details/108024590