docker-compose搭建kafka集群
安装docker
安装之前先卸载老旧的版本(如未装过忽略此步)
sudo apt-get remove docker docker-engine docker.io
首先,更新软件包索引,并且安装必要的依赖软件,来添加一个新的 HTTPS 软件源:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
导入源仓库的 GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
添加docker软件源
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
安装docker最新版
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io```
安装docker-compose
Linux 上我们可以从 Github 上下载它的二进制包来使用,最新发行的版本地址:https://github.com/docker/compose/releases。
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
授予可执行权限
sud