centos yum安装elasticsearch
在CentOS系统上使用yum安装Elasticsearch的步骤如下:
- 首先,你需要添加Elasticsearch的官方yum仓库。创建一个新的yum仓库文件:
sudo tee /etc/yum.repos.d/elasticsearch.repo <<EOF
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
- 导入Elasticsearch的公钥:
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
- 通过yum安装Elasticsearch:
sudo yum install elasticsearch
- 启动并设置Elasticsearch开机自启:
sudo systemctl start elasticsearch.service
sudo systemctl enable elasticsearch.service
- 验证Elasticsearch是否正在运行:
curl -X GET "localhost:9200/"
以上步骤会在你的CentOS系统上安装Elasticsearch并启动它。确保你的系统满足Elasticsearch的最小要求,包括足够的内存和CPU资源。
评论已关闭