ElasticSearch

109 阅读1分钟

ElasticSearch单机版安装(Centos 7.4 )

  1. 首先创建一个用户专门针对elasticsearch

       useradd es
       paasswd xxx
    
  2. 从下载链接下载需要的版本

    www.elastic.co/cn/download…

  3. 上传到服务器

  4. 创建elastic目录并把目录的权限赋给es

  5. 解压tar包:

     tar -xvf elasticsear.6.4.3.tar.gz -C es
    
  6. 修改elasticsearch.yml的配置文件

     network.host: 0.0.0.0
    
  7. 修改JVM启动参数 jvm.options

         -Xms128m
         -Xmx128m
    
  8. 系统级一个虚拟机创建内存映射最大数量

     编辑 /etc/sysctl.conf
     vm.max_map_count = 655360
     sysctl -p
    
  9. 错误: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536] 解决方式:

     编辑 /etc/security/limits.conf
     * soft nofile 65536
     * hard nofile 65536
      此文件修改后需要重新登录用户,才会生效
    
  10. 启动 bin/elasticsearch & 11 .查看 ps aux|grep elasticsearch

12 . 访问9200端口验证正确性

elasticsearch-head安装

见链接: github.com/mobz/elasti…

成功状态: