{"id":37939,"date":"2025-04-29T17:46:51","date_gmt":"2025-04-29T14:46:51","guid":{"rendered":"https:\/\/itedu.center\/ua\/blog\/?p=37939"},"modified":"2026-03-04T23:48:55","modified_gmt":"2026-03-04T21:48:55","slug":"vstanovliuiemo-apache-kafka-na-ubuntu-24-04-za-5-krokiv","status":"publish","type":"post","link":"https:\/\/itedu.center\/ua\/blog\/guides\/vstanovliuiemo-apache-kafka-na-ubuntu-24-04-za-5-krokiv\/","title":{"rendered":"\u0412\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0454\u043c\u043e Apache Kafka \u043d\u0430 Ubuntu 24.04 \u0437\u0430 5 \u043a\u0440\u043e\u043a\u0456\u0432"},"content":{"rendered":"\n<p>Apache Kafka \u2014 \u0446\u0435 \u0440\u043e\u0437\u043f\u043e\u0434\u0456\u043b\u0435\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u043e\u0431\u043a\u0438 \u043f\u043e\u0442\u043e\u043a\u0456\u0432 \u0434\u0430\u043d\u0438\u0445 \u0437 \u0432\u0456\u0434\u043a\u0440\u0438\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c.\u00a0<\/p>\n\n\n\n<p>\u0412\u043e\u043d\u0430 \u0434\u043e\u043f\u043e\u043c\u0430\u0433\u0430\u0454 \u0448\u0432\u0438\u0434\u043a\u043e \u0439 \u0441\u0442\u0430\u0431\u0456\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0437 \u0442\u043e\u0447\u043a\u0438 \u0410 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0411 \u2014 \u0456\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0446\u043c\u0435\u0440\u0435\u0436, \u043e\u043d\u043b\u0430\u0439\u043d-\u0431\u0430\u043d\u043a\u0456\u043d\u0433\u0443, \u0430\u043d\u0430\u043b\u0456\u0442\u0438\u043a\u0438 \u0442\u0430 \u0431\u0443\u0434\u044c-\u044f\u043a\u0438\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n\n\n\n<p>\u0406 \u044f\u043a\u0449\u043e \u0442\u0438 \u044e\u0437\u0430\u0454\u0448 Ubuntu 24.04, \u0442\u043e\u0434\u0456 \u043d\u0443\u043c\u043e \u0447\u0438\u0442\u0430\u0442\u0438 \u0433\u0430\u0439\u0434 \u0437\u0456 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f: \u043b\u0438\u0448\u0435 5 \u043a\u0440\u043e\u043a\u0456\u0432 \u0456 \u0442\u0438 \u0432 \u0442\u0435\u043c\u0456.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u0440\u043e\u043a 1: \u043e\u043d\u043e\u0432\u0438 \u0441\u0432\u043e\u044e \u041e\u0421<\/h2>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u043e\u043d\u043e\u0432\u0438 \u0432\u0441\u0456 \u043f\u0430\u043a\u0443\u043d\u043a\u0438 \u0434\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0456\u0439:<\/p>\n\n\n\n<p><strong><code>apt update &amp;&amp; apt upgrade<\/code><\/strong><\/p>\n\n\n\n<p>\u0426\u0435 \u043c\u0456\u043d\u0456\u043c\u0443\u043c, \u0449\u043e\u0431 \u0443\u043d\u0438\u043a\u043d\u0443\u0442\u0438 \u043a\u043e\u043d\u0444\u043b\u0456\u043a\u0442\u0456\u0432 \u043f\u0456\u0434 \u0447\u0430\u0441 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f Java \u0442\u0430 Kafka.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u0440\u043e\u043a 2: \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438 Java (OpenJDK)<\/h2>\n\n\n\n<p>Kafka \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0454 Java \u0434\u043b\u044f \u0440\u043e\u0431\u043e\u0442\u0438, \u0442\u043e\u043c\u0443 \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438 OpenJDK.&nbsp;<\/p>\n\n\n\n<p>Ubuntu 24.04 \u0432\u0436\u0435 \u043c\u0430\u0454 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0456 \u043f\u0430\u043a\u0443\u043d\u043a\u0438 \u0443 \u0441\u0432\u043e\u0457\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0456\u044f\u0445, \u0442\u043e\u043c\u0443 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0432\u0438\u0433\u043b\u044f\u0434\u0430\u0442\u0438\u043c\u0435 \u043e\u0441\u044c \u0442\u0430\u043a:<\/p>\n\n\n\n<p><strong><code>apt install default-jdk<\/code><\/strong><\/p>\n\n\n\n<p>\u041f\u0456\u0441\u043b\u044f \u0456\u043d\u0441\u0442\u0430\u043b\u044f\u0446\u0456\u0457 \u043f\u0435\u0440\u0435\u0432\u0456\u0440 \u0432\u0435\u0440\u0441\u0456\u044e:<\/p>\n\n\n\n<p><strong><code>java -version<\/code><\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u0432\u0438\u043d\u043d\u043e \u0437\u2019\u044f\u0432\u0438\u0442\u0438\u0441\u044f \u0449\u043e\u0441\u044c \u043d\u0430 \u043a\u0448\u0442\u0430\u043b\u0442:<\/p>\n\n\n\n<p><strong><code>openjdk version \"21.0.6\" 2025-01-21<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode, sharing)<\/code><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u0440\u043e\u043a 3: \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436 Kafka<\/h2>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438 \u043d\u0430<a href=\"https:\/\/kafka.apache.org\/downloads\" target=\"_blank\" rel=\"noopener nofollow\" title=\"\" data-wpel-link=\"external\"> \u043e\u0444\u0456\u0446\u0456\u0439\u043d\u0438\u0439 \u0441\u0430\u0439\u0442 Apache Kafka<\/a>, \u0449\u043e\u0431 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443 \u0432\u0435\u0440\u0441\u0456\u044e. \u0421\u0442\u0430\u043d\u043e\u043c \u043d\u0430 \u043a\u0432\u0456\u0442\u0435\u043d\u044c 2025 \u0440\u043e\u043a\u0443 \u0446\u0435 4.0.0. \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436 \u0457\u0457 \u0442\u0430\u043a:<\/p>\n\n\n\n<p><strong><code>wget https:\/\/downloads.apache.org\/kafka\/4.0.0\/kafka_2.13-4.0.0.tgz<\/code><\/strong><\/p>\n\n\n\n<p>\u0420\u043e\u0437\u043f\u0430\u043a\u043e\u0432\u0443\u0454\u043c\u043e \u0430\u0440\u0445\u0456\u0432:<\/p>\n\n\n\n<p><strong><code>tar xvf kafka_2.13-4.0.0.tgz<\/code><\/strong><\/p>\n\n\n\n<p>\u0406 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0456\u044e:<\/p>\n\n\n\n<p><strong><code>mv kafka_2.13-4.0.0 \/usr\/local\/kafka<\/code><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u0440\u043e\u043a 4: \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0439 systemd \u0434\u043b\u044f Kafka<\/h2>\n\n\n\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0456\u044e Kafka:<\/p>\n\n\n\n<p><strong><code>cd \/usr\/local\/kafka<\/code><\/strong><\/p>\n\n\n\n<p>\u0421\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e \u0443\u043d\u0456\u043a\u0430\u043b\u044c\u043d\u0438\u0439 \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n\n\n\n<p><strong><code>KAFKA_CLUSTER_ID=\"$(bin\/kafka-storage.sh random-uuid)\"<\/code><\/strong><\/p>\n\n\n\n<p>\u0424\u043e\u0440\u043c\u0430\u0442\u0443\u0454\u043c\u043e \u043b\u043e\u0433-\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0456\u0457:<\/p>\n\n\n\n<p><strong><code>bin\/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config\/server.properties<\/code><\/strong><\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440 \u0441\u0442\u0432\u043e\u0440\u044e\u0454\u043c\u043e systemd-\u0441\u0435\u0440\u0432\u0456\u0441, \u0449\u043e\u0431 \u0437\u0440\u0443\u0447\u043d\u043e \u043a\u0435\u0440\u0443\u0432\u0430\u0442\u0438 Kafka:<\/p>\n\n\n\n<p><strong><code>nano \/etc\/systemd\/system\/kafka.service<\/code><\/strong><\/p>\n\n\n\n<p>\u0412\u0441\u0442\u0430\u0432 \u0443 \u0444\u0430\u0439\u043b \u043e\u0441\u044c \u0446\u0435:<\/p>\n\n\n\n<p><strong><code>[Unit]<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Description=Apache Kafka Server<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Documentation=http:\/\/kafka.apache.org\/documentation.html<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Requires=zookeeper.service<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>[Service]<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Type=simple<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Environment=\"JAVA_HOME=\/usr\/lib\/jvm\/java-1.21.0-openjdk-amd64\"<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>ExecStart=\/usr\/local\/kafka\/bin\/kafka-server-start.sh \/usr\/local\/kafka\/config\/server.properties<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>ExecStop=\/usr\/local\/kafka\/bin\/kafka-server-stop.sh<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>[Install]<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>WantedBy=multi-user.target<\/code><\/strong><\/p>\n\n\n\n<p>\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0439 \u0456 \u0437\u0430\u043a\u0440\u0438\u0432\u0430\u0439.&nbsp;<\/p>\n\n\n\n<p>\u041f\u043e\u0442\u0456\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436 \u0434\u0435\u043c\u043e\u043d\u0438 systemd \u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438 Kafka:<\/p>\n\n\n\n<p><strong><code>systemctl daemon-reload<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>systemctl start kafka<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>systemctl enable kafka<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>systemctl status kafka<\/code><\/strong><\/p>\n\n\n\n<p>\u041e\u0447\u0456\u043a\u0443\u0432\u0430\u043d\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n\n\n\n<p><strong><code>\u25cf kafka.service - Apache Kafka Server<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Loaded: loaded (\/etc\/systemd\/system\/kafka.service; enabled; preset: enabled)<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Active: active (running)<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Docs: http:\/\/kafka.apache.org\/documentation.html<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Main PID: 11915 (java)<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Tasks: 99 (limit: 2217)<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>Memory: 365.1M (peak: 365.4M)<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>CPU: 16.435s<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>CGroup: \/system.slice\/kafka.service<\/code><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u0440\u043e\u043a 5: \u0441\u0442\u0432\u043e\u0440\u0438 \u0442\u0435\u043c\u0438 Kafka<\/h2>\n\n\n\n<p>\u041f\u0435\u0440\u0448 \u043d\u0456\u0436 \u043f\u043e\u0447\u0430\u0442\u0438 \u043f\u0438\u0441\u0430\u0442\u0438 \u0441\u0432\u043e\u0457 \u043f\u0435\u0440\u0448\u0456 \u043f\u043e\u0434\u0456\u0457, \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0442\u0435\u043c\u0443. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u0442\u0435\u043c\u0443 \u0437 \u043d\u0430\u0437\u0432\u043e\u044e <strong>my-events<\/strong> \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0442\u0430\u043a\u043e\u0457 \u043a\u043e\u043c\u0430\u043d\u0434\u0438:<\/p>\n\n\n\n<p><strong><code>bin\/kafka-topics.sh --create --topic my-events --bootstrap-server localhost:9092<\/code><\/strong><\/p>\n\n\n\n<p>\u0429\u043e\u0431 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438, \u044f\u043a\u0456 \u0442\u0435\u043c\u0438 \u0432\u0436\u0435 \u0456\u0441\u043d\u0443\u044e\u0442\u044c \u0443 \u0442\u0432\u043e\u0457\u0439 Kafka, \u0432\u0438\u043a\u043e\u043d\u0430\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n\n\n\n<p><strong><code>bin\/kafka-topics.sh --list --bootstrap-server localhost:9092<\/code><\/strong><\/p>\n\n\n\n<p>\u0423 \u0442\u0432\u043e\u0454\u043c\u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u043c\u0430\u0454 \u0432\u0438\u0432\u0435\u0441\u0442\u0438 <strong><code>my-events<\/code><\/strong>.<\/p>\n\n\n\n<p>Kafka \u0442\u0430\u043a\u043e\u0436 \u043c\u0430\u0454 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0438\u0439 \u043a\u043b\u0456\u0454\u043d\u0442, \u044f\u043a\u0438\u0439 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0432 \u0442\u0435\u043c\u0443 \u2014 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b \u0430\u0431\u043e \u043f\u0440\u044f\u043c\u043e \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0434\u043e\u0434\u0430\u0432\u0430\u0442\u0438 \u043d\u043e\u0432\u0456 \u043f\u043e\u0434\u0456\u0457 \u0434\u043e \u0442\u0435\u043c\u0438 \u043c\u043e\u0436\u043d\u0430 \u0442\u0430\u043a:<\/p>\n\n\n\n<p><strong><code>bin\/kafka-console-producer.sh --topic my-events --bootstrap-server localhost:9092<\/code><\/strong><\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440 \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0456 \u0431\u0443\u0434\u044c-\u044f\u043a\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043e\u0436\u0435\u043d \u0440\u044f\u0434\u043e\u043a \u0431\u0443\u0434\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0439 \u044f\u043a \u043e\u043a\u0440\u0435\u043c\u0430 \u043f\u043e\u0434\u0456\u044f.<\/p>\n\n\n\n<p>\u0429\u043e\u0431 \u043f\u0440\u0438\u043f\u0438\u043d\u0438\u0442\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044f \u043f\u043e\u0434\u0456\u0439, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0442\u0438\u0441\u043d\u0438 <strong>Ctrl-C<\/strong>. \u0406 \u044f\u043a\u0449\u043e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0432\u0441\u0456 \u0434\u0430\u043d\u0456 \u0442\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u0438 \u0432 Kafka, \u043c\u043e\u0436\u043d\u0430 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0430\u0439\u043b\u0438 \u0442\u0430\u043a:<\/p>\n\n\n\n<p><strong><code>rm -rf \/tmp\/kafka-logs \/tmp\/kraft-combined-logs<\/code><\/strong><\/p>\n\n\n\n<p>\u0412\u0443\u0430\u043b\u044f, \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e. \u0422\u0438 \u0447\u0443\u0434\u043e\u0432\u043e \u0432\u043f\u043e\u0440\u0430\u0432\u0441\u044f \u0437 \u0447\u0438\u043c \u0437\u0430\u0432\u0434\u0430\u043d\u043d\u044f\u043c \u0456 \u043d\u0430\u0433\u043e\u0440\u043e\u0434\u0430 \u2014 Apache Kafka \u043d\u0430 Ubuntu 24.04.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0456 \u043a\u043e\u0440\u0438\u0441\u043d\u0456 \u043c\u0430\u0442\u0435\u0440\u0456\u0430\u043b\u0438<\/h2>\n\n\n\n<p>\u0422\u0435, \u0449\u043e \u043d\u0435 \u0437\u0430\u0432\u0436\u0434\u0438 \u0442\u0440\u0430\u043f\u043b\u044f\u0454\u0442\u044c\u0441\u044f \u0432 \u0431\u0430\u0437\u043e\u0432\u0438\u0445 \u0433\u0430\u0439\u0434\u0430\u0445, \u0430\u043b\u0435 \u0442\u043e\u0447\u043d\u043e \u0437\u0435\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0437\u0430\u043f\u0438\u0442\u0456\u0432 \u0443 \u0433\u0443\u0433\u043b.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0417\u043c\u0456\u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0443 (9092)<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u0423 \u043a\u043e\u043d\u0444\u0456\u0433\u0443\u0440\u0430\u0446\u0456\u0457 <strong><code>server.properties<\/code><\/strong> \u043c\u043e\u0436\u043d\u0430 \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0440\u0442, \u043d\u0430 \u044f\u043a\u043e\u043c\u0443 Kafka \u0431\u0443\u0434\u0435 \u0441\u043b\u0443\u0445\u0430\u0442\u0438 \u0437\u2019\u0454\u0434\u043d\u0430\u043d\u043d\u044f:<\/p>\n\n\n\n<p><strong><code>listeners=PLAINTEXT:\/\/0.0.0.0:9093<\/code><\/strong><\/p>\n\n\n\n<p>\u0426\u0435 \u0441\u0442\u0430\u043d\u0435 \u0432 \u043f\u0440\u0438\u0433\u043e\u0434\u0456, \u044f\u043a\u0449\u043e \u043f\u043e\u0440\u0442 9092 \u0432\u0436\u0435 \u0437\u0430\u0439\u043d\u044f\u0442\u0438\u0439 \u0430\u0431\u043e \u0442\u0438 \u0445\u043e\u0447\u0435\u0448 \u043c\u0430\u0442\u0438 \u043a\u0456\u043b\u044c\u043a\u0430 \u0431\u0440\u043e\u043a\u0435\u0440\u0456\u0432 \u043d\u0430 \u043e\u0434\u043d\u0456\u0439 \u043c\u0430\u0448\u0438\u043d\u0456.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0456\u0439<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u0414\u0430\u043d\u0456 \u0432\u0441\u0456\u0445 \u043f\u043e\u0434\u0456\u0439 (\u0442\u0435\u043c\u0438, \u043f\u0430\u0440\u0442\u0438\u0446\u0456\u0457) Kafka \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0454 \u0443 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0456\u0457, \u044f\u043a\u0443 \u0432\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456 <strong><code>log.dirs<\/code><\/strong>:<\/p>\n\n\n\n<p><strong><code>log.dirs=\/home\/kafka\/logs<\/code><\/strong><\/p>\n\n\n\n<p>\u041c\u043e\u0436\u0435\u0448 \u0437\u0430\u0434\u0430\u0442\u0438 \u0431\u0443\u0434\u044c-\u044f\u043a\u0435 \u043c\u0456\u0441\u0446\u0435 \u2014 \u0433\u043e\u043b\u043e\u0432\u043d\u0435, \u0449\u043e\u0431 \u0442\u0430\u043c \u0432\u0438\u0441\u0442\u0430\u0447\u0430\u043b\u043e \u043c\u0456\u0441\u0446\u044f \u0439 \u0431\u0443\u043b\u0438 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434 \u043b\u043e\u0433\u0456\u0432<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u042f\u043a\u0449\u043e \u0442\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0448 Kafka \u0447\u0435\u0440\u0435\u0437 <code>systemd<\/code>, \u043b\u043e\u0433 \u043c\u043e\u0436\u043d\u0430 \u0433\u043b\u044f\u043d\u0443\u0442\u0438 \u0447\u0435\u0440\u0435\u0437:<\/p>\n\n\n\n<p><strong><code>journalctl -u kafka<\/code><\/strong><\/p>\n\n\n\n<p>\u0410\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0442\u0438 \u0444\u0430\u0439\u043b, \u043a\u0443\u0434\u0438 \u0442\u0438 \u0441\u043a\u0435\u0440\u043e\u0432\u0443\u0454\u0448 <strong><code>stdout<\/code><\/strong>, \u0443 \u044e\u043d\u0456\u0442-\u0444\u0430\u0439\u043b\u0456.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0414\u043e\u0437\u0432\u0456\u043b \u043d\u0430 \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f \u0442\u0435\u043c<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Kafka \u043d\u0435 \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0432\u0438\u0434\u0430\u043b\u044f\u0442\u0438 \u0442\u0435\u043c\u0438 (\u0442\u0456\u043b\u044c\u043a\u0438 \u0441\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438). \u0429\u043e\u0431 \u0446\u0435 \u0437\u043c\u0456\u043d\u0438\u0442\u0438:<\/p>\n\n\n\n<p><strong><code>delete.topic.enable=true<\/code><\/strong><\/p>\n\n\n\n<p><strong><code>delete.topic.enable=true<\/code><\/strong><\/p>\n\n\n\n<p>\u0414\u043e\u0434\u0430\u0454\u0448 \u0446\u0435\u0439 \u0440\u044f\u0434\u043e\u043a \u0443 <strong><code>server.properties<\/code><\/strong> \u2014 \u0456 \u043c\u043e\u0436\u043d\u0430 \u0431\u0443\u0434\u0435 \u0432\u0438\u0434\u0430\u043b\u044f\u0442\u0438 \u0442\u0435\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u044e <strong><code>kafka-topics.sh --delete<\/code><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041f\u0456\u0441\u043b\u044f\u0441\u043b\u043e\u0432\u043e<\/h2>\n\n\n\n<p>\u041f\u043e\u0447\u043d\u0438 \u0437 \u043c\u0430\u043b\u043e\u0433\u043e, \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443\u0439 \u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0435\u0434\u043e\u0432\u0438\u0449\u0456, \u043d\u0435 \u0431\u0456\u0439\u0441\u044f \u043b\u0430\u043c\u0430\u0442\u0438 \u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u0438. \u041f\u0440\u043e\u0442\u0435 \u043d\u0430\u0431\u0430\u0433\u0430\u0442\u043e \u0435\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0456\u0448\u0438\u043c \u0454 \u043d\u0430\u0432\u0447\u0430\u043d\u043d\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443.&nbsp;<\/p>\n\n\n\n<p>\u0421\u0430\u043c\u0435 \u0446\u0435 \u0442\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u0448 \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0441\u044c\u043a\u0438\u0445 \u043a\u0443\u0440\u0441\u0430\u0445 \u0432\u0456\u0434 ITEDU. \u0420\u0435\u0454\u0441\u0442\u0440\u0443\u0439\u0441\u044f \u043d\u0430 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043a\u0443\u0440\u0441, \u0449\u043e\u0431 \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u043d\u0443\u0442\u0438 \u0441\u0432\u043e\u0457 \u043d\u0430\u0432\u0438\u0447\u043a\u0438 \u0437 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u043c\u0438 Linux, \u043c\u043e\u043d\u0456\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c \u0442\u0430 \u043b\u043e\u0433\u0443\u0432\u0430\u043d\u043d\u044f\u043c.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/itedu.center\/ua\/courses\/?utm_source=blog&amp;utm_medium=referral&amp;utm_campaign=blog_vstanovliuiemo-apache-kafka-na-ubuntu-24-04-za-5-krokiv\" data-wpel-link=\"internal\">\u041e\u0437\u043d\u0430\u0439\u043e\u043c\u0438\u0442\u0438\u0441\u044c \u0456\u0437 \u043a\u0443\u0440\u0441\u0430\u043c\u0438<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apache Kafka \u2014 \u0446\u0435 \u0440\u043e\u0437\u043f\u043e\u0434\u0456\u043b\u0435\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u043e\u0431\u043a\u0438 \u043f\u043e\u0442\u043e\u043a\u0456\u0432 \u0434\u0430\u043d\u0438\u0445 \u0437 \u0432\u0456\u0434\u043a\u0440\u0438\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c.\u00a0 \u0412\u043e\u043d\u0430 \u0434\u043e\u043f\u043e\u043c\u0430\u0433\u0430\u0454 \u0448\u0432\u0438\u0434\u043a\u043e \u0439 \u0441\u0442\u0430\u0431\u0456\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u0438\u0434\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0437 \u0442\u043e\u0447\u043a\u0438 \u0410 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0411 \u2014 \u0456\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0446\u043c\u0435\u0440\u0435\u0436, \u043e\u043d\u043b\u0430\u0439\u043d-\u0431\u0430\u043d\u043a\u0456\u043d\u0433\u0443, \u0430\u043d\u0430\u043b\u0456\u0442\u0438\u043a\u0438 \u0442\u0430 \u0431\u0443\u0434\u044c-\u044f\u043a\u0438\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u0406 \u044f\u043a\u0449\u043e \u0442\u0438 \u044e\u0437\u0430\u0454\u0448 Ubuntu 24.04, \u0442\u043e\u0434\u0456 \u043d\u0443\u043c\u043e \u0447\u0438\u0442\u0430\u0442\u0438 \u0433\u0430\u0439\u0434 \u0437\u0456 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f: \u043b\u0438\u0448\u0435 5 \u043a\u0440\u043e\u043a\u0456\u0432 \u0456 \u0442\u0438 \u0432 \u0442\u0435\u043c\u0456. \u041a\u0440\u043e\u043a 1: \u043e\u043d\u043e\u0432\u0438 \u0441\u0432\u043e\u044e \u041e\u0421&hellip;<\/p>\n","protected":false},"author":18,"featured_media":39390,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[352],"tags":[556,18],"class_list":["post-37939","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-apache-kafka","tag-ubuntu"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"uk","enabled_languages":["uk"],"languages":{"uk":{"title":true,"content":true,"excerpt":false}}},"acf":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts\/37939","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/comments?post=37939"}],"version-history":[{"count":3,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts\/37939\/revisions"}],"predecessor-version":[{"id":37943,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/posts\/37939\/revisions\/37943"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/media\/39390"}],"wp:attachment":[{"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/media?parent=37939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/categories?post=37939"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itedu.center\/ua\/blog\/wp-json\/wp\/v2\/tags?post=37939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}