美文网首页
1-1 ElasticSearch安装5.6.9

1-1 ElasticSearch安装5.6.9

作者: Finlay_Li | 来源:发表于2020-07-28 17:10 被阅读0次

ElasticSearch 安装

下载地址

ElasticSearch: https://mirrors.huaweicloud.com/elasticsearch/?C=N&O=D
logstash: https://mirrors.huaweicloud.com/logstash/?C=N&O=D
kibana: https://mirrors.huaweicloud.com/kibana/?C=N&O=D

解压后目录结构

image.png

调整配置文件

/data/elasticSearch/elasticsearch-5.6.9/config/elasticsearch.yml

# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
http.port: 9200

# 开启跨域访问支持,默认为false
http.cors.enabled: true
# 跨域访问允许的域名地址
http.cors.allow-origin: "*" 

/data/elasticSearch/elasticsearch-5.6.9/config/jvm.options

-Xms512m
-Xmx512m

启动

[docker@quanwugou-dev-001 bin]$ ./elasticsearch

报错

  1. max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

错误提示告诉我们,最大虚拟内存区域 vm.max_map_count [65530]太低,至少增加到[262144]。

su root
vi /etc/sysctl.conf
添加 vm.max_map_count = 262144
# 载入sysctl配置文件
sysctl -p
  1. max file descriptors [4096] for elasticsearch process is too 1ow, increase to at least [65536]
su root
vim /etc/security/limits.conf
最底下修改为:
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096
image.png

关闭窗口,重新登录检查配置是否生效


image.png
  1. max number 0f threads [3802] for user [ docker] is too low, increase to at least [4096]
su root
vim /etc/security/limits.d/20-nproc.conf
image.png

访问测试

image.png

elasticsearch-head安装

转载于:(https://www.cnblogs.com/sanduzxcvbnm/p/12014887.html)

下载该插件

地址:https://github.com/liufengji/es-head/blob/master/elasticsearch-head.crx
下载后的文件名是:elasticsearch-head.crx

安装

打开谷歌浏览器,找到扩展程序,然后打开开发者模式,拖拽上一步的插件进来进行安装。
若提示:程序包无效:“CRX_HEDER_INVALID”,则按下面的步骤进行操作

  1. 将文件elasticsearch-head.crx直接解压缩,得到一个elasticsearch-head文件夹,然后进入到该文件夹里,里面有个_metadata的文件夹,将这个文件夹重命名为metadata
    然后在谷歌浏览器插件界面,点击“加载已解压的压缩程序”,找到elasticsearch-head文件夹,点击打开即可进行安装。

  2. 或者从这个地址直接下载压缩包,解压后,点击“加载已解压的压缩程序”,找到elasticsearch-head文件夹,点击打开即可进行安装。
    地址:https://files.cnblogs.com/files/sanduzxcvbnm/elasticsearch-head.7z

  3. 安装结果


    image.png
  1. 解决数据浏览不显示问题
    原因是:406 [Not Acceptable] ,我们修改vendor.js 共有两处
    ①. 6886行 contentType: "application/x-www-form-urlencoded改为:
    contentType: "application/json;charset=UTF-8"
    ②. 7574行 var inspectData = s.contentType === "application/x-www-form-urlencoded" 改为:
    var inspectData = s.contentType === "application/json;charset=UTF-8"
image.png

kibana安装

改配置

/data/kibana/kibana-5.6.9-linux-x86_64/config/kibana.yml

server.port: 5601
server.host: "0.0.0.0"
elasticsearch.url: "http://ip:9200"
i18n.locale: "zh-CN"

启动

[docker@quanwugou-dev-001 bin]$ ./kibana

访问测试

老版本真丑.....


image.png

相关文章

网友评论

      本文标题:1-1 ElasticSearch安装5.6.9

      本文链接:https://www.haomeiwen.com/subject/gpufrktx.html