Elasticsearch 在 centos 上安装

2020-05-05  本文已影响0人  droxy

下载

https://www.elastic.co/downloads/elasticsearch

安装

tar -zxvf /tools/elasticsearch-5.6.4.tar.gz

配置

一、建立用户组和用户

groupadd es

useradd es -g es

chown -R es:es /usr/local/elasticsearch-5.6.4

su es

二、es配置

vim /usr/local/elasticsearch-5.6.4/config/elasticsearch.yml

data、logs路径shell

path.data: /usr/local/elasticsearch-5.6.4/data

path.logs: /usr/local/elasticsearch-5.6.4/logs

network.host: 192.168.1.10

network.host: 192.168.1.10

network.host: 0.0.0.0

三、其余

vim /etc/sysctl.conf

增长以下内容bootstrap

vm.max_map_count = 262144

使配置生效vim

sysctl -p

启动

./bin/elasticsearch -d

测试

curl -X GET "localhost:9200/?pretty"

{

  "name" : "master",

  "cluster_name" : "elasticsearch",

  "cluster_uuid" : "BaQiZ_JzQC-QKRqMivzwGA",

  "version" : {

    "number" : "5.6.4",

    "build_hash" : "8bbedf5",

    "build_date" : "2018-10-30T18:45:31.22Z",

    "build_snapshot" : false,

    "lucene_version" : "6.6.1"

  },

  "tagline" : "You Know, for Search"

}

参考文章:

https://www.shangmayuan.com/a/41eee85c1dc6436fad083dd3.html

上一篇 下一篇

猜你喜欢

热点阅读