Ubuntu 23.04 安装es
Ubuntu 23.04 安装 Elasticsearch 的步骤如下:
- 更新包索引:
sudo apt update
- 导入Elasticsearch公钥:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
- 添加Elasticsearch APT源:
echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
- 再次更新包索引:
sudo apt update
- 安装Elasticsearch:
sudo apt install elasticsearch
- 启动Elasticsearch服务并设置开机自启:
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch
- 验证安装成功:
curl -X GET "localhost:9200/"
以上步骤会安装Elasticsearch 8.x 版本。如果需要安装其他版本,请修改APT源中的版本号。
评论已关闭