#下载
https://www.elastic.co/cn/downloads/past-releases#elasticsearch
[root@hadoop000 ~]# tar -zxvf elasticsearch-6.3.0.tar.gz -C ~/app/
[root@hadoop000 config]# pwd
/root/app/elasticsearch-6.3.0/config
[root@hadoop000 config]# vim elasticsearch.yml
[root@hadoop000 app]# mkdir elk
[root@hadoop000 app]# useradd elk
useradd: user 'elk' already exists
[root@hadoop000 app]# chown -R elk:elk elk
[root@hadoop000 app]# chown -R elk:elk elasticsearch-6.3.0/
[root@hadoop000 app]# pwd
/root/app
[root@hadoop000 bin]# ./elasticsearch
[root@hadoop000 ~]# curl -XPUT 'http://localhost:9200/imooc_es'
[root@hadoop000 ~]# curl -XGET 'http://localhost:9200/_search'
[root@hadoop000 ~]# curl -XPOST 'http://hadoop000:9200/imooc_es/student/1' -H 'Content-Type: application/json' -d '{
> "name":"imooc",
> "age":5,
> "interests":["Spark","Hadoop"]
> }'
{"_index":"imooc_es","_type":"student","_id":"1","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":0,"_primary_term":1}[root@hadoop000 ~]# curl -XGET 'http://hadoop000:9200/_search?pretty'
{
"took" : 15,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [
{
"_index" : "imooc_es",
"_type" : "student",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"name" : "imooc",
"age" : 5,
"interests" : [
"Spark",
"Hadoop"
]
}
}
]
}
}
You have mail in /var/spool/mail/root
[root@hadoop000 config]# pwd
/root/app/kibana-6.3.0-linux-x86_64/config
#启动
[root@hadoop000 kibana-6.3.0-linux-x86_64]# bin/kibana
http://0.0.0.0:5601