Configuring the Deployment Environment
Configure the server deployment environment on multiple nodes to ensure a standardized operating environment for subsequent deployment.
- Log in to all nodes in sequence and change their host names to server1, agent1, agent2 and agent3.
hostnamectl set-hostname host_name --static
- Log in to each node and add the mapping between the IP addresses and host names.
- Open the /etc/hosts file.
1vi /etc/hosts - Press i to enter the insert mode and add the following information to the hosts file. Change the IP address based on the site requirements.
1 2 3 4
IPaddress1 server1 IPaddress2 agent1 IPaddress3 agent2 IPaddress4 agent3
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/hosts file.
- Log in to each node and disable the firewall.
1 2
systemctl stop firewalld.service systemctl disable firewalld.service
- Log in to each node and configure SSH password-free login.
- Generate a key and press Enter if any message is prompted.
1ssh-keygen -t rsa
- Enable password-free SSH login on each node (including password-free login for the local node):
1ssh-copy-id -i ~/.ssh/id_rsa.pub root@node_IP_address
- Generate a key and press Enter if any message is prompted.
- Log in to each node and install OpenJDK.
- Download OpenJDK archive and decompress it to the /usr/local directory.
- Arm:
1 2
wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz tar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz -C /usr/local
- x86:
1 2
wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz tar -zxf OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz -C /usr/local
- Arm:
- Change the owner and group of the extracted JDK directory to root.
1 2
chown -R root /usr/local/jdk8u252-b09 chgrp -R root /usr/local/jdk8u252-b09
- Configure environment variables.
- Open the /etc/profile file.
1vi /etc/profile - Press i to enter the insert mode and add the following content to the file:
1 2
export JAVA_HOME=/usr/local/jdk8u252-b09 export PATH=$JAVA_HOME/bin:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/profile file.
- Make the environment variables take effect.
1source /etc/profile
- Check whether OpenJDK is successfully installed.
1java -versionThe installation is successful if information similar to the following is displayed:

- Download OpenJDK archive and decompress it to the /usr/local directory.
- Deploy ZooKeeper. For details, see Deploying ZooKeeper to Running and Verifying ZooKeeper in ZooKeeper Deployment Guide.
- Deploy Hadoop. For details, see Compiling and Decompressing Hadoop to Verifying Hadoop in Hadoop Deployment Guide.
Parent topic: Deployment Guide (CentOS & openEuler)