分享windows 10 下部署 elasticsearch 和 logstash (二)
接上一篇,es部署很简单,很快就弄好了。
但是还是有很多不玩美。
比如说:主机是本地的IP或机器名,端口是固定的9200. 而且是只有一个节点,我要在一台机器上部署多个节点呢。
经过一段时间的摸索,做起来也很简单,但过程切实很痛苦。
具体做法是:你想部署多少个节点,你就重复多少次上一步的做法。启动就可以啦。
但是仅仅这样,所有的配置都是默认的,看起来很不舒服,这时你就要更改一个配置文件:..\elasticsearch-7.2.0\config\elasticsearch.yml
1. 我部署了三个节点, 具体如下:
Node-1:
# ======================== 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: owen
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
node.master: true
node.data: true
#
# 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: E:/Services/ELK/data/node-1
#
# Path to log files:
#
#path.logs: E:/Services/ELK/logs/node-1
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#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.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9200
transport.tcp.port: 9300
#
# 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: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["127.0.0.1:9300"]
#
# 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: 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: "*"
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
Node-2:
# ======================== 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: owen
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-2
node.master: false
node.data: true
#
# 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: E:/Services/ELK/data/node-2
#
# Path to log files:
#
#path.logs: E:/Services/ELK/logs/node-2
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#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.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9201
#
# 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: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["127.0.0.1:9300"]
#
# 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: 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: "*"
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
Node-3:
# ======================== 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: owen
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-3
node.master: false
node.data: true
#
# 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: E:\Services\ELK\data\node-3
#
# Path to log files:
#
#path.logs: E:\Services\ELK\logs\node-3
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#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.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9202
#
# 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: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["127.0.0.1:9300"]
#
# 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: 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: "*"
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
具体代表什么意思请参考:
https://www.cnblogs.com/shaosks/p/7490751.html
分享windows 10 下部署 elasticsearch 和 logstash (二)的更多相关文章
- 分享windows 10 下部署 elasticsearch 和 logstash
最近和es杠上了.以前只听说过es一直没有机会体验一下. 最近有点时间,就着手体验一把.因为是第一次接触es,没有任何基础.入门的第一件是就是用 百度了, [不过建议改名为白度,基本上查不到想要的,一 ...
- windows 10 下部署WCF 一些细节
总体上在IIS中部署一个WCF服务和Win7没有什么区别 但是,如果你使用的是.NET 4.5开发的 WCF服务,而windows10 又安装了.net 4.7 那么你需要注意下面问题
- 使用PHPstudy在Windows服务器下部署PHP系统
PHP网站一般运行在Apache服务器上,IIS服务器上也可以运行,但是不推荐,windows服务器上没有集成Apache跟PHP的运行环境,但是借助第三方的软件就能很好的搞定,一般这样的软件有很多, ...
- 基于TDengine-ver-1.6.4.4在windows 10下cmake+msys2编译(windows cgo 使用)
目录 基于TDengine-ver-1.6.4.4在windows 10下cmake+msys2编译(windows cgo 使用) 背景 下载地址 仓库地址 安装部署 msys2 安装 配置环境变量 ...
- (搬运)使用PHPstudy在Windows服务器下部署PHP系统
原帖地址:http://www.php.cn/php-weizijiaocheng-406175.html 这篇文章主要介绍了关于使用PHPstudy在Windows服务器下部署PHP系统,有着一定的 ...
- 解决Windows 10下Wireshark运行问题
解决Windows 10下Wireshark运行问题在Windows 10下,安装Wireshark时候,提示WinPcap不被系统系统支持.这是由于最新版的WinPcap 4.1.3只支持到Wind ...
- 在Windows环境下部署Axis2/C服务
Apache Axis2/C是C语言实现的网络服务引擎,基于Axis2架构,支持SOAP1.1和SOAP1.2协议,并且支持RESTful风格的Web service. 下面是本人在Windows 7 ...
- Windows 10下Markdown不能显示预览
Windows 10下Markdown不能显示预览 结局办法 下载awesomium的SDK,安装后重启Markdown即可 实测最新版本的SDK不行,建议安装1.6.6 下载地址:http://ww ...
- 在windows 10下使用docker
准备工作 Windows 10下的Docker是依赖于Hyper-v的,首先我们需要启用它:控制面板 -> 程序 -> 启用或关闭Windows功能 -> 选中Hyper-V 安装D ...
随机推荐
- Web前端基础(6):CSS(三)
1. 定位 定位有三种:相对定位.绝对定位.固定定位 1.1 相对定位 现象和使用: 1.如果对当前元素仅仅设置了相对定位,那么与标准流的盒子什么区别. 2.设置相对定位之后,我们才可以使用四个方向的 ...
- Python笔记:设计模式之命令模式
命令模式,正如模式的名字一样,该模式中的不同操作都可以当做不同的命令来执行,可以使用队列来执行一系列的命令,也可以单独执行某个命令.该模式重点是将不同的操作封装为不同的命令对象,将操作的调用者与执行者 ...
- 使用android日志工具
Log的级别? 日志级别按照高低排序为:ERROR,WARN,INFO,DEBUG,VERBOSE, 日志输出: Log.e()输出ERROR级别的日志信息 Log.w()输出WARN,ERROR级别 ...
- 获取本设备IP地址
获取本设备(Android.PC)IP地址 public string GetLocalIP() { try { string HostName = Dns.GetHostName(); //得到主机 ...
- ABP进阶教程10 - PDF导出中文乱码
点这里进入ABP进阶教程目录 问题描述 功能按钮 - 导出PDF,中文信息导出为乱码. 解决方案 导出PDF是通过pdfmake.js实现的. 检查发现是pdfmake引用的vfs_fonts.js字 ...
- mmap - 内存映射文件 - 减少一次内核空间内数据向用户空间数据拷贝的操作
关于mmap 网上有很多有用的文章,我这里主要记录,日常使用到mmap时的理解: https://www.cnblogs.com/huxiao-tee/p/4660352.html 测试代码: htt ...
- PyCharm颜色设置
选择主题和背景图片 选择字体.修改字体大小 新建颜色主题 修改背景颜色 修改注释颜色 File --> Setting (Ctrl + Shift + S) 1.选择不同的主题.选择背景图片 A ...
- C++中的传值与传址
在指针的传递中,也涉及到传值与传址的问题.下面通过一个函数进行说明. 代码如下: bool openBinary(uchar* buffer) { ; buffer = (uchar*)malloc( ...
- str基本语法
基本数据类型(int,bool,str)1.基本数据数据类型: int 整数 str 字符串. 一般不存放大量的数据 bool 布尔值. 用来判断. True, False list 列表.用来存放大 ...
- unique_ptr的实现原理
在C++11中有两个智能指针类型来管理动态对象,share_ptr允许多个指针指向同一个对象,unique_ptr则“独占”所指对象. 我们知道指针或引用在离开作用域时是不会进行析构的,但是类在离开作 ...