elasticsearch安装(centos7)

先给出网址

elasticsearch:Download Elasticsearch | Elastic

elasticKibana:Download Kibana Free | Get Started Now | Elastic

Logstash:Download Logstash Free | Get Started Now | Elastic

ik分词:Releases · infinilabs/analysis-ik (github.com)

elasticsearch-head:Tags · mobz/elasticsearch-head · GitHub

上一篇博客安装了windows版本的elasticsearch 这是一个链接,点击跳转

Centos7安装步骤

相比windows,linux需要注意的点就比较多了

首先,同样先下载安装包,选择linux版本的并解压。这里我只安装了elasticsearch和elasticKibana,其他的就用了之前在windows下安装的。

大致的步骤流程与windows一致,只是需要修改一些配置文件,所以这里就不赘述大体步骤了。先看elasticsearch,

elasticsearch

首先在elasticsearch下新建两个文件夹datalog

然后是conf 下的jvm.options文件

复制代码
-Xms512m
-Xmx512m

然后是conf 下的elasticsearch.yml

复制代码
http.cors.enabled: true 

http.cors.allow-origin: "*"

cluster.name: my-application

node.name: node-1

network.host: 0.0.0.0

http.port: 9200

discovery.seed_hosts: ["你的服务器ip"]

cluster.initial_master_nodes: ["node-1"]


path.data: 你的路径/data

path.logs: 你的路径/log

然后因为Centos不能使用root用户启动elasticsearch,所以需要创建一个新用户,并修改elasticsearch的所属用户。

复制代码
useradd ESUser

chown -R ESUser:ESUser 你的elasticsearch路径

然后是**/etc/security/limits.conf,**直接添加在最下面即可,要与你创建的用户一致

复制代码
ESUser soft nofile 65536  #打开文件描述符
ESUser hard nofile 65536
ESUser soft nproc 4096    #限制并发进程(或线程)
ESUser hard nproc 4096

然后是**/etc/sysctl.conf,直接添加**

复制代码
vm.max_map_count=655360

然后使用命令重启生效

复制代码
sysctl -p

别忘了ik分词,位置相同,不过不要把压缩包留在插件文件夹里面,里面只放解压缩好的文件就好

最后回到elasticsearch文件夹下,切换回ESUser用户,并启动

复制代码
su 你的用户名

./bin/elasticsearch

elasticKibana

进入**/config/kibana.yml**

复制代码
server.port: 5601

server.host: "0.0.0.0" 

elasticsearch.hosts: ["http://你的服务器ip:9200"]

然后同样他也不能使用root用户启动

复制代码
chown -R ESUser:ESUser 你的elastickibana路径

su 你的用户名

./bin/kibana
相关推荐
洛森唛3 小时前
Elasticsearch DSL 查询语法大全:从入门到精通
后端·elasticsearch
Elasticsearch2 天前
如何使用 Agent Builder 排查 Kubernetes Pod 重启和 OOMKilled 事件
elasticsearch
Elasticsearch3 天前
通用表达式语言 ( CEL ): CEL 输入如何改进 Elastic Agent 集成中的数据收集
elasticsearch
海兰5 天前
离线合同结构化提取与检索:LangExtract + 本地DeepSeek + Elasticsearch 9.x
大数据·elasticsearch·django
yumgpkpm5 天前
AI视频生成:Wan 2.2(阿里通义万相)在华为昇腾下的部署?
人工智能·hadoop·elasticsearch·zookeeper·flink·kafka·cloudera
Sheffield5 天前
如果把ZooKeeper按字面意思比作动物园管理员……
elasticsearch·zookeeper·kafka
嗝屁小孩纸5 天前
ES索引重建(零工具纯脚本执行)
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客5 天前
使用 Jina Embeddings v5 和 Elasticsearch 构建“与你的网站数据聊天”的 agent
大数据·人工智能·elasticsearch·搜索引擎·容器·全文检索·jina
Elastic 中国社区官方博客5 天前
Elastic 公共 roadmap 在此
大数据·elasticsearch·ai·云原生·serverless·全文检索·aws