elasticsearch 安装
ES下载
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.0.tar.gz.sha512
shasum -a 512 -c elasticsearch-6.3.0.tar.gz.sha512
tar -xzf elasticsearch-6.3.0.tar.gz
cd elasticsearch-6.3.0/
tips:只有通过这样处理,才能看到bin文件夹!!!
运行
./bin/elasticsearch
查看结果
curl http://localhost:9200/
{
"name" : "MJ-FUhy",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "NrkyTGA6SRWtaJ-8_FPWtQ",
"version" : {
"number" : "6.3.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "424e937",
"build_date" : "2018-06-11T23:38:03.357887Z",
"build_snapshot" : false,
"lucene_version" : "7.3.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
后台运行 Elasticsearch
./bin/elasticsearch -d -p pid
日志信息可以在 $ES_HOME/logs/ 目录中查看。
若想关闭Elasticsearch,只要将 pid 文件中记录的进程ID 干掉就行,
kill `cat pid`
这个是目录结构!