cd /opt
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.tar.gz
tar -zxvf elasticsearch-6.6.1.tar.gz
useradd elasticsearch
chown -R elasticsearch:elasticsearch /opt/elasticsearch-6.6.1
su elasticsearch
/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
添加四行
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535
重启系统
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
CentOS安装ElasticSearch
最新推荐文章于 2024-07-30 10:08:54 发布