Elasticsearch主机为172.20.100.122
1、设置yum源
vim /etc/zypp/repos.d/elasticsearch.repo
[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
2、安装elasticsearch
安装elasticsearch之前需要安装OpenJDK ,自行去官网下载,这里不再赘述
yum install elasticsearch -y
3、配置elasticsearch
vim /etc/elasticsearch/elasticsearch.yml
network.host: 0.0.0.0
http.port: 9200
cluster.initial_master_nodes: [“node-1”]
discovery.seed_hosts: [“192.168.3.29”]
4、启动elasticsearch
systemctl start elasticsearch
systemctl enable elasticsearch
5、检查
在web界面输入http://172.20.100.122:9200
{
“name” : “node-1”,
“cluster_name” : “elasticsearch”,
“cluster_uuid” : “Adgpf1lsQbq6wIvZSA00dg”,
“version” : {
“number” : “7.3.0”,
“build_flavor” : “default”,
“build_type” : “rpm”,
“build_hash” : “de777fa”,
“build_date” : “2019-07-24T18:30:11.767338Z”,
“build_snapshot” : false,
“lucene_version” : “8.1.0”,
“minimum_wire_compatibility_version” : “6.8.0”,
“minimum_index_compatibility_version” : “6.0.0-beta1”
},
“tagline” : “You Know, for Search”
}
或者http://172.20.100.122:9200/_cat
=.=
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/tasks
/_cat/indices
/_cat/indices/{index}
/_cat/segments
/_cat/segments/{index}
/_cat/count
/_cat/count/{index}
/_cat/recovery
/_cat/recovery/{index}
/_cat/health
/_cat/pending_tasks
/_cat/aliases
/_cat/aliases/{alias}
/_cat/thread_pool
/_cat/thread_pool/{thread_pools}
/_cat/plugins
/_cat/fielddata
/_cat/fielddata/{fields}
/_cat/nodeattrs
/_cat/repositories
/_cat/snapshots/{repository}
/_cat/templates