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
相关推荐
AI逐月6 小时前
Git 彻底清除历史记录
大数据·git·elasticsearch
管理大亨10 小时前
ELK + Redis Docker 企业级部署落地方案
大数据·运维·elk·elasticsearch·docker·jenkins
悟空码字12 小时前
SpringBoot 整合 ElasticSearch,给搜索插上“光速翅膀”
java·后端·elasticsearch
Elasticsearch12 小时前
开始使用 Elastic Agent Builder 和 Strands Agents SDK
elasticsearch
AI逐月13 小时前
Git 停止追踪已提交文件问题
大数据·git·elasticsearch
_默_14 小时前
前端常用依赖归纳【vueuse\lodash-es\dayjs\bignumber】
大数据·前端·elasticsearch
raoxiaoya14 小时前
golang调用 elasticsearch 8,向量检索
开发语言·elasticsearch·golang
Elasticsearch14 小时前
亲爱的圣诞老人,这里有一点小小的帮助,献给圣诞节
elasticsearch
Haooog15 小时前
Elasticsearch (ES) 面试题清单(不定时更新)
大数据·elasticsearch·搜索引擎·面试
武子康1 天前
大数据-184 Elasticsearch Doc Values 机制详解:列式存储如何支撑排序/聚合/脚本
大数据·后端·elasticsearch