From fcfe7e8af1d91cf049354bcc2c7fa344e76b376f Mon Sep 17 00:00:00 2001 From: lizw <1183409807@qq.com> Date: Sun, 30 Oct 2022 22:49:41 +0800 Subject: [PATCH] 07env-install-centos.sh --- 00base/07env-install-centos.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/00base/07env-install-centos.sh b/00base/07env-install-centos.sh index 84ca6cd..ff1c77d 100644 --- a/00base/07env-install-centos.sh +++ b/00base/07env-install-centos.sh @@ -370,10 +370,11 @@ function init:java() { local add_profile=`echo -e "${line}JAVA_HOME=${java_path}${line}PATH=\$JAVA_HOME/bin:\$PATH${line}export JAVA_HOME PATH"` command::exec "${host}" " if [ ! -d "$java_path" ]; then + mkdir -p ${BASE_DIR}/java wget --timeout=10 --waitretry=3 --tries=5 --retry-connrefused --no-check-certificate ${JDK_URL} -O ${BASE_DIR}/java/${JDK_FILE_NAME} cd ${BASE_DIR}/java tar -zxvf ${JDK_FILE_NAME} - echo -e '$add_sudoers' >> /etc/profile + echo -e '$add_profile' >> /etc/profile sudo source /etc/profile sudo chown -R \$(id -u):\$(id -g) ${BASE_DIR}/java fi