echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
else
echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos -h $serverFqdn${NC} in shell${NC}"
fi
if((${prompt_force}==1));then
echo""
echo-e"${RED}Please run 'taosd --force-keep-file' at first time for the exist TDengine $exist_version!${NC}"
fi
echo
echo-e"\033[44;32;1mTDengine is updated successfully!${NC}"
else
else
install_bin
echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos -h $serverFqdn${NC} in shell${NC}"
install_config
fi
echo
if((${prompt_force}== 1));then
echo-e"\033[44;32;1mTDengine client is updated successfully!${NC}"
echo""
echo-e"${RED}Please run 'taosd --force-keep-file' at first time for the exist TDengine $exist_version!${NC}"
fi
fi
echo
echo-e"\033[44;32;1mTDengine is updated successfully!${NC}"
else
install_bin
install_config
rm-rf$(tar-tf taos.tar.gz)
echo
echo-e"\033[44;32;1mTDengine client is updated successfully!${NC}"
fi
rm-rf$(tar-tf taos.tar.gz)
}
}
function install_TDengine(){
function install_TDengine(){
# Start to install
# Start to install
if[!-e taos.tar.gz ];then
if[!-e taos.tar.gz ];then
echo"File taos.tar.gz does not exist"
echo"File taos.tar.gz does not exist"
exit 1
exit 1
fi
fi
tar-zxf taos.tar.gz
tar-zxf taos.tar.gz
echo-e"${GREEN}Start to install TDengine...${NC}"
echo-e"${GREEN}Start to install TDengine...${NC}"
install_main_path
install_main_path
if[-z$1];then
if[-z$1];then
install_data
install_data
fi
fi
install_log
install_log
install_header
install_header
install_lib
install_lib
install_jemalloc
install_jemalloc
#install_avro lib
#install_avro lib
#install_avro lib64
#install_avro lib64
if["$pagMode"!="lite"];then
if["$pagMode"!="lite"];then
install_connector
install_connector
fi
fi
install_examples
install_examples
if[-z$1];then# install service and client
if[-z$1];then# install service and client
# For installing new
# For installing new
install_bin
install_bin
install_service
install_service
install_taosadapter_service
install_taosadapter_service
openresty_work=false
if["$verMode"=="cluster"];then
# Check if nginx is installed successfully
if type curl &> /dev/null;then
if curl -sSf http://127.0.0.1:${nginx_port} &> /dev/null;then
echo-e"\033[44;32;1mNginx for TDengine is installed successfully!${NC}"
openresty_work=true
else
echo-e"\033[44;31;5mNginx for TDengine does not work! Please try again!\033[0m"
fi
fi
fi
install_config
openresty_work=false
if["$verMode"=="cluster"];then
# Ask if to start the service
# Check if nginx is installed successfully
#echo
if type curl &>/dev/null;then
#echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
if curl -sSf http://127.0.0.1:${nginx_port} &>/dev/null;then
echo
echo-e"\033[44;32;1mNginx for TDengine is installed successfully!${NC}"
# echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
#else
# echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
#fi
if[!-z"$firstEp"];then
tmpFqdn=${firstEp%%:*}
substr=":"
if[[$firstEp=~ $substr]];then
tmpPort=${firstEp#*:}
else
tmpPort=""
fi
if[["$tmpPort"!=""]];then
echo-e"${GREEN_DARK}To access TDengine ${NC}: taos -h $tmpFqdn -P $tmpPort${GREEN_DARK} to login into cluster, then${NC}"
else
echo-e"${GREEN_DARK}To access TDengine ${NC}: taos -h $tmpFqdn${GREEN_DARK} to login into cluster, then${NC}"
fi
echo-e"${GREEN_DARK}execute ${NC}: create dnode 'newDnodeFQDN:port'; ${GREEN_DARK}to add this new node${NC}"
echo
elif[!-z"$serverFqdn"];then
echo-e"${GREEN_DARK}To access TDengine ${NC}: taos -h $serverFqdn${GREEN_DARK} to login into TDengine server${NC}"
echo
fi
echo-e"\033[44;32;1mTDengine is installed successfully!${NC}"