elasticsearch 7安装

问题提前报

max virtual memory areas error

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

如果您的环境是Linux,注意要做以下操作,否则es可能会启动失败

1 用编辑工具打开文件/etc/sysctl.conf

2 在尾部添加一行配置vm.max_map_count = 262144,如果已存在就修改,数值不能低于262144

3 修改保存,然后执行命令sudo sysctl -p使其立即生效

heap size error

initial heap size [1073741824] not equal to maximum heap size [4294967296]; this can cause resize pauses and prevents mlockall from locking the entire heap

原因是 ES_JAVA_OPTS 设置错误,前后必须相同,如

-Xms3g -Xmx3g

手动安装es

下载

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.15-linux-x86_64.tar.gz

解压

shell 复制代码
tar -zxvf elasticsearch-7.17.15-linux-x86_64.tar.gz
mv elasticsearch-7.17.15 /usr/local/elasticsearch

添加用户

shell 复制代码
useradd es
passwd es
chown -R es:es /usr/local/elasticsearch

配置文件修改

vim elasticsearch.yml

yaml 复制代码
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: "[::1]"
cluster.initial_master_nodes: ["node-1"]

启动

/usr/local/elasticsearch/bin/elasticsearch -d

访问验证

http://127.0.0.1:9200/

相关推荐
易安杰3 小时前
ElasticSearch+Kibana通过Docker部署到Linux服务器中
linux·elasticsearch·搜索引擎·全文检索·中文分词
m0_748247553 小时前
重学SpringBoot3-整合 Elasticsearch 8.x (二)使用Repository
大数据·elasticsearch·jenkins
liupan68896 小时前
文档检索服务平台
elasticsearch·全文检索·开源软件
m0_748248656 小时前
SpringBoot整合easy-es
spring boot·后端·elasticsearch
m0_748256347 小时前
重学SpringBoot3-整合 Elasticsearch 8.x (一)客户端方式
大数据·elasticsearch·jenkins
risc12345619 小时前
【Elasticsearch】Search Templates(搜索模板)
elasticsearch
元气满满的热码式1 天前
logstash中的input插件(http插件,graphite插件)
网络·网络协议·http·elasticsearch·云原生
silianpan1 天前
文档检索服务平台
elasticsearch·搜索引擎·开源
(; ̄ェ ̄)。1 天前
在nodejs中使用ElasticSearch(二)核心概念,应用
大数据·elasticsearch·搜索引擎
boy快快长大1 天前
【Elasticsearch】同一台服务器部署集群
服务器·elasticsearch·jenkins