yum install java -y
wget https://ftp.itu.edu.tr/Mirror/Apache/kafka/2.8.0/kafka_2.13-2.8.0.tgz
mv kafka_2.13-2.8.0.tgz /opt/
cd /opt/
tar -zxf kafka_2.13-2.8.0.tgz
ln -s /opt/kafka_2.13-2.8.0 /opt/kafka
useradd kafka
chown -R kafka:kafka /opt/kafka*
Edit: /etc/systemd/system/zookeeper.service
[Unit]
Description=zookeeper
After=syslog.target network.target
[Service]
Type=simple
User=kafka
Group=kafka
ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties
ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh
[Install]
WantedBy=multi-user.target
Edit: /etc/systemd/system/kafka.service
[Unit]
Description=Apache Kafka
Requires=zookeeper.service
After=zookeeper.service
[Service]
Type=simple
User=kafka
Group=kafka
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties
ExecStop=/opt/kafka/bin/kafka-server-stop.sh
[Install]
WantedBy=multi-user.target
systemctl start zookeeper
systemctl start kafka
Monday, June 21, 2021
kafkaserver installation on Red Hat 8.4
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment