Redpanda is a Kafka®-compatible streaming data platform that boasts of being 10x faster and 6x more cost efficient. It is also JVM-free, ZooKeeper®-free, Jepsen-tested and source available. It is distributed as a single binary with everything thus allowing you to deploy in minutes.
It works natively with Kafka tools.
Related content:
- How to install Apache Kafka on Ubuntu 22.04
- How to install Apache Kafka on Rocky/Alma Linux 9
- How to run Apache Kafka in Docker and Docker Compose
Installing Redpanda
First start by ensuring that OS packages are up to date
sudo apt update
sudo apt upgradeRun the setup script to download and install the repo
curl -1sLf 'https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bashYou should see output similar to this
$ curl -1sLf 'https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash
Executing the setup script for the 'redpanda/redpanda' repository ...
OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'apt-get' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=debian version=11 codename=bullseye arch=x86_64
>>>>:
NOPE: Checking for apt dependency 'apt-transport-https' ...
OK: Updating apt repository metadata cache ...
OK: Attempting to install 'apt-transport-https' ...
OK: Checking for apt dependency 'ca-certificates' ...
OK: Checking for apt dependency 'gnupg' ...
OK: Checking for apt signed-by key support ...
OK: Importing 'redpanda/redpanda' repository GPG key ...
OK: Checking if upstream install config is OK ...
OK: Installing 'redpanda/redpanda' repository via apt ...
OK: Updating apt repository metadata cache ...
OK: The repository has been installed successfully - You're ready to rock!Then install redpanda
sudo apt install redpandaWhen Redpanda is installed, it is set to run in development mode. To get the most out of the fastest queue in the west, enable production mode by running the following:
sudo rpk redpanda mode productionfollowed by:
sudo rpk tune allThis will autotune your system to give you the best performance from Redpanda.
Start and Enable redpanda
Start
sudo systemctl start redpandaVerify that Redpanda is up and running:
$ sudo systemctl status redpanda
● redpanda.service - Redpanda, the fastest queue in the West.
Loaded: loaded (/lib/systemd/system/redpanda.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-12-05 09:12:33 UTC; 43s ago
Main PID: 111348 (redpanda)
Status: "redpanda is ready! - v22.3.4 - 5be3e8e1454ab75da3f27f571c09e625570bebb2-dirty"
Tasks: 4 (limit: 8920)
Memory: 824.8M
CPU: 961ms
CGroup: /redpanda.slice/redpanda.service
└─111348 /opt/redpanda/bin/redpanda --redpanda-cfg /etc/redpanda/redpanda.yaml --unsafe-bypass-fsync=true --overprovisioned --lock-memory=false --reserve-memory=0M
Dec 05 09:12:33 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:33,831 [shard 0] cluster - config_manager.cc:126 - Completed bootstrap as leader
Dec 05 09:12:33 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:33,831 [shard 0] cluster - config_manager.cc:106 - Bootstrap complete (version 1)
Dec 05 09:12:33 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:33,850 [shard 0] features - feature_migrator.cc:102 - Successfully applied migration for feature cloud_retention
Dec 05 09:12:38 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:38,818 [shard 0] cluster - members_backend.cc:649 - [update: {{node_id: 0, type: added}}] reconciliation loop - pending reallocation count>
Dec 05 09:12:38 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:38,818 [shard 0] cluster - members_backend.cc:401 - [update: {{node_id: 0, type: added}}] there are 0 replicas in -1 domain, requested to >
Dec 05 09:12:38 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:38,818 [shard 0] cluster - members_backend.cc:401 - [update: {{node_id: 0, type: added}}] there are 0 replicas in 0 domain, requested to a>
Dec 05 09:12:38 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:38,818 [shard 0] cluster - members_backend.cc:659 - [update: {{node_id: 0, type: added}}] calculated reallocations: {}
Dec 05 09:12:38 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:38,818 [shard 0] cluster - members_backend.cc:784 - balance unevenness error - current: -nan, previous: 1, improvement: -nan
Dec 05 09:12:38 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:38,820 [shard 0] cluster - members_manager.cc:214 - Applying update to members_manager
Dec 05 09:12:43 fiddle-debiansrv rpk[111348]: INFO 2022-12-05 09:12:43,828 [shard 0] cluster - metrics_reporter.cc:315 - Initialized cluster_id to 8f3b6285-d181-46f9-b82a-509bf13793adNow enable redpanda on boot
sudo systemctl enable redpandaCongratulations, You now have a single-node cluster running Redpanda. The cluster will run on port :9092 and you can access it like you would access kafka.
Installing rpk
Redpanda Keeper (rpk) is a single binary application that provides a way to interact with your Redpanda clusters from the command line.
You can install rpk as part of a bundle that includes redpanda , or you can install the rpk binary separately.
To install the rpk binary as a standalone application, download the rpk archive:
curl -LO https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-linux-amd64.zipEnsure that you have the folder ~/.local/bin:
mkdir -p ~/.local/binAdd it to your $PATH:
export PATH="~/.local/bin:$PATH"Unzip the rpk files to your ~/.local/bin/ directory:
unzip rpk-linux-amd64.zip -d ~/.local/bin/After the files have been unzipped, run rpk version to display the rpk binary version.
rpk versionThe output displays the version number. For example:
v22.3.4 (rev 5be3e8e)Install Redpanda Console
To connect Redpanda Console to a Kafka cluster running on your local machine or in another Docker container:
docker run --network=host \<br> -e KAFKA_BROKERS=localhost:9092 \<br> docker.redpanda.com/vectorized/console:latestTo connect Redpanda Console to a remote Kafka cluster:
docker run -p 8080:8080 \<br> -e KAFKA_BROKERS=bootstrap.cluster-hash.redpanda.cloud:9092 \<br> -e KAFKA_TLS_ENABLED=true \<br> -e KAFKA_SASL_ENABLED=true \<br> -e KAFKA_SASL_MECHANISM=SCRAM-SHA-256 \<br> -e KAFKA_SASL_USERNAME=xxx \<br> -e KAFKA_SASL_PASSWORD=xxx \<br> docker.redpanda.com/vectorized/console:latestTo install the Redpanda Console package on Debian/Ubuntu, run the following commands:
curl -1sLf \<br> 'https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/setup/bash.deb.sh' \<br> | sudo -E bash<br> <br>sudo apt-get install redpanda-consoleStart the console
sudo systemctl start redpanda-consoleThe console will run in port 8080 and you can access it in your browser.
That is it, enjoy your Redpanda installation.