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

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

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:启动成功之后链接出现如下图

 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值