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/

相关推荐
Elastic 中国社区官方博客1 天前
Elasticsearch percolator 用于电商搜索治理:将模糊查询转换为可控的检索策略
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
逸Y 仙X1 天前
文章二十二:ElasticSearch EQL事件查询语言
java·大数据·elasticsearch·搜索引擎·全文检索
摇滚侠1 天前
ElasticSearch 在电商项目的作用 全文检索 自动补全 聚合查询 按距离排序
大数据·elasticsearch·全文检索
Cx330❀1 天前
深度解析:从原理到实战,一文吃透 Linux 信号机制(上)
大数据·linux·运维·服务器·人工智能·elasticsearch
xiangzhihong81 天前
Claude Code系列教程之Claude Code并行任务
大数据·elasticsearch·搜索引擎
Elasticsearch1 天前
Elasticsearch ES|QL 视图:一个查询统领十二个仪表板
elasticsearch
AC赳赳老秦2 天前
知识产权辅助:用 OpenClaw 批量生成专利交底书 / 软著申请材料,自动校验格式与内容合规性
java·人工智能·python·算法·elasticsearch·deepseek·openclaw
历程里程碑2 天前
4 Git远程协作:从零开始,玩转仓库关联与代码同步(带实操代码讲解)
大数据·c++·git·elasticsearch·搜索引擎·gitee·github
苍煜2 天前
MySQL分库分表和ES到底怎么选?
数据库·mysql·elasticsearch
摇滚侠2 天前
DSL 学习 ElasticSearch 主要就是学习 DSL 查询语言
学习·elasticsearch·jenkins