zoukankan      html  css  js  c++  java
  • es 服务器搭建

    安装jdk,原系统安装的openjava

    参考https://www.cnblogs.com/Dylansuns/p/6974272.html
    注意配置/etc/profile 时,要注意自己安装的是哪个文件夹

    下载es安装包

    https://www.elastic.co/cn/downloads/elasticsearch

    创建一个es用户组和用户

    groupadd es

    useradd esv-g es

    passwd es

    修改文件所有者

    chown -R es:es /usr/local/es

    修改执行权限

    chmod 770  /usr/local/es

    切换到es用户,es在root用户下不能启动

    su es

    安装到 /usr/local/es

    启动es 命令如:/usr/local/es/elasticsearch-6.2.2/bin/elasticsearch -d

    -d可以在后台运行,启动可能会稍慢,等一会就会正常启动

    查看运行进程
    ps -ef | grep elasticsearch

    关闭进程
    kill 3268

    配置参考

    cluster.name: es-cluster-5.3.1   配置集群名称 三台服务器保持一致

    node.name: node-1                 配置单一节点名称,每个节点唯一标识

    network.host: 0.0.0.0              设置绑定的ip地址

    http.port: 9200                      端口

    discovery.zen.ping.unicast.hosts: ["172.16.31.220", "172.16.31.221","172.16.31.224"]   集群节点ip或者主机

    discovery.zen.minimum_master_nodes: 3    设置这个参数来保证集群中的节点可以知道其它N个有master资格的节点。默认为1,对于大的集群来说,可以设置大一点的值(2-4)

    下面两行配置为haad插件配置,三台服务器一致。

    http.cors.enabled: true
    http.cors.allow-origin: "*"


    查看是否正常启动
    Run curl http://localhost:9200/ or Invoke-RestMethod http://localhost:9200 with PowerShell

    不能访问查看防火墙

    systemctl stop firewalld.service #停止firewall
    systemctl disable firewalld.service #禁止firewall开机启动
    firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
    关闭防火墙参考
    https://www.linuxidc.com/Linux/2015-05/117473.htm

    服务器多了最好进行名称配置

    查看服务器相关信息

    hostnamectl status

    修改服务器名称

     hostnamectl set-hostname es1

     hostnamectl set-hostname es2

    kibana安装到如下路径

    /usr/local/es/kibana-6.2.2-linux-x86_64/bin/kibana

    配置参考

    http://doc.okbase.net/jstarseven/archive/262258.html

     LogStash安装配置

    启动命令

    logstash -f iislog.conf

     

    我遇到的问题1
    max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
    原因:最大虚拟内存太小
    解决方案:切换到root用户下,修改配置文件sysctl.conf
    vi /etc/sysctl.conf
    添加下面配置:
    vm.max_map_count=655360
    并执行命令:
    sysctl -p
    然后重新启动elasticsearch,即可启动成功。

    问题2
    在linux系统:

    /etc/security/limits.conf
    编辑该文件,后面加上:

    xq soft nofile 65536
    xq hard nofile 65536

     x-pack 安装

    离线包安装命令bin/elasticsearch-plugin install file:///path/to/file/x-pack-6.2.1.zip

    修改elastic用户密码命令

    bin/x-pack/setup-passwords interactive

    其他问题参考
    http://doc.okbase.net/jstarseven/archive/262258.html
    http://www.chepoo.com/elasticsearch-installation-parameters-configuration-considerations.html

  • 相关阅读:
    vsftp配置文件
    oracle 7.4安装nvidia驱动
    python3.5-tensorflow-keras 安装
    linux 下u盘只读
    ubuntu1604-Python35-cuda9-cudnn7-gpu-dockerfile
    prometheus及gpu,k8s
    简单配置prometheus
    镜像源操作-ananconda-docker
    源码编译git-go
    ubuntu 微信安装-废弃
  • 原文地址:https://www.cnblogs.com/frankliu/p/8662459.html
Copyright © 2011-2022 走看看