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
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值