ElasticSearch6.0.0安装

来源:互联网 发布:win10平板性能优化 编辑:程序博客网 时间:2024/06/03 21:03

1.安装jdk
2.wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.tar.gz
3.tar -zxvf elasticsearch-6.0.0.tar.gz
4.修改配置文件elasticsearch.yml
   cluster.name:   //集群名字,最好修改。否则后期上线后增加节点,可能会有相同网断的节点,相同集群名字的节点加入
   node.name:     //节点名字
   path.logs:          //日志文件的路径
   path.data:      //数据文件的路径
   network.host:        //对外暴露的ip
   http.port:              //对外暴露的端口
5.es 只能以非root用户启动,但是非 root用户需要有某些文件的读写权限
   chmod 777 config
   chmod 777 data
   chmod 777 logs  
6. /bin/elasticsearch 会报错
   [1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
   [2]: max number of threads [1024] for user [rd] is too low, increase to at least [4096]
   [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
   [4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
   第一个问题 修改文件句柄
       vim /etc/security/limits.conf 添加如下
       rd soft nofile 65536
       rd hard nofile 65536     //rd是用户
       这个变量修改后需要重新登陆,应该是系统bug
       查看句柄数量 ulimit -n
   第二个问题 修改用户进程数限制
        vim /etc/security/limits.d/90-nproc.conf
       修改 * soft nproc 1024,将1024改为4096
   第三个问题 修改进程映射中内存映射区域的最大数量
        vi /etc/sysctl.conf 添加
      vm.max_map_count=655360
      并执行 sysctl -p
  第四个问题
      这是在因为Centos6不支持SecComp,而ES默认bootstrap.system_call_filter为true进行检测,所以导致检
      测失败,失败后直接导致ES不能启动。
      修改elasticsearch.yml 文件
      在memory位置添加
         bootstrap.memory_lock: false
         bootstrap.system_call_filter: false

七、启动
./elasticsearch
阅读全文
0 0