📅  最后修改于: 2022-03-11 14:50:34.887000             🧑  作者: Mango
sudo apt install default-jre
sudo apt install zookeeperd
sudo adduser --system --no-create-home --disabled-password --disabled-login kafka
cd ~
wget "http://www-eu.apache.org/dist/kafka/1.0.1/kafka_2.12-1.0.1.tgz" #replace the url with the newest release if outdated
sudo mkdir /opt/kafka
sudo tar -xvzf kafka_2.12-1.0.1.tgz --directory /opt/kafka --strip-components 1
sudo mkdir /var/lib/kafka
sudo mkdir /var/lib/kafka/data
sudo chown -R kafka:nogroup /opt/kafka
sudo chown -R kafka:nogroup /var/lib/kafka
sudo systemctl restart kafka