Elasticsearch 5.4.3实战--环境搭建

1. 选择搭建的服务器信息

  $ uname -a

  Linux SA0124 2.6.32-642.11.1.el6.x86_64 #1 SMP Fri Nov 18 19:25:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

2. 从远程服务器上下载或者使用scp命令从本机上传到服务器

3. elasticsearch不能以root用户启动,所以创建新的用户组

  $ groupadd es

  $ useradd es -g es -p xxxxxx

  $ chown es:es /usr/local/elasticsearch-5.4.3.zip

  然后切换到es用户, 解压zip包

4. 修改配置,可以参考配置参考:http://www.cnblogs.com/jstarseven/p/6803054.html

5. 修改系统服务器的配置

  a:  
    $ vi /etc/security/limits.conf
    添加如下内容:
    *  soft nofile 65536
    * hard nofile 131072
    * soft nproc 2048
    * hard nproc 4096
 
  b:
    $ vi /etc/security/limits.d/90-nproc.conf
    找到如下内容:
    * soft nproc 1024
    #修改为
    * soft nproc 2048

6. 启动es

  $  ./bin/elasticsearch -d     #后台启动, 不加-d为前台启动

 

  

原文地址:https://www.cnblogs.com/cs99lzzs/p/7212077.html