(1)首先,点击Elastic Homebrew存储库
brew tap elastic/tap
% brew tap elastic/tap
==> Tapping elastic/tap
Cloning into '/usr/local/Homebrew/Library/Taps/elastic/homebrew-tap'...
remote: Enumerating objects: 1060, done.
remote: Counting objects: 100% (301/301), done.
remote: Compressing objects: 100% (189/189), done.
remote: Total 1060 (delta 219), reused 159 (delta 111), pack-reused 759
Receiving objects: 100% (1060/1060), 258.51 KiB | 1.68 MiB/s, done.
Resolving deltas: 100% (805/805), done.
Tapped 17 formulae (37 files, 362KB).
(2)点击Elastic Homebrew存储库后,使用brew install命令安装Logstash的默认发行版
brew install elastic/tap/logstash-full
% brew install elastic/tap/logstash-full
==> Downloading https://artifacts.elastic.co/downloads/logstash/logstash-7.14.1-
######################################################################## 100.0%
==> Installing logstash-full from elastic/tap
==> find /usr/local/Cellar/logstash-full/7.14.1/libexec/jdk.app/Contents/Home/bi
==> Caveats
Please read the getting started guide located at:
https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html
To have launchd start elastic/tap/logstash-full now and restart at login:
brew services start elastic/tap/logstash-full
Or, if you don't want/need a background service you can just run:
logstash
==> Summary
🍺 /usr/local/Cellar/logstash-full/7.14.1: 13,687 files, 586.1MB, built in 27 seconds
(3)使用Homebrew进行Logstash启动
立即启动logstash-full,并在登录时重新启动
brew services start elastic/tap/logstash-full
% brew services start elastic/tap/logstash-full
==> Successfully started `logstash-full` (label: homebrew.mxcl.logstash-full)
(4)运行Logstash
logstash