zoukankan      html  css  js  c++  java
  • centos7安装es6.4.0

    一、首先进入到opt文件夹
    cd opt
    二、然后下载es安装包
    wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.0.tar.gz
    三、解压es安装包
    tar -zxvf elasticsearch-6.4.0.tar.gz
    四、编辑es配置文件
    vim config/elasticsearch.yml
    配置文件修改
    network.host: 0.0.0.0 http.port: 9200 http.cors.enabled: true http.cors.allow-origin: "*"
    五、如果运行报错
    max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

    max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    使用root用户编辑
    vim /etc/security/limits.conf
    新增
    * soft nofile 65536
    * hard nofile 65536
    vim /etc/sysctl.conf
    新增
    vm.max_map_count=655360
    然后重新加载系统参数
    sysctl -p
    六、es不能使用root用户启动
    groupadd elsearch
    useradd elsearch -g elsearch -p elasticsearch-6.4.0
    chown -R elsearch:elsearch elasticsearch-6.4.0
    七、启动
    切换为elsearch用户
    su elsearch
    正常启动
    ./elasticsearch
    后台启动
    ./elasticsearch -d
    八、
    最后还有一个小问题,如果你在服务器上安装Elasticsearch,而你想在本地机器上进行开发,这时候,你很可能需要在关闭终端的时候,让Elasticsearch继续保持运行。最简单的方法就是使用nohup。先按Ctrl + C,停止当前运行的Elasticsearch,改用下面的命令运行Elasticsearch

    nohup./bin/elasticsearch&

    这样,你就可以放心地关闭服务器终端,而不用担心Elasticsearch也跟着关闭了。

    查找杀死进程:ps aux|grep elasticsearch #显示所有关于es包含其他使用者的进程 kill -9 进程号

    -------------------------------------------

    学而不思则罔,思而不学则殆

    你好,我是【咬轮猫】

    -------------------------------------------

  • 相关阅读:
    Swap Nodes in Pairs
    Remove Nth Node From End of List
    Rotate list
    历届试题_DNA比对
    斐波那契字符串_KMP
    字符串的模式匹配
    理解图像Garbor和HOG特征的提取方法及实例应用
    人眼定位和基于人眼的人脸姿态矫正_转载
    借助百度云API进行人脸识别
    { "result": null, "log_id": 304592860300941982, "error_msg": "image check fail", "cached": 0, "error_code": 222203, "timestamp": 1556030094 }
  • 原文地址:https://www.cnblogs.com/Hero-/p/9855158.html
Copyright © 2011-2022 走看看