提交 0bc21b28 编写于 作者: H Hui Li

[modify install]

上级 a4e1157d
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
######################################################## ########################################################
# first full-qualified domain name (FQDN) for TDengine system # first full-qualified domain name (FQDN) for TDengine system
# first hostname1:6030 # firstEp hostname1:6030
# second full-qualified domain name (FQDN) for TDengine system, for cluster edition only # second full-qualified domain name (FQDN) for TDengine system, for cluster edition only
# second cluster_hostname2:6030 # secondEp cluster_hostname2:6030
# the full-qualified domain name (FQDN) of dnode # the full-qualified domain name (FQDN) of dnode
# fqdn hostname # fqdn hostname
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
# log file's directory # log file's directory
# logDir /var/log/taos # logDir /var/log/taos
# scriptDir file's directory
# scriptDir /var/log/taos
# data file's directory # data file's directory
# dataDir /var/lib/taos # dataDir /var/lib/taos
......
...@@ -241,36 +241,17 @@ function install_config() { ...@@ -241,36 +241,17 @@ function install_config() {
# first full-qualified domain name (FQDN) for TDengine cluster system # first full-qualified domain name (FQDN) for TDengine cluster system
echo echo
echo -e -n "${GREEN}Enter the FQDN of an existing TDengine cluster node to join${NC} OR ${GREEN}leave it blank to build one${NC} :" echo -e -n "${GREEN}Enter FQDN:port (like h1.taosdata.com:6030) of an existing TDengine cluster node to join OR leave it blank to build one${NC} :"
read firstFqdn read firstEp
while true; do while true; do
if [ ! -z "$firstFqdn" ]; then if [ ! -z "$firstEp" ]; then
# check the format of the firstFqdn # check the format of the firstEp
#if [[ $firstFqdn == $FQDN_PATTERN ]]; then #if [[ $firstEp == $FQDN_PATTERN ]]; then
# Write the first FQDN to configuration file # Write the first FQDN to configuration file
${csudo} sed -i -r "s/#*\s*(first\s*).*/\1$firstFqdn/" ${cfg_install_dir}/taos.cfg ${csudo} sed -i -r "s/#*\s*(firstEp\s*).*/\1$firstEp/" ${cfg_install_dir}/taos.cfg
# Get the second FQDN
echo
echo -e -n "${GREEN}Enter the FQDN of another node in cluster${NC} OR ${GREEN}leave it blank to skip${NC}: "
read secondFqdn
while true; do
if [ ! -z "$secondFqdn" ]; then
#if [[ $secondFqdn == $FQDN_PATTERN ]]; then
# Write the second FQDN to configuration file
${csudo} sed -i -r "s/#*\s*(second\s*).*/\1$secondFqdn/" ${cfg_install_dir}/taos.cfg
break
#else
# read -p "Please enter the correct FQDN: " secondFqdn
#fi
else
break
fi
done
break break
#else #else
# read -p "Please enter the correct FQDN: " firstFqdn # read -p "Please enter the correct FQDN:port: " firstEp
#fi #fi
else else
break break
...@@ -584,7 +565,7 @@ function update_TDengine() { ...@@ -584,7 +565,7 @@ function update_TDengine() {
install_service install_service
install_config install_config
if [ "$verMode" == "cluster" ]; then if [ "$verMode" == "cluster" ]; then
# Check if openresty is installed # Check if openresty is installed
openresty_work=false openresty_work=false
...@@ -597,7 +578,7 @@ function update_TDengine() { ...@@ -597,7 +578,7 @@ function update_TDengine() {
echo -e "\033[44;31;5mNginx for TDengine does not work! Please try again!\033[0m" echo -e "\033[44;31;5mNginx for TDengine does not work! Please try again!\033[0m"
fi fi
fi fi
fi fi
echo echo
echo -e "\033[44;32;1mTDengine is updated successfully!${NC}" echo -e "\033[44;32;1mTDengine is updated successfully!${NC}"
...@@ -678,8 +659,8 @@ function install_TDengine() { ...@@ -678,8 +659,8 @@ function install_TDengine() {
install_config install_config
# Ask if to start the service # Ask if to start the service
echo #echo
echo -e "\033[44;32;1mTDengine is installed successfully!${NC}" #echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
echo echo
echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg" echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg"
if ((${service_mod}==0)); then if ((${service_mod}==0)); then
...@@ -700,8 +681,11 @@ function install_TDengine() { ...@@ -700,8 +681,11 @@ function install_TDengine() {
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
echo
echo -e "${GREEN_DARK}Please run${NC}: taos -h $firstEp ${GREEN_DARK} to login into cluster, then execute ${NC}: create dnode 'selfEp'; ${GREEN_DARK}in TAOS shell to add this new node into the clsuter${NC}"
echo echo
echo -e "\033[44;32;1mTDengine is installed successfully!${NC}" echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
echo
else # Only install client else # Only install client
install_bin install_bin
install_config install_config
......
...@@ -104,48 +104,48 @@ elif [ $NODE -eq 8 ]; then ...@@ -104,48 +104,48 @@ elif [ $NODE -eq 8 ]; then
NODE=7800 NODE=7800
fi fi
echo " " >> $TAOS_CFG echo " " >> $TAOS_CFG
echo "first ${HOSTNAME}:7100" >> $TAOS_CFG echo "firstEp ${HOSTNAME}:7100" >> $TAOS_CFG
echo "second ${HOSTNAME}:7200" >> $TAOS_CFG echo "secondEp ${HOSTNAME}:7200" >> $TAOS_CFG
echo "serverPort ${NODE}" >> $TAOS_CFG echo "serverPort ${NODE}" >> $TAOS_CFG
echo "dataDir $DATA_DIR" >> $TAOS_CFG echo "dataDir $DATA_DIR" >> $TAOS_CFG
echo "logDir $LOG_DIR" >> $TAOS_CFG echo "logDir $LOG_DIR" >> $TAOS_CFG
echo "debugFlag 0" >> $TAOS_CFG echo "debugFlag 0" >> $TAOS_CFG
echo "mDebugFlag 135" >> $TAOS_CFG echo "mDebugFlag 135" >> $TAOS_CFG
echo "sdbDebugFlag 135" >> $TAOS_CFG echo "sdbDebugFlag 135" >> $TAOS_CFG
echo "dDebugFlag 135" >> $TAOS_CFG echo "dDebugFlag 135" >> $TAOS_CFG
echo "vDebugFlag 135" >> $TAOS_CFG echo "vDebugFlag 135" >> $TAOS_CFG
echo "tsdbDebugFlag 135" >> $TAOS_CFG echo "tsdbDebugFlag 135" >> $TAOS_CFG
echo "cDebugFlag 135" >> $TAOS_CFG echo "cDebugFlag 135" >> $TAOS_CFG
echo "jnidebugFlag 135" >> $TAOS_CFG echo "jnidebugFlag 135" >> $TAOS_CFG
echo "odbcdebugFlag 135" >> $TAOS_CFG echo "odbcdebugFlag 135" >> $TAOS_CFG
echo "httpDebugFlag 143" >> $TAOS_CFG echo "httpDebugFlag 143" >> $TAOS_CFG
echo "monitorDebugFlag 135" >> $TAOS_CFG echo "monitorDebugFlag 135" >> $TAOS_CFG
echo "mqttDebugFlag 135" >> $TAOS_CFG echo "mqttDebugFlag 135" >> $TAOS_CFG
echo "qdebugFlag 135" >> $TAOS_CFG echo "qdebugFlag 135" >> $TAOS_CFG
echo "rpcDebugFlag 135" >> $TAOS_CFG echo "rpcDebugFlag 135" >> $TAOS_CFG
echo "tmrDebugFlag 131" >> $TAOS_CFG echo "tmrDebugFlag 131" >> $TAOS_CFG
echo "udebugFlag 135" >> $TAOS_CFG echo "udebugFlag 135" >> $TAOS_CFG
echo "sdebugFlag 135" >> $TAOS_CFG echo "sdebugFlag 135" >> $TAOS_CFG
echo "wdebugFlag 135" >> $TAOS_CFG echo "wdebugFlag 135" >> $TAOS_CFG
echo "monitor 0" >> $TAOS_CFG echo "monitor 0" >> $TAOS_CFG
echo "monitorInterval 1" >> $TAOS_CFG echo "monitorInterval 1" >> $TAOS_CFG
echo "http 0" >> $TAOS_CFG echo "http 0" >> $TAOS_CFG
echo "numOfThreadsPerCore 2.0" >> $TAOS_CFG echo "numOfThreadsPerCore 2.0" >> $TAOS_CFG
echo "defaultPass taosdata" >> $TAOS_CFG echo "defaultPass taosdata" >> $TAOS_CFG
echo "numOfLogLines 20000000" >> $TAOS_CFG echo "numOfLogLines 20000000" >> $TAOS_CFG
echo "mnodeEqualVnodeNum 0" >> $TAOS_CFG echo "mnodeEqualVnodeNum 0" >> $TAOS_CFG
echo "clog 2" >> $TAOS_CFG echo "clog 2" >> $TAOS_CFG
#echo "cache 1" >> $TAOS_CFG #echo "cache 1" >> $TAOS_CFG
#echo "block 2" >> $TAOS_CFG #echo "block 2" >> $TAOS_CFG
echo "statusInterval 1" >> $TAOS_CFG echo "statusInterval 1" >> $TAOS_CFG
echo "maxVgroupsPerDb 4" >> $TAOS_CFG echo "maxVgroupsPerDb 4" >> $TAOS_CFG
echo "minTablesPerVnode 4" >> $TAOS_CFG echo "minTablesPerVnode 4" >> $TAOS_CFG
echo "maxTablesPerVnode 1000" >> $TAOS_CFG echo "maxTablesPerVnode 1000" >> $TAOS_CFG
echo "tableIncStepPerVnode 10000" >> $TAOS_CFG echo "tableIncStepPerVnode 10000" >> $TAOS_CFG
echo "asyncLog 0" >> $TAOS_CFG echo "asyncLog 0" >> $TAOS_CFG
echo "numOfMnodes 1" >> $TAOS_CFG echo "numOfMnodes 1" >> $TAOS_CFG
echo "locale en_US.UTF-8" >> $TAOS_CFG echo "locale en_US.UTF-8" >> $TAOS_CFG
echo "fsync 0" >> $TAOS_CFG echo "fsync 0" >> $TAOS_CFG
echo " " >> $TAOS_CFG
...@@ -101,28 +101,29 @@ TAOS_FLAG=$PRG_DIR/flag ...@@ -101,28 +101,29 @@ TAOS_FLAG=$PRG_DIR/flag
HOSTNAME=`hostname -f` HOSTNAME=`hostname -f`
echo " " >> $TAOS_CFG echo " " >> $TAOS_CFG
echo "first ${HOSTNAME}:7100" >> $TAOS_CFG echo "firstEp ${HOSTNAME}:7100" >> $TAOS_CFG
echo "second ${HOSTNAME}:7200" >> $TAOS_CFG echo "secondEp ${HOSTNAME}:7200" >> $TAOS_CFG
echo "serverPort 7100" >> $TAOS_CFG echo "serverPort 7100" >> $TAOS_CFG
echo "dataDir $DATA_DIR" >> $TAOS_CFG echo "dataDir $DATA_DIR" >> $TAOS_CFG
echo "logDir $LOG_DIR" >> $TAOS_CFG echo "logDir $LOG_DIR" >> $TAOS_CFG
echo "scriptDir ${CODE_DIR}/../script">> $TAOS_CFG echo "scriptDir ${CODE_DIR}/../script" >> $TAOS_CFG
echo "numOfLogLines 100000000" >> $TAOS_CFG echo "numOfLogLines 100000000" >> $TAOS_CFG
echo "dDebugFlag 135" >> $TAOS_CFG echo "dDebugFlag 135" >> $TAOS_CFG
echo "mDebugFlag 135" >> $TAOS_CFG echo "mDebugFlag 135" >> $TAOS_CFG
echo "sdbDebugFlag 135" >> $TAOS_CFG echo "sdbDebugFlag 135" >> $TAOS_CFG
echo "rpcDebugFlag 135" >> $TAOS_CFG echo "rpcDebugFlag 135" >> $TAOS_CFG
echo "tmrDebugFlag 131" >> $TAOS_CFG echo "tmrDebugFlag 131" >> $TAOS_CFG
echo "cDebugFlag 135" >> $TAOS_CFG echo "cDebugFlag 135" >> $TAOS_CFG
echo "httpDebugFlag 135" >> $TAOS_CFG echo "httpDebugFlag 135" >> $TAOS_CFG
echo "monitorDebugFlag 135" >> $TAOS_CFG echo "monitorDebugFlag 135" >> $TAOS_CFG
echo "udebugFlag 135" >> $TAOS_CFG echo "udebugFlag 135" >> $TAOS_CFG
echo "tablemetakeeptimer 5" >> $TAOS_CFG echo "tablemetakeeptimer 5" >> $TAOS_CFG
echo "wal 0" >> $TAOS_CFG echo "wal 0" >> $TAOS_CFG
echo "asyncLog 0" >> $TAOS_CFG echo "asyncLog 0" >> $TAOS_CFG
echo "locale en_US.UTF-8" >> $TAOS_CFG echo "locale en_US.UTF-8" >> $TAOS_CFG
echo " " >> $TAOS_CFG echo "enableCoreFile 1" >> $TAOS_CFG
echo " " >> $TAOS_CFG
ulimit -n 600000 ulimit -n 600000
ulimit -c unlimited ulimit -c unlimited
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册