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/

相关推荐
master3369 分钟前
git仓库通过脚本完成多个远程仓库同步
大数据·git·elasticsearch
金融支付架构实战指南1 小时前
ES电商检索方案设计案例
大数据·elasticsearch·搜索引擎
Java 码思客18 小时前
【ElasticSearch从入门到架构师】第9章:ES 读写底层流程深度拆解
大数据·elasticsearch·搜索引擎
daad77720 小时前
记录一个zmq客户端的性能调优
大数据·elasticsearch·搜索引擎
就改了1 天前
Windows Elasticsearch 完整上手教程
大数据·windows·elasticsearch
就改了1 天前
ElasticsearchRestTemplate使用方法详解!!!
java·elasticsearch·springboot
阿维的博客日记1 天前
Elasticsearch 部署手册
大数据·elasticsearch
沪漂阿龙1 天前
Vector Store:FAISS、Chroma、Milvus、Qdrant、ES 怎么选?
人工智能·elasticsearch·架构·milvus·faiss
醉颜凉2 天前
Elasticsearch性能优化:JVM GC调优全攻略,彻底解决集群卡顿、吞吐量下降问题
jvm·elasticsearch·性能优化
m0_719084112 天前
es我的笔记
大数据·笔记·elasticsearch