安装python:
python(检查是否安装)——》exit()
scp jdk-8u231-linux-x64.tar.gz slave01:/root/
scp jdk-8u231-linux-x64.tar.gz slave02:/root/
创建目录:mkdir /usr/java/
tar -zxvf jdk-8u231-linux-x64.tar.gz -C /usr/java/
(改变文件所有者)chown -R root:root /usr/java/jdk1.8.0_231
echo "export JAVA_HOME=/usr/java/jdk1.8.0_231" >> /etc/profile
echo "export PATH=${JAVA_HOME}/bin:${PATH}" >> /etc/profile
(使配置生效)source /etc/profile
(确认安装完成)which java
(删除安装包)cd /usr/java/——》rm -f jdk-8u231-linux-x64.tar.gz