elasticsearch如何安装
时间: 2023-05-29 18:02:59 浏览: 68
以下是安装 Elasticsearch 的步骤:
1. 下载 Elasticsearch
在 Elasticsearch 的官网上下载适合自己操作系统的 Elasticsearch 版本,下载地址为:https://www.elastic.co/downloads/elasticsearch。
2. 解压缩 Elasticsearch
将下载好的 Elasticsearch 压缩包解压到一个目录下,例如 /opt/elasticsearch。
3. 启动 Elasticsearch
在终端输入以下命令启动 Elasticsearch:
```
cd /opt/elasticsearch/bin
./elasticsearch
```
4. 检查 Elasticsearch 是否启动成功
在浏览器中输入 http://localhost:9200/,如果返回以下信息,则说明 Elasticsearch 已经成功启动:
```
{
"name" : "node-1",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "TmzYw1T8RnWjWiPvOeI-lA",
"version" : {
"number" : "6.8.6",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "3d9f765",
"build_date" : "2019-12-13T17:11:52.013738Z",
"build_snapshot" : false,
"lucene_version" : "7.7.2",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
```
以上就是 Elasticsearch 的安装步骤。