CentOS安装ElasticSearch

cd/opt

wgethttps://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.tar.gz

tar-zxvfelasticsearch-6.6.1.tar.gz

useraddelasticsearch

chown-Relasticsearch:elasticsearch/opt/elasticsearch-6.6.1

suelasticsearch

/opt/elasticsearch-6.6.1/bin/elasticsearch

vi/opt/elasticsearch-6.6.1/config/elasticsearch.yml

增加network.host:0.0.0.0

增加discovery.zen.ping.unicast.hosts:["0.0.0.0"]

/opt/elasticsearch-6.6.1/bin/elasticsearch

报错

vi/etc/security/limits.conf

添加四行

*softnofile65535

*hardnofile65535

*softnproc65535

*hardnproc65535

重启系统

ulimit-n

vi/etc/sysctl.conf

添加一行

vm.max_map_count=655360

sysctl-p

/opt/elasticsearch-6.6.1/bin/elasticsearch

后台启动

/opt/elasticsearch-6.6.1/bin/elasticsearch-d

相关推荐