elasticsearch-7.4.2安装

下载

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-linux-x86_64.tar.gz

用户

useradd es
chown -R es:es elasticsearch-7.4.2

修改配置文件

/data/elasticsearch-7.4.2/config/elasticsearch.yml

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# Add custom attributes to the node:
#
node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /data/es
#
# Path to log files:
#
path.logs: /data/logs/es
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
bootstrap.memory_lock: false
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 172.17.0.3
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.seed_hosts: ["host1"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
gateway.recover_after_nodes: 1
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
action.destructive_requires_name: true
#
http.cors.enabled: true
http.cors.allow-origin: "*"

/data/elasticsearch-7.4.2/config/jvm.options

-Xms512m
-Xmx512m

创建路径

/data/es
/data/logs/es

启动(es用户)

bin/elasticsearch
bin/elasticsearch -d

报错

ERROR: [2] bootstrap checks failed
[1]: memory locking requested for elasticsearch process but memory is not locked
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决方案:

sysctl -w vm.max_map_count=262144
/etc/sysctl.conf 中设置 vm.max_map_count=262144

验证

访问:http://111.229.143.44:9200/

{
  "name" : "node-1",
  "cluster_name" : "my-application",
  "cluster_uuid" : "c2ZcvDhTQJOxgr43QC5O_A",
  "version" : {
    "number" : "7.4.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "2f90bbf7b93631e52bafb59b3b049cb44ec25e96",
    "build_date" : "2019-10-28T20:40:44.881551Z",
    "build_snapshot" : false,
    "lucene_version" : "8.2.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

加密

配置文件追加后重启

xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true

执行命令

bin/elasticsearch-setup-passwords interactive

future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/java/jre] does not meet this requirement
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:
passwords must be at least [6] characters long
Try again.
Enter password for [elastic]:
passwords must be at least [6] characters long
Try again.
Enter password for [elastic]:
passwords must be at least [6] characters long
Try again.
Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana]:
Reenter password for [kibana]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]
Kibana是一个开源的数据分析和可视化工具,用于与Elasticsearch进行集成并实现数据的展示和分析。kibana-7.4.2-windows-x86_64是特定的Kibana版本,适用于Windows 64位操作系统。 Kibana-7.4.2是在Elastic Stack的新版本中发布的,其主要目标是提供更好的用户体验和功能增强。在Windows 64位操作系统上使用Kibana-7.4.2可以帮助用户更轻松地搭建和管理数据可视化的工作环境。 Kibana-7.4.2可以通过官方网站或GitHub等渠道进行下载和安装。一旦安装完成,用户可以通过浏览器访问Kibana的Web界面。Kibana提供了一个直观的用户界面,让用户可以通过简单的操作来创建、保存和分享数据可视化的仪表盘。 使用Kibana-7.4.2,用户可以实现以下功能: 1. 数据查询和搜索:Kibana允许用户在Elasticsearch中进行高级的查询和搜索操作,以便从大量数据中快速找到所需的结果。 2. 数据可视化:Kibana提供了多种图表和可视化工具,用户可以根据需要创建各种动态和交互式的图表和仪表盘,直观地呈现数据。 3. 数据分析:Kibana支持用户对数据进行深入的分析,包括聚合、过滤、排序和分析各种统计指标等功能。 4. 数据分享和协作:用户可以通过Kibana将创建的仪表盘和图表分享给其他人,实现数据的协作和共享。 总之,Kibana-7.4.2是一个功能强大且易于使用的数据分析和可视化工具,适用于Windows 64位操作系统,可以帮助用户轻松地进行数据的查询、可视化和分析,以实现更好的数据洞察力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值