5

windows安装Elasticsearch

 3 years ago
source link: https://blog.yangyk.com/2020/12/18/elasticsearch/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
  • ElasticSearch 5.x 往后依赖于JDK 1.8以上版本,所以安装前请确认自己的java环境,请安装jdk1.8及以上版本
  • 下载下来ES以后解压以后,主要文件夹为bin,config,log,jdk,plugins
    • config 配置目录
    • logs 日志目录
    • plugins 插件目录
    • data 数据存储目录(ES启动后会自动创建)
  • 运行bin/elasticsearch.bat 来启动, es1.png
  • 启动成功的标志 es2.png
  • 访问http://localhost:9200
    es3.png

    四丶安装ElasticSearch-head插件

    es4.png

    五丶ElasticSearch安装为Windows服务

  • 在ES/bin目录下找到elasticsearch-service.bat,运行elasticsearch-service.bat install

    六丶集群安装

  • 安装前一定要先删除已启动的ES/data目录,如果不删除会导致节点信息不匹配,无法形成集群.
  • 将elasticsearch-7.9.3复制一份并更改config文件夹下elasticsearch.yml节点名称,一个为node1,一个为node2,并且端口不可冲突,具体配置如下 es5.pnges6.png
  • 将两个项目依次启动,打开刚才安装的ElasticSearch-head插件即可显示启动的服务 es7.png



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK