ELK7.3.1 单台部署elasticsearch和kibana

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ELK7.3.1 单台部署elasticsearch和kibana相关的知识,希望对你有一定的参考价值。

环境初始化
sysctl -w vm.max_map_count=262144
root@jindi-ES:/data/elasticsearch/logs# cat /etc/security/limits.conf
* soft nproc 1000000
* hard nproc 1000000
* soft nofile 1000000
* hard nofile 1000000

获取elasticsearch和kibana

root@fangxin-test:~# wget  https://artifacts.elastic.co/downloads/kibana/kibana-7.3.1-amd64.deb
root@fangxin-test:~# wget  https://artifacts.elastic.co/downloads/kibana/kibana-7.3.1-linux-x86_64.tar.gz
root@fangxin-test:~#  wget  https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.1.tar.gz      

root@fangxin-test:~# wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.3.1-amd64.deb

使用dpkg安装

root@fangxin-test:~# dpkg -i elasticsearch-7.3.1-amd64.deb 
root@fangxin-test:~# dpkg -i kibana-7.3.1-amd64.deb 

配置文件

elasticsearch
root@fangxin-test:~# cat /etc/elasticsearch/elasticsearch.yml |grep -vE "^#|^$"
node.name: es-1
path.data: /data/elasticsearch/data 
path.logs: /data/elasticsearch/logs
network.host: 10.0.109.17 
http.port: 9200
cluster.initial_master_nodes: ["es-1"]
kibana
root@fangxin-test:~# cat /etc/kibana/kibana.yml |grep -vE "^#|^$"
server.host: 10.0.109.17
elasticsearch.hosts: ["http://10.0.109.17:9200"]

启动

root@fangxin-test:~#/etc/init.d/elasticsearch start
root@fangxin-test:~#/etc/init.d/kibana

查看启动

ps -ef|grep -E "el|kibana"

注意 报错处理

.

 ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
    添加: elasticsearch.yml 第72行 :cluster.initial_master_nodes: ["es-1"]  es-1是你上面设置的node-name

.

ERROR: [1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, d                                                                                                                           is    covery.seed_providers, cluster.initial_master_nodes] must be configured
 #修改config/elasticsearch.yml下约第23行,放开node.name注释,可更改名称
 node.name: es-1

以上是关于ELK7.3.1 单台部署elasticsearch和kibana的主要内容,如果未能解决你的问题,请参考以下文章

单台主机nginx+tomcat+mencached部署测试

docker监控weavworks/scope,单台和多台部署

架构师成长之路6.3 DNS服务器搭建(部署单台DNS)

单台主机一键编译部署LAMP+wordpress+discuz系统的shell脚本

PXE远程安装系统的部署——(单台系统可给多台裸机远程安装系统)

Elk 进阶部署