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}"
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
else
echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos -h $serverFqdn${NC} in shell${NC}"
fi
fi
echo
echo
...
@@ -655,8 +815,8 @@ function update_TDengine() {
...
@@ -655,8 +815,8 @@ function update_TDengine() {
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
...
@@ -702,41 +862,54 @@ function install_TDengine() {
...
@@ -702,41 +862,54 @@ function install_TDengine() {
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}"
# 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
#else
echo-e"${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
# echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}"
fi
#fi
if[!-z"$firstEp"];then
if[!-z"$firstEp"];then
echo
tmpFqdn=${firstEp%%:*}
echo-e"${GREEN_DARK}Please run${NC}: taos -h $firstEp${GREEN_DARK} to login into cluster, then${NC}"
substr=":"
echo-e"${GREEN_DARK}execute ${NC}: create dnode 'newDnodeFQDN:port'; ${GREEN_DARK}to add this new node${NC}"
if[[$firstEp=~ $substr]];then
echo
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
fi
echo-e"\033[44;32;1mTDengine is installed successfully!${NC}"
echo-e"\033[44;32;1mTDengine is installed successfully!${NC}"
echo
echo
else# Only install client
else# Only install client
install_bin
install_bin
install_config
install_config
echo
echo
echo-e"\033[44;32;1mTDengine client is installed successfully!${NC}"
echo-e"\033[44;32;1mTDengine client is installed successfully!${NC}"
fi
fi
touch ~/.taos_history
touch ~/.taos_history
rm-rf$(tar-tf taos.tar.gz)
rm-rf$(tar-tf taos.tar.gz)
}
}
## ==============================Main program starts from here============================
## ==============================Main program starts from here============================
echo-e"${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
echo-e"${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
else
else
echo-e"${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power${NC} in shell${NC}"
echo-e"${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power -h $serverFqdn${NC} in shell${NC}"
fi
fi
echo
echo
...
@@ -686,17 +839,30 @@ function install_PowerDB() {
...
@@ -686,17 +839,30 @@ function install_PowerDB() {
echo-e"${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
# echo -e "${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${nginx_port}${NC}"
else
#else
echo-e"${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power${NC} in shell${NC}"
# echo -e "${GREEN_DARK}To access PowerDB ${NC}: use ${GREEN_UNDERLINE}power${NC} in shell${NC}"
fi
#fi
if[!-z"$firstEp"];then
if[!-z"$firstEp"];then
echo
tmpFqdn=${firstEp%%:*}
echo-e"${GREEN_DARK}Please run${NC}: power -h $firstEp${GREEN_DARK} to login into cluster, then${NC}"
substr=":"
if[[$firstEp=~ $substr]];then
tmpPort=${firstEp#*:}
else
tmpPort=""
fi
if[["$tmpPort"!=""]];then
echo-e"${GREEN_DARK}To access PowerDB ${NC}: power -h $tmpFqdn -P $tmpPort${GREEN_DARK} to login into cluster, then${NC}"
else
echo-e"${GREEN_DARK}To access PowerDB ${NC}: power -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-e"${GREEN_DARK}execute ${NC}: create dnode 'newDnodeFQDN:port'; ${GREEN_DARK}to add this new node${NC}"
echo
echo
elif[!-z"$serverFqdn"];then
echo-e"${GREEN_DARK}To access PowerDB ${NC}: power -h $serverFqdn${GREEN_DARK} to login into PowerDB server${NC}"
echo
fi
fi
echo-e"\033[44;32;1mPowerDB is installed successfully!${NC}"
echo-e"\033[44;32;1mPowerDB is installed successfully!${NC}"
echo
echo
...
@@ -713,6 +879,7 @@ function install_PowerDB() {
...
@@ -713,6 +879,7 @@ function install_PowerDB() {
## ==============================Main program starts from here============================
## ==============================Main program starts from here============================