es7版本安装问题解决

  1. 解决jdk问题。Es7版本要jdk的最低版本为11

   Es自带了jdk版本,配置使用自己的jdk

      修改vi elasticsearch-env 文件

     知道jdk文件位置

      JAVA_HOME="/usr/soft/elasticsearch/elasticsearch-7.10.0/jdk"

2、禁止root用户启动es

   添加用户组和用户

   [root@localhost bin]# groupadd esusers

[root@localhost bin]# useradd esuserxqn -g esusers

修改es权限

 chown -Rf esuserxqn:esusers ./elasticsearch-7.10.0

 

3、远程访问

修改config下的vi elasticsearch.yml

   network.host: 0.0.0.0

4、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

  修改配置文件:vi /etc/security/limits.conf

    

    esuserxqn  soft  nofile 65535

esuserxqn  hard nofile 65535

esuserxqn  soft  nproc 4096

esuserxqn  hard nproc 4096

5、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

  修改配置文件增加配置:vi /etc/sysctl.conf

    

vm.max_map_count = 262144

刷新:[root@localhost ~]# sysctl -p

 

6、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

修改配置vi elasticsearch.yml

增加

    discovery.seed_hosts: ["10.122.163.201"]

cluster.initial_master_nodes: ["10.122.163.201"]

7、启动

   [root@localhost ~]# curl http://localhost:9200

{

  "name" : "localhost.localdomain",

  "cluster_name" : "elasticsearch",

  "cluster_uuid" : "kffUvrcXSeyVSQW5PFGJaA",

  "version" : {

    "number" : "7.10.0",

    "build_flavor" : "default",

    "build_type" : "tar",

    "build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",

    "build_date" : "2020-11-09T21:30:33.964949Z",

    "build_snapshot" : false,

    "lucene_version" : "8.7.0",

    "minimum_wire_compatibility_version" : "6.8.0",

    "minimum_index_compatibility_version" : "6.0.0-beta1"

  },

  "tagline" : "You Know, for Search"

}

集群搭建

修改配置:

  cluster.name: escluster

  node.name: esnode01

  network.host: 0.0.0.0

 #allow cors

http.cors.enabled: true

http.cors.allow-origin: "*"

discovery.seed_hosts: ["10.122.163.201","10.122.163.202","10.122.163.203"]

cluster.initial_master_nodes: ["esnode01","esnode02","esnode03"]

discovery.zen.ping_timeout: 60s

  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值