Skip to content

Commit c052fa4

Browse files
authored
Merge pull request #33188 from taosdata/fix/install-lite
fix: conditionally copy scripts and update configuration instructions for non-lite package mode
2 parents 17e0c54 + 50bbed3 commit c052fa4

File tree

1 file changed

+59
-46
lines changed

1 file changed

+59
-46
lines changed

packaging/tools/install.sh

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ function install_bin() {
267267
${csudo}cp -r ${script_dir}/bin/remove.sh ${install_main_dir}/bin
268268
else
269269
${csudo}cp -r ${script_dir}/bin/* ${install_main_dir}/bin
270-
${csudo}cp ${script_dir}/start-all.sh ${install_main_dir}/bin
271-
${csudo}cp ${script_dir}/stop-all.sh ${install_main_dir}/bin
270+
if [ "${pkgMode}" != "lite" ]; then
271+
${csudo}cp ${script_dir}/start-all.sh ${install_main_dir}/bin
272+
${csudo}cp ${script_dir}/stop-all.sh ${install_main_dir}/bin
273+
fi
272274
fi
273275

274276
if [[ "${verMode}" == "cluster" && "${verType}" != "client" ]]; then
@@ -285,10 +287,12 @@ function install_bin() {
285287
fi
286288

287289
# set taos_malloc.sh as bin script
288-
if [ -f ${script_dir}/bin/${set_malloc_bin} ] && [ "${verType}" != "client" ]; then
289-
${csudo}cp -r ${script_dir}/bin/${set_malloc_bin} ${install_main_dir}/bin
290-
else
291-
echo -e "${RED}Warning: ${set_malloc_bin} not found in bin directory.${NC}"
290+
if [ "${pkgMode}" != "lite" ]; then
291+
if [[ -f ${script_dir}/bin/${set_malloc_bin} && "${verType}" != "client" ]]; then
292+
${csudo}cp -r ${script_dir}/bin/${set_malloc_bin} ${install_main_dir}/bin
293+
else
294+
echo -e "${RED}Warning: ${set_malloc_bin} not found in bin directory.${NC}"
295+
fi
292296
fi
293297

294298

@@ -336,7 +340,6 @@ function install_lib() {
336340
[ -f "${jemalloc_file}" ] && ${csudo}ln -sf "${jemalloc_file}" "${driver_path}/libjemalloc.so" || echo "jemalloc file not found: ${jemalloc_file}"
337341
[ -f "${tcmalloc_file}" ] && ${csudo}ln -sf "${tcmalloc_file}" "${driver_path}/libtcmalloc.so" || echo "tcmalloc file not found: ${tcmalloc_file}"
338342

339-
340343
#link lib64/link_dir
341344
if [[ -d ${lib64_link_dir} && ! -e ${lib64_link_dir}/libtaos.so ]]; then
342345
${csudo}ln -sf ${driver_path}/libtaos.* ${lib64_link_dir}/libtaos.so.1 || :
@@ -951,50 +954,60 @@ function finished_install_info(){
951954
echo
952955

953956
# collect pairs "label|value"
954-
entries+=("To configure ${PREFIX}d:|edit ${configDir}/${configFile}")
955-
if [ -f "${configDir}/${adapterName}.toml" ] && [ -f "${installDir}/bin/${adapterName}" ]; then
956-
entries+=("To configure ${clientName}Adapter:|edit ${configDir}/${adapterName}.toml")
957-
fi
958-
entries+=("To configure ${clientName}Keeper:|edit ${configDir}/${keeperName}.toml")
959-
entries+=("To configure ${clientName}X:|edit ${configDir}/${xname}.toml")
960-
entries+=("To configure ${clientName}Explorer:|edit ${configDir}/explorer.toml")
961-
962-
# insert a blank line between config and start
963-
entries+=("|")
964-
965-
if ((${service_mod} == 0)); then
966-
entries+=("To start ${PREFIX}d:|${csudo}systemctl start ${serverName}")
967-
if [ -f "${service_config_dir}/${clientName}adapter.service" ] && [ -f "${installDir}/bin/${clientName}adapter" ]; then
968-
entries+=("To start ${clientName}Adapter:|${csudo}systemctl start ${clientName}adapter")
969-
fi
970-
elif ((${service_mod} == 1)); then
971-
entries+=("To start ${productName} server:|${csudo}service ${serverName} start")
972-
if [ -f "${service_config_dir}/${clientName}adapter.service" ] && [ -f "${installDir}/bin/${clientName}adapter" ]; then
973-
entries+=("To start ${clientName}Adapter:|${csudo}service ${clientName}adapter start")
957+
if [ "${pkgMode}" != "lite" ]; then
958+
entries+=("To configure ${PREFIX}d:|edit ${configDir}/${configFile}")
959+
if [[ -f "${configDir}/${adapterName}.toml" && -f "${installDir}/bin/${adapterName}" ]]; then
960+
entries+=("To configure ${clientName}Adapter:|edit ${configDir}/${adapterName}.toml")
974961
fi
975-
else
976-
entries+=("To start ${productName} server:|${serverName}")
977-
if [ -f "${installDir}/bin/${clientName}adapter" ]; then
978-
entries+=("To start ${clientName}Adapter:|${clientName}adapter")
962+
963+
entries+=("To configure ${clientName}Keeper:|edit ${configDir}/${keeperName}.toml")
964+
entries+=("To configure ${clientName}X:|edit ${configDir}/${xname}.toml")
965+
entries+=("To configure ${clientName}Explorer:|edit ${configDir}/explorer.toml")
966+
967+
# insert a blank line between config and start
968+
entries+=("|")
969+
970+
if ((service_mod == 0)); then
971+
entries+=("To start ${PREFIX}d:|${csudo}systemctl start ${serverName}")
972+
if [[ -f "${service_config_dir}/${clientName}adapter.service" && -f "${installDir}/bin/${clientName}adapter" ]]; then
973+
entries+=("To start ${clientName}Adapter:|${csudo}systemctl start ${clientName}adapter")
974+
fi
975+
elif ((service_mod == 1)); then
976+
entries+=("To start ${productName} server:|${csudo}service ${serverName} start")
977+
if [[ -f "${service_config_dir}/${clientName}adapter.service" && -f "${installDir}/bin/${clientName}adapter" ]]; then
978+
entries+=("To start ${clientName}Adapter:|${csudo}service ${clientName}adapter start")
979+
fi
980+
else
981+
entries+=("To start ${productName} server:|${serverName}")
982+
if [ -f "${installDir}/bin/${clientName}adapter" ]; then
983+
entries+=("To start ${clientName}Adapter:|${clientName}adapter")
984+
fi
979985
fi
980-
fi
981986

982-
entries+=("To start ${clientName}Keeper:|${csudo}systemctl start ${clientName}keeper")
987+
entries+=("To start ${clientName}Keeper:|${csudo}systemctl start ${clientName}keeper")
983988

984-
if [ "$verMode" == "cluster" ] && [ "${entMode}" != "lite" ]; then
985-
entries+=("To start ${clientName}X:|${csudo}systemctl start ${clientName}x")
986-
fi
987-
entries+=("To start ${clientName}Explorer:|${csudo}systemctl start ${clientName}-explorer")
988-
entries+=("To start all the components:|${csudo}start-all.sh")
989-
entries+=("|")
990-
991-
entries+=("To access ${productName} CLI:|${clientName} -h $serverFqdn")
992-
entries+=("To access ${productName} GUI:|http://$serverFqdn:6060")
993-
entries+=("|")
989+
if [ "$verMode" == "cluster" ] && [ "${entMode}" != "lite" ]; then
990+
entries+=("To start ${clientName}X:|${csudo}systemctl start ${clientName}x")
991+
fi
992+
entries+=("To start ${clientName}Explorer:|${csudo}systemctl start ${clientName}-explorer")
993+
entries+=("To start all the components:|${csudo}start-all.sh")
994+
entries+=("|")
995+
996+
entries+=("To access ${productName} CLI:|${clientName} -h $serverFqdn")
997+
entries+=("To access ${productName} GUI:|http://$serverFqdn:6060")
998+
entries+=("|")
994999

995-
if [ "$verMode" == "cluster" ]; then
996-
entries+=("To read the user manual:|http://$serverFqdn:6060/docs-en")
997-
entries+=("To manage, analyze and visualize data:|https://tdengine.com/idmp/")
1000+
if [ "${verMode}" == "cluster" ]; then
1001+
entries+=("To read the user manual:|http://$serverFqdn:6060/docs-en")
1002+
entries+=("To manage, analyze and visualize data:|https://tdengine.com/idmp/")
1003+
else
1004+
entries+=("To read the user manual:|https://docs.tdengine.com")
1005+
fi
1006+
else
1007+
entries+=("To configure ${PREFIX}d:|edit ${configDir}/${configFile}")
1008+
entries+=("To start ${PREFIX}d:|${csudo}systemctl start ${serverName}")
1009+
entries+=("To access ${productName} CLI:|${clientName} -h $serverFqdn")
1010+
entries+=("To read the user manual:|https://docs.tdengine.com")
9981011
fi
9991012

10001013
# compute max label length

0 commit comments

Comments
 (0)