elasticsearch8安装部署
时间: 2023-11-24 14:51:22 浏览: 41
以下是elasticsearch8的安装部署步骤:
1. 下载elasticsearch8压缩包并解压缩
```shell
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.0-linux-x86_64.tar.gz
tar -zxvf elasticsearch-8.4.0-linux-x86_64.tar.gz
```
2. 进入elasticsearch目录并修改配置文件
```shell
cd elasticsearch-8.4.0/config
vi elasticsearch.yml
```
在elasticsearch.yml文件中修改以下配置:
```yaml
cluster.name: my-application # 集群名称
node.name: node-1 # 节点名称
path.data: /path/to/data # 数据存储路径
path.logs: /path/to/logs # 日志存储路径
network.host: 0.0.0.0 # 绑定IP地址
http.port: 9200 # HTTP端口
```
3. 启动elasticsearch
```shell
cd ..
bin/elasticsearch
```
4. 验证elasticsearch是否启动成功
```shell
curl http://localhost:9200/
```
如果返回以下信息,则表示elasticsearch已经成功启动:
```json
{
"name" : "node-1",
"cluster_name" : "my-application",
"cluster_uuid" : "xxxxxxxxxxxxxxxxxxxx",
"version" : {
"number" : "8.4.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "xxxxxxxxxxxxxxxxxxxx",
"build_date" : "2022-01-01T00:00:00.000000Z",
"build_snapshot" : false,
"lucene_version" : "x.x.x",
"minimum_wire_compatibility_version" : "x.x.x",
"minimum_index_compatibility_version" : "x.x.x"
},
"tagline" : "You Know, for Search"
}
```