6.4.2 安装
下面文档为基础的部署步骤, 后续请使用ansible进行部署
基础信息准备
由于ELK组建的更新换代速度很快, 请参考官方文档中的有关信息确定安装的具体版本
集群基本信息
主机资源信息
IP
角色
生命周期角色
部署程序
10.40.58.153
master、data、client
hot
es
logstash
10.40.58.154
master、data、client
cold
es
kibana
10.40.61.116
master、data、client
cold
es
cerebro
curator
维护ansible hosts文件
安装jdk
Logstash
Elasticsearch
需要JDK8, 需要检查主机上是否已经安装JDK8
安装Elasticsearch
安装部署请参照官方文档 查找对应的版本, 下面片段为官方网站
Download and install the RPM manually
The RPM for Elasticsearch v7.4.2 can be downloaded from the website and installed as follows:
Download and install the Debian package manually
The Debian package for Elasticsearch v7.4.2 can be downloaded from the website and installed as follows:
Running Elasticsearch with systemd
systemd
To configure Elasticsearch to start automatically when the system boots up, run the following commands:
Elasticsearch can be started and stopped as follows:
These commands provide no feedback as to whether Elasticsearch was started successfully or not. Instead, this information will be written in the log files located in /var/log/elasticsearch/
.
By default the Elasticsearch service doesn’t log information in the systemd
journal. To enable journalctl
logging, the --quiet
option must be removed from the ExecStart
command line in the elasticsearch.service
file.
When systemd
logging is enabled, the logging information are available using the journalctl
commands:
To tail the journal:
To list journal entries for the elasticsearch service:
To list journal entries for the elasticsearch service starting from a given time:
Check man journalctl
or https://www.freedesktop.org/software/systemd/man/journalctl.html for more command line options.
安装Logstash
详细查看官方文档Install Logstash
YUM 方式安装
Download and install the public signing key:
Add the following in your /etc/yum.repos.d/
directory in a file with a .repo
suffix, for example logstash.repo
And your repository is ready for use. You can install it with:
Running Logstash with systemd
systemd
To configure Logstash to start automatically when the system boots up, run the following commands:
Logstash can be started and stopped as follows:
部署Kibana
更多的安装步骤请查看官方文档Install Kibana
Download and install the RPM manually
The RPM for Kibana v6.5.4 can be downloaded from the website and installed as follows:
Running Kibana with systemd
systemd
To configure Kibana to start automatically when the system boots up, run the following commands:
Kibana can be started and stopped as follows:
These commands provide no feedback as to whether Kibana was started successfully or not. Instead, this information will be written in the log files located in /var/log/kibana/
.
安装Cerebro
cerebro支持节点状态监控 服务器磁盘空间,cpu,load,索引数量大小 ,数据分布位置等监控。 支持查询。项目托管于github
Download and install the RPM manually
rpm 包从github上进行下载, 操作命令如下:
Running Cerebro with systemd
systemd
To configure cerebro to start automatically when the system boots up, run the following commands:
cerebro can be started and stopped as follows:
安装Curator
curator是一个用于管理es中的索引和快照的工具。
curator是用Python写的,可以作为命令行工具,也能作为python的API。
Repository Configuration
Add the following in your /etc/yum.repos.d/
directory in a file with a .repo
suffix, for example curator.repo
The repositories are different for CentOS/RHEL 6 and 7 due to library and path differences. Be sure to use the correct version for your system!
RHEL/CentOS 6:
RHEL/CentOS 7:
The RPM version of Curator is a binary version. What this really means is that the source is frozen, and all required libraries are bundled with the curator
binary, so there are no conflicts.
There are separate binary packages for RedHat variants. The binary packages resulting from the creation process have been tested on CentOS 6 & 7, with a different binary for each. They may work on similar variants and/or derivatives, but they have not been tested.
This will install the necessary files into /opt/elasticsearch-curator
and make a symlink at /usr/bin/curator
that points to the curator
binary in the aforementioned directory.
最后更新于
这有帮助吗?