Windows下安装Elasticsearch

点击查看代码
# ======================== 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
cluster.name: my-application # 集群名称 各节点配置的要相同
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
node.name: node-1002
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
node.master: true # 是否允许为主节点
node.data: true # 是否存储数据
#
# ----------------------------------- 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:
#
#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: 192.168.0.1
network.host: localhost # 节点绑定的ip地址
#
# Set a custom port for HTTP:
#
#http.port: 9200
http.port: 1002 # 节点对外提供的http端口
transport.tcp.port: 9302 # 内部tcp端口
#
# 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"]
discovery.seed_hosts: ["localhost:9301","localhost:9302", localhost:9303] # 可以发现的其他节点主机
discovery.zen.fd.ping_timeout: 1m # 节点之间的超时时间
discovery.zen.fd.ping_retries: 5 # 节点之间尝试次数 #
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#cluster.initial_master_nodes: ["node-1001", "node-1002"] # 可以被选为主节点的节点列表
#
# 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: "*"

Linux下安装Elasticsearch

  • 单机安装
## 添加es单独的用户,es不允许使用root直接运行
useradd es
passwd es # 设置密码
userdel -r es # 该命令可用删除用户
chown -R es:es /opt/module/es # 将es的目录下的所有文件都修改为es用户和es用户组 ## 配置文件修改参考上述配置文件 ## 修改/es/security/limits.conf 每个进程可以打开的文件数限制 增加下面配置
es soft nofile 65536
es hard nofile 65536
* hard nproc 4096 # 操作系统级别对每个用户创建的进程的限制 *表示所有用户 ## 修改/etc/sysctl.conf 一个进程可用拥有的虚拟内存的大小,默认65536
vm.max_map_count=655360 ## 修改后重新加载配置
sysctl -p ## 启动es
bin/elasticsearch # 或者bin/elasticsearch -d后台启动,如果启动时显示文件与所属用户不匹配,需要再执行下chown -R es:es /opt/module/es
  • 集群下安装其他配置:

docker下安装Elasticsearch

下载镜像文件
docker pull elasticsearch:7.4.2 # 存储和检索数据
docker pull kibana:7.4.1 # 可视化检索数据 创建实例
mkdir -p /mydata/elasticsearch/config
mkdir -p /mydata/elasticsearch/data
echo "http.host:0.0.0.0">>/mydata/elasticsearch/config/elasticsearch.yml # 保证所有外部都可以访问 docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms128m -Xmx256m" \
-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins -d elasticsearch:7.6.2
# 访问端口和内部通信端口
# 单节点
# JVM的配置,不配置会尽可能的占用内存
# 将外部挂载文件和默认路径关联,保持同步 # 注意外部文件夹的权限
# 安装完成后可以访问9200端口 # 其他命令
docker ps
docker images
## 安装Kibana
docker run --name kibana -e ELASTICSEARCH_HOSTS=http://虚拟机地址:9200 -p5601:5601 -d kibana:7.4.1 ## 安装完成后可以在5601端口访问 ## 或者使用postman个ES发送请求

Kibana安装

需要修改配置:

server.port: 5601
server.host: "127.0.0.1"
# 配置es集群url
elasticsearch.hosts: ["http://127.0.0.1:9200/"]
kibana.index: ".kibana"

chrome ElasticSearch-head插件安装

在谷歌浏览器扩展程序添加解压后的插件即可

elasticsearch7.8.0,kibana7.8.0安装的更多相关文章

  1. elasticsearch7.5.0+kibana-7.5.0+cerebro-0.8.5集群生产环境安装配置及通过elasticsearch-migration工具做新老集群数据迁移

    一.服务器准备 目前有两台128G内存服务器,故准备每台启动两个es实例,再加一台虚机,共五个节点,保证down一台服务器两个节点数据不受影响. 二.系统初始化 参见我上一篇kafka系统初始化:ht ...

  2. centos7安装docker、docker-compose、es7.3.0、kibana7.3.0

    一.安装docker 1.更新yum包 sudo yum update 2.卸载旧版本(如果安装过旧版本的话) sudo yum remove docker docker-common docker- ...

  3. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...

  4. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...

  5. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part2:clusterware安装和升级

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part2:clusterware安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 3.安装Clus ...

  6. ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档

    ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档 2015-10-21 12:51 525人阅读 评论(0) 收藏 举报  分类: Oracle RA ...

  7. phpstorm10.0.3破解版安装教程及汉化方法

    phpstorm是一个轻量级且便捷的PHP IDE,其旨在提供用户效率,可深刻理解用户的编码,提供智能代码补全,快速导航以及即时错误检查.不但是php开发的利器,前端开发也是毫不逊色的.下面记录php ...

  8. 2.0 (1)安装MongoDB

    (官网:www.mongodb.com) ——————————(1)Mac安装MongoDB———————— 1)安装homebrew (官网地址,brew.sh) ruby -e "$(c ...

  9. Windows 8(虚拟机环境)安装.NET Framework3.5(includes .NET 2.0 and 3.0)

    按照这篇文章:http://blogs.technet.com/b/aviraj/archive/2012/08/04/windows-8-enable-net-framework-3-5-inclu ...

  10. 解决 DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe 在VS2015 Update3 安装失败的问题

    今天抽空升级VS2015 Update3. 在安装DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe 时报错了,看了错误日志 显示: 看到我标红的两个地方,那么 ...

随机推荐

  1. 针对vue中请求数据对象新添加的属性不能响应式的解决方法

    1.需要给对象添加属性时,不能采用传统的obj.属性=值,obj[属性]=值 来添加属性,在vue页面时需要这样使用 this.$set(obj,"propertyName",&q ...

  2. Docker 实操

    ---恢复内容开始--- 一.简介 Linux容器作为一类操作系统层面的虚拟化技术成果,旨在立足于单一Linux主机交付多套隔离性Linux环境.与虚拟机不同,容器系统并不需要运行特定的访客操作系统. ...

  3. Redis命令大全(超详细)

    一:序 其实本文的命令大家都可以去官网学习,但是我出这篇文章只是以更直观的方式来解读官网上的命令,让大家一眼可以看得懂,看的明白: 注意:我全文使用的Redis版本为 6.2.x 版本,低版本可能有些 ...

  4. host文件以及host的作用

    什么是HOST文件:Hosts是一个没有扩展名的系统文件,其基本作用就是将一些常用的网址域名与其对应的IP地址建立一个关联"数据库",当用户在浏览器中输入一个需要登录的网址时,系统 ...

  5. iBooker 财务提升星球 2020.2~3 热门讨论

    前两天分享了一下关于我们个人的现金流,今天就以公司的角度去分- 我们技术人,如何开源增加我们的收入? 首先,我们对收入进行下- 热门股要不要买? 参考标准: 1. 时机 2. 泡沫 时- #老实人报# ...

  6. Git使用教程(超全,看一篇就够了)

    目录 Git介绍 Git安装 Git使用 问题与解决 推荐学习网址 Git介绍 Git是什么? Git是目前世界上最先进的分布式版本控制系统. SVN与Git的最主要的区别? SVN是集中式版本控制系 ...

  7. 抓包神器 tcpdump 使用介绍 (转)

    tcpdump 命令使用简介 简单介绍 tcpdump 是一款强大的网络抓包工具,运行在 linux 平台上.熟悉 tcpdump 的使用能够帮助你分析.调试网络数据. 要想使用很好地掌握 tcpdu ...

  8. LeetCode随缘刷题之最短补全词

    package leetcode.day_12_10; import org.junit.Test; /** * 给你一个字符串 licensePlate 和一个字符串数组 words ,请你找出并返 ...

  9. 帆软报表(finereport)JS实现cpt中详细单元格刷新

    1.刷新固定单元格  setInterval(function(){ //获取第二行第 5 列 E2 单元格对象 var _changeCell = $("tr[tridx=1]" ...

  10. 根据经纬度坐标获得省市区县行政区划城市名称,自建数据库 java python php c# .net 均适用

    目录 步骤一.下载省市区边界数据 步骤二.解析CSV文件导入数据库 步骤三.在程序中根据坐标解析获得城市 在LBS应用中,根据坐标来解析获得对应是哪个城市是一个很常见的功能,比如App里面通过手机定位 ...