ElasticSearch学习之路(一)环境搭建

1.在CentOs 7上安装 ElasticSearch方法

开始安装ES,先下载公钥:

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

添加源:

cd yum.repos.d/
vi elasticsearch.repo

编辑elasticsearch.repo:

[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

安装:

yum install elasticsearch

 

因为资源问题可能会失败,它会自动查找其他资源。耐心等待

安装完成后启动服务

执行命令:service elasticsearch start

启动ok后,用curl 命令测试一下  curl http://localhost:9200

猜你喜欢

转载自www.cnblogs.com/jasonboboblog/p/8909413.html
今日推荐