windows es 安装

安装JDK环境

因为ElasticSearch是用Java语言编写的,所以必须安装JDK的环境,并且是JDK 1.8以上,具体操作步骤自行百度

Windows 安装

# 官网下载相应版本的es:
	https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-5-0

# 解压,运行即可
	可执行文件在bin路径下:elasticsearch.bat
        
# 测试安装完成
	 访问  http://127.0.0.1:9200/ 出现一下内容就完成
{
  "name" : "LAPTOP-RTJ1RGT4",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "z30C0eUwRKa5pQsSW0Yprg",
  "version" : {
    "number" : "7.5.0",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "e9ccaed468e2fac2275a3761849cbee64b39519f",
    "build_date" : "2019-11-26T01:06:52.518245Z",
    "build_snapshot" : false,
    "lucene_version" : "8.3.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

运行后访问localhost:9200失败

解决方案:修改elasticsearch.yml

xpack.security.enabled:false
xpack.security.enrollment.enabled:false
xpack.security.transport.ssl.enabled:false

mac上安装

# 官网下载相应版本
	https://www.elastic.co/cn/downloads/elasticsearch

# 下载其他版本
	https://www.elastic.co/cn/downloads/past-releases#elasticsearch

#  解压文件,切换到解压文件路径下,执行
	cd elasticsearch-<version> #切换到路径下
	./bin/elasticsearch  #启动es
	#如果你想把 Elasticsearch 作为一个守护进程在后台运行,那么可以在后面添加参数 -d 。

# 测试安装完成
	访问  http://127.0.0.1:9200/

# 关闭es
	#查看进程
		ps -ef | grep elastic
	#干掉进程
		kill -9 2382(进程号)

ElasticSearch-head 安装

Head插件介绍

elasticsearch-head是elasticsearch的一款可视化工具,依赖于node.js ,所以需要先安装node.js

安装Grunt

#Grunt是基于Node.js的项目构建工具。它可以自动运行你所设定的任务 
npm install grunt -g

下载Head

# 下载地址
	https://github.com/mobz/elasticsearch-head

# 解压后切换到目录下
	cd elasticsearch-head

# 通过npm安装依赖
	npm install

#启动
	npm run start

#在浏览器里打开
	http://127.0.0.1:9100/

配置跨域

# 修改 Elasticsearch 安装目录中config 文件夹下 elasticsearch.yml 文件,加入下面两行:
	http.cors.enabled: true
	http.cors.allow-origin: "*"

# 添加配置时,:后必须空格,不然启动闪退

Kibana 安装

Kibana介绍

Kibana 是一款开源的数据分析和可视化平台,它是 Elastic Stack 成员之一,设计用于和 Elasticsearch 协作。

可以使用 Kibana 对 Elasticsearch 索引中的数据进行搜索、查看、交互操作。

可以很方便的利用图表、表格及地图对数据进行多元化的分析和呈现

# 需要和es版本对应

下载Kibana

# 下载地址
	https://www.elastic.co/cn/downloads/past-releases
        
# 解压文件

# 修改配置文件
    # 更多配置信息,详见 https://www.elastic.co/guide/cn/kibana/current/settings.html
    server.port: 5601
    server.host: "127.0.0.1"
    server.name: lqz
    elasticsearch.hosts: ["http://localhost:9200/"]
        
# 启动
	./bin/kibana

# 浏览器访问
	http://127.0.0.1:5601/app/kibana

posted on 2022-09-05 10:27  书梦一生  阅读(1118)  评论(0编辑  收藏  举报

导航