Centos7安装Elasticsearch7.1.0

目录

一:下载Linux版本的Elasticsearch

 二:上传服务器,并解压

三:创建ES用户,并赋予权限

四:启动 Elasticsearch

五:常见错误以及解决方式


一:下载Linux版本的Elasticsearch

1:最新版的下载地址:Download Elasticsearch | Elasticicon-default.png?t=M1L8https://www.elastic.co/cn/downloads/elasticsearch

2:Elasticsearch7.1.0版的下载地址:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.0-linux-x86_64.tar.gzicon-default.png?t=M1L8https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.0-linux-x86_64.tar.gz

 3:Elasticsearch 历史版本下载地址:Past Releases of Elastic Stack Software | Elasticicon-default.png?t=M1L8https://www.elastic.co/cn/downloads/past-releases#elasticsearch

 二:上传服务器,并解压

 tar -zxvf elasticsearch-7.1.0-linux-x86_64.tar.gz

三:创建ES用户,并赋予权限

        1.创建一个esroot用户并设置初始密码

useradd -c 'ES user' -d /home/esroot esroot

passwd esroot

        2.将elasticsearch安装目录属主权限改为 esroot 用户

chown -R esroot:esroot /opt/elasticsearch-7.1.0/

groupadd elasticsearch

        3.切换用户到 esroot 

su esroot

 

四:启动 Elasticsearch

        进入Elasticsearch 的bin 目录

cd /opt/elasticsearch-7.1.0/bin/

         启动

#当前进程启动

./elasticsearch

#后台进程启动

./elasticsearch -d

五:常见错误以及解决方式

1:elasticsearch 已经正常启动了,浏览器访问localhost:9200,无法出现版本信息?

1:首先查看一下服务器对应的端口9200 9300 是否被防火墙拦截了

2:如果是阿里云的服务器,安全组是否设置了允许9200,9300端口的请求

3:在elasticsearchconfig目录下,修改elasticsearch.yml配置文件

node.name: node-1

network.host: 0.0.0.0

cluster.initial_master_nodes: ["node-1"]

2:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]?(注意:切换到root用户,否则提示没有权限

 1:打开 /etc/sysctl.conf 文件最后添加一行 vm.max_map_count=262144

 2:执行 /sbin/sysctl -p 立即生效

 3:重启启动 elasticsearch

3:the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

1:在elasticsearchconfig目录下,修改elasticsearch.yml配置文件

2:cluster.initial_master_nodes: ["node-1"] #这里的node-1为node-name配置的值 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

java小小星星

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值