windows入门Elasticsearch(es)之2:可视化界面管理

这里我是随便在github上搜索的一个可视化的界面管理elasticsearch-head

https://github.com/mobz/elasticsearch-head

1:安装方法,首先去node官网下载一个安装包,已安装node的可以忽略第一步

https://nodejs.org/en/

安装完成之后,这里我的node版本是14.15

2:在你的项目目录进入命令行拉取代码

git clone git://github.com/mobz/elasticsearch-head.git

3:拉取完毕之后,进入文件目录

cd elasticsearch-head

4:安装当前项目需要的扩展 npm install

可能会有一些警告,可不管,只不过装phamtojs可能要耗时长一点,这个组件挺好用的,php实现网站截图(例如生成分享海报)什么都可以用这个组件,清晰度贼好

5:启动node npm run start

npm run start

就会出现http://localhost:9100

windows入门Elasticsearch(es)之2:可视化界面管理_第1张图片

浏览器访问127.0.0.1:9100就会出现如下界面

windows入门Elasticsearch(es)之2:可视化界面管理_第2张图片

6:出现如下了之后吧打开elasticsearch目录进入到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: /path/to/data
#
# Path to log files:
#日志存放目录
path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#锁定物理内存地址,防止elasticsearch内存被交换出去,也就是避免es使用swap交换分区
#bootstrap.memory_lock: true
#
# 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.
#当系统进行内存交换的时候,es的性能很差
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#设置ip绑定
network.host: 127.0.0.1
#
# 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", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# 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:
#集群中的N个节点启动后,才允许进行数据恢复处理
#gateway.recover_after_nodes: 3
#
# 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: "*"

7:修改好了之后,把之前启动关闭,再次elasticsearch回车重启

8:启动成功之后链接出现如下图

windows入门Elasticsearch(es)之2:可视化界面管理_第3张图片

你可能感兴趣的:(java,java,后端)