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/

相关推荐
IDIOT___IDIOT2 分钟前
关于 git 进行版本管理的时候 gitignore 写入忽略规则而不生效的问题
大数据·git·elasticsearch
不想看见4043 分钟前
Git 误删急救手册
大数据·git·elasticsearch
2401_8916558137 分钟前
Git误操作急救手册大纲
大数据·elasticsearch·搜索引擎
贺小涛2 小时前
Git代码提交规范和踩坑排水明沟
大数据·git·elasticsearch
逸Y 仙X3 小时前
文章十一:ElasticSearch Dynamic Template详解
java·大数据·数据库·elasticsearch·搜索引擎·全文检索
m0_5281744521 小时前
Git误操作急救手册大纲
大数据·elasticsearch·搜索引擎
m0_528174451 天前
Git对象存储原理(blob/tree/commit) 引用日志(reflog)
大数据·git·elasticsearch·全文检索
bearpping1 天前
Java进阶(ElasticSearch的安装与使用)
java·elasticsearch·jenkins
Elasticsearch1 天前
快速 vs. 准确:衡量量化向量搜索的召回率
elasticsearch
柯儿的天空1 天前
【OpenClaw 全面解析:从零到精通】第 004 篇:OpenClaw 在 Linux/Ubuntu 上的安装与部署实战
linux·人工智能·ubuntu·elasticsearch·知识图谱