wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.1-x86_64.rpm
sudo rpm --install elasticsearch-7.9.1-x86_64.rpm
sudo chkconfig --add elasticsearch
sudo -i service elasticsearch start
sudo -i service elasticsearch stop
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl stop elasticsearch.service
打开9200 端口
测试下面地址:
curl -X GET "localhost:9200/?pretty"
输出结果
[root@ecs-e56a-0004 ~]# curl -X GET "localhost:9200/?pretty"
{
"name" : "ecs-e56a-0004",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "l3amy67MRQWLzsfRNLDVww",
"version" : {
"number" : "7.8.1",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89",
"build_date" : "2020-07-21T16:40:44.668009Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}