Logstash 参考指南(做为Debian或RPM上的服务运行Logstash)

做为Debian或RPM上的服务运行Logstash

在安装以后,Logstash不会自动启动,如何启动和中止Logstash取决于系统是否使用systemd、upstart或SysV。操作系统

下面是一些常见的操做系统和版本,以及它们使用的相应启动样式,本列表旨在提供信息,而不是详尽无遗。code

发行版 服务系统
Ubuntu 16.04及以上 systemd
Ubuntu 12.04到15.10 upstart
Debian 8 "jessie"及以上 systemd
Debian 7 “wheezy”及如下 sysv
CentOS(和RHEL)7及以上 systemd
CentOS(和RHEL)6 upstart

使用Systemd运行Logstash

像Debian Jessie、Ubuntu 15.10+和许多SUSE衍生发行版都使用systemdsystemctl命令来启动和中止服务,Logstash将系统单元文件放在/etc/systemd/system中,分别用于deb和rpm,在安装包以后,你能够启动Logstash:it

sudo systemctl start logstash.service

使用Upstart运行Logstash

对于使用upstart的系统,你能够启动Logstash:table

sudo initctl start logstash

upstart系统的自动生成的配置文件是/etc/init/logstash.conf配置

使用SysV运行Logstash

对于使用SysV的系统,你能够启动Logstash:service

sudo /etc/init.d/logstash start
相关文章
相关标签/搜索