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
相关推荐
失散131 天前
分布式专题——51 ES 深度分页问题及其解决方案详解
java·分布式·elasticsearch·架构
Elasticsearch1 天前
Observability:适用于 PHP 的 OpenTelemetry:EDOT PHP 加入 OpenTelemetry 项目
elasticsearch
Elasticsearch1 天前
如何在本地部署腾讯混元大模型并连接到 Elasticsearch 进行使用
elasticsearch
Elastic 中国社区官方博客1 天前
Elasticsearch:相关性在 AI 代理上下文工程中的影响
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
失散131 天前
分布式专题——49 SpringBoot整合ElasticSearch8.x实战
java·spring boot·分布式·elasticsearch·架构
失散131 天前
分布式专题——48 ElasticSearch聚合操作详解
分布式·elasticsearch
weisian1511 天前
Elasticsearch-3--什么是Lucene?
大数据·elasticsearch·lucene
LSL666_2 天前
1 elasticSearch 和 IK分词器的本地下载
大数据·elasticsearch·jenkins
lpfasd1232 天前
git-进阶技巧与最佳实践
大数据·git·elasticsearch
KANGBboy2 天前
ES 总结
hive·elasticsearch