一、准备好要安装的软件

[root@db1 soft]# ls
elasticsearch-6.6.0.rpm  jdk-8u181-linux-x64.rpm

二、安装软件

[root@db1 soft]# rpm -ivh jdk-8u181-linux-x64.rpm 
[root@db1 soft]# rpm -ivh elasticsearch-6.6.0.rpm

三、检查端口

[root@db1 soft]# netstat -lntup|grep 9200
tcp6       0      0 10.0.0.51:9200          :::*                    LISTEN      6826/java           
tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN      6826/java    
[root@db1 soft]# curl 127.0.0.1:9200
{
  "name" : "node-1",
  "cluster_name" : "elk",
  "cluster_uuid" : "QPV9eT4kQRiftvqDVXpzlQ",
  "version" : {
    "number" : "6.6.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "a9861f4",
    "build_date" : "2019-01-24T11:27:09.439740Z",
    "build_snapshot" : false,
    "lucene_version" : "7.6.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

四、启动

[root@db1 soft]# systemctl daemon-reload 
[root@db1 soft]# systemctl restart elasticsearch.service 
[root@db1 soft]# systemctl enable elasticsearch.service 

五、编写配置文件

[root@db1 soft]# cp /etc/elasticsearch/elasticsearch.yml /opt/
[root@db1 soft]# cat /etc/elasticsearch/elasticsearch.yml 
cluster.name: elk
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 10.0.0.51,127.0.0.1
http.port: 9200
discovery.zen.ping.unicast.hosts: ["10.0.0.51","10.0.0.52"]
discovery.zen.minimum_master_nodes: 1
[root@db1 soft]# systemctl edit elasticsearch
[Service]
LimitMEMLOCK=infinity
[root@db1 soft]# systemctl daemon-reload
[root@db1 soft]# systemctl restart elasticsearch.service

六、上传es-head谷歌浏览器插件查看10.0.0.51:9200,网页显示节点信息

七、上传软件

[root@db1 soft]# ls
elasticsearch-6.6.0.rpm  jdk-8u181-linux-x64.rpm  kibana-6.6.0-x86_64.rpm

八、安装

[root@db1 soft]# rpm -ivh kibana-6.6.0-x86_64.rpm

九、配置

[root@db1 soft]# grep -Ev "^$|#" /etc/kibana/kibana.yml 
server.port: 5601
server.host: "10.0.0.51"
elasticsearch.hosts: ["http://10.0.0.51:9200"]
kibana.index: ".kibana"

十、启动

[root@db1 soft]# systemctl restart kibana.service 
[root@db1 soft]# systemctl enable kibana.service 

十一、访问 http://10.0.0.51:5601,用kibana可以完成数据的插入及查询

Categories: 其他

0 Comments

发表评论

Avatar placeholder

邮箱地址不会被公开。 必填项已用*标注