Huge buildings are always made of one wood and one stone. Why don't we make them? I often do some odd things, that's why.
That's right, but I didn't say that! ——Lu Xun
brew is the installation package tool of mac system. Similar to yum or apt get.
What is the package path of brew installation. The following is an example of installing kafka.
Install kafka
brew install kafka
results of enforcement
######################################################################## 100.0%
==> Pouring kafka-2.0.0.highsierra.bottle.tar.gz
==> Caveats
To have launchd start kafka now and restart at login:
brew services start kafka
Or, if you don't want/need a background service you can just run:
zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties
==> Summary
🍺 /usr/local/Cellar/kafka/2.0.0: 160 files, 46.8MB
Installation path
From the last sentence of the execution result, you can see that it is installed under / usr / local / cell / Kafka / 2.0.0, and the result under the directory is as follows
/usr/local/Cellar/kafka/2.0.0 ll total 88 -rw-r--r-- 1 xinaozhihuiwuliu staff 1.6K 3 6 08:58 INSTALL_RECEIPT.json -rw-r--r-- 1 xinaozhihuiwuliu staff 28K 7 24 2018 LICENSE -rw-r--r-- 1 xinaozhihuiwuliu staff 336B 7 24 2018 NOTICE drwxr-xr-x 32 xinaozhihuiwuliu staff 1.0K 3 6 08:58 bin -rw-r--r-- 1 xinaozhihuiwuliu staff 768B 3 6 08:58 homebrew.mxcl.kafka.plist drwxr-xr-x 5 xinaozhihuiwuliu staff 160B 7 24 2018 libexec
Here is the most important directory bin, which is the execution file
- That is to say, the installation folder is under usr / local / cell*
Path of use
The general path is / usr/local/bin. Go to this directory and check it;
/usr/local/bin ll | grep kafka lrwxr-xr-x 1 xinaozhihuiwuliu admin 45B 3 6 08:58 connect-distributed -> ../Cellar/kafka/2.0.0/bin/connect-distributed lrwxr-xr-x 1 xinaozhihuiwuliu admin 44B 3 6 08:58 connect-standalone -> ../Cellar/kafka/2.0.0/bin/connect-standalone lrwxr-xr-x 1 xinaozhihuiwuliu admin 36B 3 6 08:58 kafka-acls -> ../Cellar/kafka/2.0.0/bin/kafka-acls lrwxr-xr-x 1 xinaozhihuiwuliu admin 51B 3 6 08:58 kafka-broker-api-versions -> ../Cellar/kafka/2.0.0/bin/kafka-broker-api-versions lrwxr-xr-x 1 xinaozhihuiwuliu admin 39B 3 6 08:58 kafka-configs -> ../Cellar/kafka/2.0.0/bin/kafka-configs lrwxr-xr-x 1 xinaozhihuiwuliu admin 48B 3 6 08:58 kafka-console-consumer -> ../Cellar/kafka/2.0.0/bin/kafka-console-consumer lrwxr-xr-x 1 xinaozhihuiwuliu admin 48B 3 6 08:58 kafka-console-producer -> ../Cellar/kafka/2.0.0/bin/kafka-console-producer lrwxr-xr-x 1 xinaozhihuiwuliu admin 47B 3 6 08:58 kafka-consumer-groups -> ../Cellar/kafka/2.0.0/bin/kafka-consumer-groups lrwxr-xr-x 1 xinaozhihuiwuliu admin 50B 3 6 08:58 kafka-consumer-perf-test -> ../Cellar/kafka/2.0.0/bin/kafka-consumer-perf-test lrwxr-xr-x 1 xinaozhihuiwuliu admin 49B 3 6 08:58 kafka-delegation-tokens -> ../Cellar/kafka/2.0.0/bin/kafka-delegation-tokens lrwxr-xr-x 1 xinaozhihuiwuliu admin 46B 3 6 08:58 kafka-delete-records -> ../Cellar/kafka/2.0.0/bin/kafka-delete-records lrwxr-xr-x 1 xinaozhihuiwuliu admin 40B 3 6 08:58 kafka-dump-log -> ../Cellar/kafka/2.0.0/bin/kafka-dump-log lrwxr-xr-x 1 xinaozhihuiwuliu admin 40B 3 6 08:58 kafka-log-dirs -> ../Cellar/kafka/2.0.0/bin/kafka-log-dirs lrwxr-xr-x 1 xinaozhihuiwuliu admin 44B 3 6 08:58 kafka-mirror-maker -> ../Cellar/kafka/2.0.0/bin/kafka-mirror-maker lrwxr-xr-x 1 xinaozhihuiwuliu admin 58B 3 6 08:58 kafka-preferred-replica-election -> ../Cellar/kafka/2.0.0/bin/kafka-preferred-replica-election lrwxr-xr-x 1 xinaozhihuiwuliu admin 50B 3 6 08:58 kafka-producer-perf-test -> ../Cellar/kafka/2.0.0/bin/kafka-producer-perf-test lrwxr-xr-x 1 xinaozhihuiwuliu admin 51B 3 6 08:58 kafka-reassign-partitions -> ../Cellar/kafka/2.0.0/bin/kafka-reassign-partitions lrwxr-xr-x 1 xinaozhihuiwuliu admin 52B 3 6 08:58 kafka-replica-verification -> ../Cellar/kafka/2.0.0/bin/kafka-replica-verification lrwxr-xr-x 1 xinaozhihuiwuliu admin 41B 3 6 08:58 kafka-run-class -> ../Cellar/kafka/2.0.0/bin/kafka-run-class lrwxr-xr-x 1 xinaozhihuiwuliu admin 44B 3 6 08:58 kafka-server-start -> ../Cellar/kafka/2.0.0/bin/kafka-server-start lrwxr-xr-x 1 xinaozhihuiwuliu admin 43B 3 6 08:58 kafka-server-stop -> ../Cellar/kafka/2.0.0/bin/kafka-server-stop lrwxr-xr-x 1 xinaozhihuiwuliu admin 57B 3 6 08:58 kafka-streams-application-reset -> ../Cellar/kafka/2.0.0/bin/kafka-streams-application-reset lrwxr-xr-x 1 xinaozhihuiwuliu admin 38B 3 6 08:58 kafka-topics -> ../Cellar/kafka/2.0.0/bin/kafka-topics lrwxr-xr-x 1 xinaozhihuiwuliu admin 51B 3 6 08:58 kafka-verifiable-consumer -> ../Cellar/kafka/2.0.0/bin/kafka-verifiable-consumer lrwxr-xr-x 1 xinaozhihuiwuliu admin 51B 3 6 08:58 kafka-verifiable-producer -> ../Cellar/kafka/2.0.0/bin/kafka-verifiable-producer lrwxr-xr-x 1 xinaozhihuiwuliu admin 33B 3 6 08:58 trogdor -> ../Cellar/kafka/2.0.0/bin/trogdor lrwxr-xr-x 1 xinaozhihuiwuliu admin 54B 3 6 08:58 zookeeper-security-migration -> ../Cellar/kafka/2.0.0/bin/zookeeper-security-migration lrwxr-xr-x 1 xinaozhihuiwuliu admin 48B 3 6 08:58 zookeeper-server-start -> ../Cellar/kafka/2.0.0/bin/zookeeper-server-start lrwxr-xr-x 1 xinaozhihuiwuliu admin 47B 3 6 08:58 zookeeper-server-stop -> ../Cellar/kafka/2.0.0/bin/zookeeper-server-stop lrwxr-xr-x 1 xinaozhihuiwuliu admin 41B 3 6 08:58 zookeeper-shell -> ../Cellar/kafka/2.0.0/bin/zookeeper-shell
This directory hyperlinks the commands under bin under the cell directory
Configuration path
From the execution result, it should be under / usr/local/etc. if kafka is found, check the directory:
/usr/local/etc/kafka ll total 136 -rw-r--r-- 1 xinaozhihuiwuliu admin 906B 3 6 08:58 connect-console-sink.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 909B 3 6 08:58 connect-console-source.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 5.2K 3 6 08:58 connect-distributed.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 883B 3 6 08:58 connect-file-sink.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 881B 3 6 08:58 connect-file-source.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 1.1K 3 6 08:58 connect-log4j.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 2.2K 3 6 08:58 connect-standalone.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 1.2K 3 6 08:58 consumer.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 4.6K 3 6 08:58 log4j.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 1.9K 3 6 08:58 producer.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 6.7K 3 6 08:58 server.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 1.0K 3 6 08:58 tools-log4j.properties -rw-r--r-- 1 xinaozhihuiwuliu admin 1.1K 3 6 08:58 trogdor.conf -rw-r--r-- 1 xinaozhihuiwuliu admin 1.0K 3 6 08:58 zookeeper.properties
OK, the configuration file is found