Installing Docker
Install Docker and deploy multiple containers to set up the Flink environment. If the server cannot connect to the Internet, configure a local yum repository according to your environment to ensure a smooth installation.
- Install Docker and import the basic image. For details, see Docker Installation Guide (CentOS & openEuler) .
cd /opt wget --no-check-certificate https://mirrors.huaweicloud.com/openeuler/openEuler-22.03-LTS-SP4/docker_img/aarch64/openEuler-docker.aarch64.tar.xz docker load < openEuler-docker.aarch64.tar.xz
- Create a network in bridge mode.
docker network create -d bridge flink-network
Check whether the network is created successfully.
docker network ls

- Create and start three Docker containers.The containers have the 8c32g specification, and are named flink_jm_8c32g, flink_tm1_8c32g, and flink_tm2_8c32g. After all containers are started, the command execution process automatically exits.
docker run -it -d --name flink_jm_8c32g --cpus=8 --memory=32g --network flink-network openeuler-22.03-lts-sp4 /bin/bash docker run -it -d --name flink_tm1_8c32g --cpus=8 --memory=32g --network flink-network openeuler-22.03-lts-sp4 /bin/bash docker run -it -d --name flink_tm2_8c32g --cpus=8 --memory=32g --network flink-network openeuler-22.03-lts-sp4 /bin/bash
- Query the container IDs.
docker ps
The first column in the following figure shows the container IDs.

- Log in to all containers, enable the SSH service in the containers, and configure password-free login.
- Log in to the containers in sequence and perform 5.b to 5.g.
docker exec -it flink_jm_8c32g /bin/bash docker exec -it flink_tm1_8c32g /bin/bash docker exec -it flink_tm2_8c32g /bin/bash
- Install the SSH service dependency, password change dependency, command editing dependency, command search dependency, and network management dependency. If other dependencies are missing in the image, install them by yourself.
yum -y install openssh-clients openssh-server passwd vim findutils net-tools libXext libXrender gcc cmake make gcc-c++ unzip wget libXtst
- Generate an RSA key.
ssh-keygen -A
- Enable the SSH service in the container.
/usr/sbin/sshd -D &
- Set a password for the container.
# Set the password of the current user. Remember the password. passwd
- Generate an RSA key again. When a message is displayed, press Enter.
ssh-keygen -t rsa
- Exit the container.
exit
- On the flink_jm_8c32g container, enable SSH password-free login to other containers.
docker exec -it flink_jm_8c32g /bin/bash ssh-copy-id -i ~/.ssh/id_rsa.pub root@flink_tm1_8c32g ssh-copy-id -i ~/.ssh/id_rsa.pub root@flink_tm2_8c32g
- Log in to the containers in sequence and perform 5.b to 5.g.
Parent topic: Installing the Basic Environment