Logstash 参考指南(作为Debian或RPM上的服务运行Logstash)
文章目录
作为Debian或RPM上的服务运行Logstash
在安装之后,Logstash不会自动启动,如何启动和停止Logstash取决于系统是否使用systemd、upstart或SysV。
下面是一些常见的操作系统和版本,以及它们使用的相应启动样式,本列表旨在提供信息,而不是详尽无遗。
| 发行版 | 服务系统 |
|---|---|
| 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衍生发行版都使用systemd和systemctl命令来启动和停止服务,Logstash将系统单元文件放在/etc/systemd/system中,分别用于deb和rpm,在安装包之后,你可以启动Logstash:
sudo systemctl start logstash.service
使用Upstart运行Logstash
对于使用upstart的系统,你可以启动Logstash:
sudo initctl start logstash
upstart系统的自动生成的配置文件是/etc/init/logstash.conf。
使用SysV运行Logstash
对于使用SysV的系统,你可以启动Logstash:
sudo /etc/init.d/logstash start

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论