linux系统安装elasticsearch教程_linux 安装es
在Linux系统上安装Elasticsearch可以通过以下步骤进行:
- 导入Elasticsearch公钥:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
- 添加Elasticsearch到APT仓库列表:
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
- 更新APT包索引:
sudo apt-get update
- 安装Elasticsearch:
sudo apt-get install elasticsearch
- 启动Elasticsearch服务:
sudo systemctl start elasticsearch.service
- 设置Elasticsearch开机自启:
sudo systemctl enable elasticsearch.service
- 验证Elasticsearch是否正在运行:
curl -X GET "localhost:9200/"
以上步骤将安装Elasticsearch并验证其是否正常运行。请确保你有适当的权限执行这些命令,并且你的Linux发行版本兼容Elasticsearch。
评论已关闭