Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Distributed Streaming with Apache Kafka and Python OpenCV

NotificationsYou must be signed in to change notification settings

akmamun/kafka-python-camera-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install And ConfigureApache Kafka,Java andZooKeeper

Let's making your Ubuntu up to date

sudo apt-get update -ysudo apt-get upgrade -y

Installing Java

Before installing Kafka, you will need to install Java, add this repository

sudo add-apt-repository -y ppa:webupd8team/java

Next, update the metadata of the new repository and install JDK 8

sudo apt-get updatesudo apt-get install oracle-java8-installer -y

Install ZooKeeper

sudo apt-get install zookeeperd

Install And Start Kafka Server

wget https://www-eu.apache.org/dist/kafka/2.1.1/kafka_2.11-2.1.1.tgz

If not work, download latest binary of apache kafka fromKafka official site

Next, create a directory for Kafka installation

sudo mkdir /opt/Kafkacd /opt/Kafka

Extract the downloaded archive using tar command in /opt/Kafka

sudo tar -xvf kafka_2.11-2.1.1.tgz -C /opt/Kafka/

Make Sure Server is Running

sudo /opt/Kafka/kafka_2.11-2.1.1/bin/kafka-server-start.sh /opt/Kafka/kafka_2.11-2.1.1/config/server.properties

Now create a sample topic with name "testing"

sudo /opt/Kafka/kafka_2.11-2.1.1/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1  --partitions 1 --topic testing

Now create environment and install Kafka-Python, Open-CV and Flask Server

pip install -r requirements.txt

Lets run Producer

python producer.py

Consumer

python consumer.py

Now Browse thishttp://localhost:5000/

Credit

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp