elasticsearch-7.4.2-linux-x86_64.tar.gz
Centos7
192.168.200.110
tar -xf elasticsearch-7.4.2-linux-x86_64.tar.gz -C /usr/local/
mv /usr/local/elasticsearch-7.4.2/ /usr/local/es
vim elasticsearch-env
在set -e -o pipefail下面添加
JAVA_HOME="/usr/local/es/jdk"
~
groupadd es
useradd es -g es
chown -Rf es:es /usr/local/es/
vim elasticsearch.yml
在文件末尾加入
network.host: 0.0.0.0
discovery.seed_hosts: ["192.168.200.110"]
cluster.initial_master_nodes: ["192.168.200.110"]
vim /etc/security/limits.conf
最后一行加入
es soft nofile 65536
es hard nofile 65536
es soft nproc 4096
es hard nproc 4096
vim /etc/sysctl.conf
vm.max_map_count = 262144
执行sysctl -p
vim /etc/security/limits.d/20-nproc.conf
在最后一行加入
es soft nofile 65536
es hard nofile 65536
Su es
./elasticsearch -d 后台启动
curl 127.0.0.1:9200
{
"name" : "zk3",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "TCpNxLGeRY6-J4fRJTZ57w",
"version" : {
"number" : "7.4.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
"build_date" : "2019-10-28T20:40:44.881551Z",
"build_snapshot" : false,
"lucene_version" : "8.2.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
启动成功
远端访问
原文:https://www.cnblogs.com/zcv1/p/15035775.html