CentOS7 的ES安装
一、ES安装 下载地址 https://www.elastic.co/cn/downloads/elasticsearch
2、解压压缩包elasticsearch-7.8.1.tar.gz
3、不能以root方式启动es
useradd esuser
passwd es
su esuser
chown -R esuser:esuser /usr/local/elasticsearch-7.8.1/(当前es的安装目录)
4、配置该用户打开的最大文件数,最大线程数,最大虚拟内存 es需要65536
vim /etc/security/limits.conf
esuser soft nofile 65536
esuser hard nofile 131072
esuser soft nproc 4096
esuser hard nproc 4096
5、修改sysctl.conf配置文件
vim /etc/sysctl.conf
vm.max_map_count=655360
sysctl -p
6、es配置文件配置
vi elasticsearch.yml
修改数据和日志目录:
path.data: /home/yinlian/elasticsearch/data
path.logs: /home/yinlian/elasticsearch/logs
network.host: 0.0.0.0
问)
http.port: 9201
node.name: node-01
cluster.initial_master_nodes: ["node-01"]
6、关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
7、启动es
su esuser
/usr/local/elasticsearch-7.4.2/bin/elasticsearch
启动成功之后服务器截图: 本机curl一下进行验证
curl 192.168.50.137:9201
{
"name" : "node-01",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "nAoqn3OTTimi_2upKqNddQ",
"version" : {
"number" : "7.8.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89",
"build_date" : "2020-07-21T16:40:44.668009Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
启动成功
|