ubuntu22.4搭建单节点es8.1

下载对应的包

elasticsearch-8.1.1-linux-x86_64.tar.gz

创建es租户

groupadd elasticsearc

useradd elasticsearch -g elasticsearch -p elasticsearch

chmod u+w /etc/sudoers

chmod -R elasticsearch:elasticsearch elasticsearch

修改配置文件

复制代码
vim /etc/sysctl.conf
vm.max_map_count = 262144
sysctl -p

vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096

修改环境参数

vim elasticsearch/config/elasticsearch.yml

复制代码
xpack.security.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
path.data: /usr/local/elasticsearch/data
path.logs: /usr/local/elasticsearch/logs

cluster.name: shds
node.name: es2.conf
http.port: 19200
#transport.tcp.port: 19300

#include.type.name: false
network.host: 0.0.0.0
#discovery.seed_providers: file
discovery.seed_hosts: ["10.15.250.240"]
network.publish_host: 10.15.250.240
cluster.initial_master_nodes: ["10.15.250.240"]
node.roles: [data,master,ingest]

启动

复制代码
su Elasticsearch
./bin/elasticsearch -d
相关推荐
HalvmånEver1 小时前
Linux:进程的切换与调度(进程四)
linux·运维·服务器
运维有小邓@1 小时前
实时日志关联分析工具:智能检测潜在安全威胁
运维·网络·安全
谷隐凡二2 小时前
Docker 的核心理念及技术的简单说明
运维·docker·容器
L***B5682 小时前
如何安装linux版本的node.js
linux·运维·node.js
Elasticsearch2 小时前
混合搜索无需头疼:使用 retrievers 简化混合搜索
elasticsearch
Elastic 中国社区官方博客3 小时前
使用 A2A 协议和 MCP 在 Elasticsearch 中创建一个 LLM agent 新闻室:第二部分
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
脏脏a3 小时前
【Linux】Linux进程状态深度解析
linux·运维·服务器
凉晓风3 小时前
Linux中常见几种自启动方式的区别
linux·运维·服务器
小熊officer3 小时前
Nginx学习
运维·学习·nginx
ManThink Technology3 小时前
LoRaWAN网关:连接私有服务器是“可行”还是“明智”?
运维·服务器