ElasticSearch(7.13.1) 安装与命令行启动

官方下载地址

可以直接下载最新版本, 也可以选择下载历史版本

 

 

 

如果网址打不开的话,推荐一个工具,猎豹加速器 可以通过注册这个工具,完成访问外网链接,每天签到后有一小时的免费外网时长,可以完成ES的下载。

 (声明:本人在用这个工具,但并不保证这个工具的安全性和可用性,仅做推荐,请各位朋友自行决定用或者不用,若用,还请各位自行确认安全性以及公司\学校\等是否允许使用此类工具,一切后果恕本人无法负责)

 

下载完成之后,找到一个路径解压,注意,路径中不要带汉字、空格等,否则会出现很多莫名其妙的问题。

 

在bin目录下,运行elasticsearch.bat,即可启动ES。

 

在浏览器中输入 localhost:9200,出现以下界面,说明安装启动成功

 

ES7.x开始,需要加入安全验证。

1、在【elasticsearch/config/elasticsearch.yml】中添加如下内容:

#On every node in your cluster, add the xpack.security.enabled setting and set the value to true:
xpack.security.enabled: true
#If your cluster has a single node, add the discovery.type setting and set the value to single-node. This setting ensures that your node does not inadvertently connect to other clusters that might be running on your network.
discovery.type: single-node

2、创建账号密码

1)启动ES服务

2)在bin目录下,执行以下命令

elasticsearch-setup-passwords.bat  interactive

此会连续输入多个密码

 

 重新访问localhost:9200

 

输入账号密码

账号:elastic

密码:上面命令行自定义的

 

登录成功

 

posted @ 2021-06-11 09:13  代码羡  阅读(943)  评论(0编辑  收藏  举报