diff --git a/install.sh b/install.sh index 2a113ad..fae97b3 100644 --- a/install.sh +++ b/install.sh @@ -13,11 +13,15 @@ # limitations under the License. ## #!/bin/bash + +mkdir -p /tmp/openlookeng +chmod 777 /tmp/openlookeng + export wget_url=https://download.openlookeng.io declare openlk_version= declare version_arr= declare package_name=openlookeng.tar.gz -declare install_path=/opt/openlookeng +declare install_path=/tmp/openlookeng declare DEFAULT_MAX_SPLITS_PER_NODE_VALUE=100 declare DEFAULT_MAX_PENDING_SPLITS_PER_TASK_VALUE=10 declare CLUSTER_PASS @@ -201,16 +205,16 @@ function download() URL="$wget_url/auto-install/$package_name" if type wget &>/dev/null then - echo "wget -O /opt/$package_name.sha256sum $URL.sha256sum" - wget -O /opt/$package_name.sha256sum $URL.sha256sum - echo "wget -O /opt/$package_name $URL" - wget -O /opt/$package_name $URL + echo "wget -O /tmp/$package_name.sha256sum $URL.sha256sum" + wget -O /tmp/$package_name.sha256sum $URL.sha256sum + echo "wget -O /tmp/$package_name $URL" + wget -O /tmp/$package_name $URL elif type curl &>/dev/null then #wget -P . "$URL" - curl -fsSL -o /opt/$package_name.sha256sum $URL.sha256sum - echo "curl -fsSL -o /opt/$package_name $URL" - curl -fsSL -o /opt/$package_name $URL + curl -fsSL -o /tmp/$package_name.sha256sum $URL.sha256sum + echo "curl -fsSL -o /tmp/$package_name $URL" + curl -fsSL -o /tmp/$package_name $URL fi # download failed if test $? -ne 0 @@ -223,7 +227,7 @@ function download() function verify_unpack() { #1.check package - cd /opt &> /dev/null + cd /tmp &> /dev/null echo "[INFO] Starting verification package..." res=$(sha256sum -c ${package_name}.sha256sum|grep OK|wc -l) if [[ $res > 0 ]] @@ -236,8 +240,8 @@ function verify_unpack() fi #cd - &> /dev/null #2.extracting package - echo "[INFO] Extracting package ${package_name} to /opt ..." - tar -zxvf $package_name -C /opt &> /dev/null + echo "[INFO] Extracting package ${package_name} to /tmp ..." + tar -zxvf $package_name -C /tmp &> /dev/null if [[ $? != 0 ]] then exit 1 @@ -333,8 +337,8 @@ function create_user() #bash $OPENLOOKENG_BIN_THIRD_PATH/hetu_adduser.sh # will create user before continue else - . $OPENLOOKENG_BIN_THIRD_PATH/cpresource_remote.sh $ip $OPENLOOKENG_BIN_THIRD_PATH/hetu_adduser.sh /opt - . $OPENLOOKENG_BIN_THIRD_PATH/execute_remote.sh $ip "bash /opt/hetu_adduser.sh;rm -rf /opt/hetu_adduser.sh;exit" + . $OPENLOOKENG_BIN_THIRD_PATH/cpresource_remote.sh $ip $OPENLOOKENG_BIN_THIRD_PATH/hetu_adduser.sh /tmp + . $OPENLOOKENG_BIN_THIRD_PATH/execute_remote.sh $ip "bash /tmp/hetu_adduser.sh;rm -rf /tmp/hetu_adduser.sh;exit" fi done diff --git a/openlookeng/bin/auxiliary_tools/pathfile b/openlookeng/bin/auxiliary_tools/pathfile index ab1a4ee..7c664eb 100644 --- a/openlookeng/bin/auxiliary_tools/pathfile +++ b/openlookeng/bin/auxiliary_tools/pathfile @@ -13,7 +13,7 @@ # limitations under the License. ## #bin/pathfile -INSTALL_PATH=/opt/openlookeng +INSTALL_PATH=/tmp/openlookeng OPENLOOKENG_DEPENDENCIES_PATH=$INSTALL_PATH/resource OEPNLKADMIN_PATH=/home/openlkadmin/.openlkadmin CLUSTER_CONFIG_INFO=$OEPNLKADMIN_PATH/cluster_config_info @@ -21,4 +21,4 @@ CLUSTER_NODE_INFO=$OEPNLKADMIN_PATH/cluster_node_info OPENLOOKENG_BIN_PATH=$INSTALL_PATH/bin OPENLOOKENG_BIN_THIRD_PATH=$OPENLOOKENG_BIN_PATH/auxiliary_tools -export INSTALL_PATH OPENLOOKENG_DEPENDENCIES_PATH OEPNLKADMIN_PATH OPENLOOKENG_BIN_PATH OPENLOOKENG_BIN_THIRD_PATH \ No newline at end of file +export INSTALL_PATH OPENLOOKENG_DEPENDENCIES_PATH OEPNLKADMIN_PATH OPENLOOKENG_BIN_PATH OPENLOOKENG_BIN_THIRD_PATH