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

[modify install]

上级 a4e1157d
......@@ -6,10 +6,10 @@
########################################################
# 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 cluster_hostname2:6030
# secondEp cluster_hostname2:6030
# the full-qualified domain name (FQDN) of dnode
# fqdn hostname
......@@ -23,9 +23,6 @@
# log file's directory
# logDir /var/log/taos
# scriptDir file's directory
# scriptDir /var/log/taos
# data file's directory
# dataDir /var/lib/taos
......
......@@ -241,36 +241,17 @@ function install_config() {
# first full-qualified domain name (FQDN) for TDengine cluster system
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} :"
read firstFqdn
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 firstEp
while true; do
if [ ! -z "$firstFqdn" ]; then
# check the format of the firstFqdn
#if [[ $firstFqdn == $FQDN_PATTERN ]]; then
if [ ! -z "$firstEp" ]; then
# check the format of the firstEp
#if [[ $firstEp == $FQDN_PATTERN ]]; then
# Write the first FQDN to configuration file
${csudo} sed -i -r "s/#*\s*(first\s*).*/\1$firstFqdn/" ${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
${csudo} sed -i -r "s/#*\s*(firstEp\s*).*/\1$firstEp/" ${cfg_install_dir}/taos.cfg
break
#else
# read -p "Please enter the correct FQDN: " secondFqdn
#fi
else
break
fi
done
break
#else
# read -p "Please enter the correct FQDN: " firstFqdn
# read -p "Please enter the correct FQDN:port: " firstEp
#fi
else
break
......@@ -678,8 +659,8 @@ function install_TDengine() {
install_config
# Ask if to start the service
echo
echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
#echo
#echo -e "\033[44;32;1mTDengine is installed successfully!${NC}"
echo
echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg"
if ((${service_mod}==0)); then
......@@ -701,7 +682,10 @@ function install_TDengine() {
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 -e "\033[44;32;1mTDengine is installed successfully!${NC}"
echo
else # Only install client
install_bin
install_config
......
......@@ -105,8 +105,8 @@ elif [ $NODE -eq 8 ]; then
fi
echo " " >> $TAOS_CFG
echo "first ${HOSTNAME}:7100" >> $TAOS_CFG
echo "second ${HOSTNAME}:7200" >> $TAOS_CFG
echo "firstEp ${HOSTNAME}:7100" >> $TAOS_CFG
echo "secondEp ${HOSTNAME}:7200" >> $TAOS_CFG
echo "serverPort ${NODE}" >> $TAOS_CFG
echo "dataDir $DATA_DIR" >> $TAOS_CFG
echo "logDir $LOG_DIR" >> $TAOS_CFG
......@@ -147,5 +147,5 @@ echo "asyncLog 0" >> $TAOS_CFG
echo "numOfMnodes 1" >> $TAOS_CFG
echo "locale en_US.UTF-8" >> $TAOS_CFG
echo "fsync 0" >> $TAOS_CFG
echo " " >> $TAOS_CFG
......@@ -102,12 +102,12 @@ TAOS_FLAG=$PRG_DIR/flag
HOSTNAME=`hostname -f`
echo " " >> $TAOS_CFG
echo "first ${HOSTNAME}:7100" >> $TAOS_CFG
echo "second ${HOSTNAME}:7200" >> $TAOS_CFG
echo "firstEp ${HOSTNAME}:7100" >> $TAOS_CFG
echo "secondEp ${HOSTNAME}:7200" >> $TAOS_CFG
echo "serverPort 7100" >> $TAOS_CFG
echo "dataDir $DATA_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 "dDebugFlag 135" >> $TAOS_CFG
echo "mDebugFlag 135" >> $TAOS_CFG
......@@ -122,6 +122,7 @@ echo "tablemetakeeptimer 5" >> $TAOS_CFG
echo "wal 0" >> $TAOS_CFG
echo "asyncLog 0" >> $TAOS_CFG
echo "locale en_US.UTF-8" >> $TAOS_CFG
echo "enableCoreFile 1" >> $TAOS_CFG
echo " " >> $TAOS_CFG
ulimit -n 600000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册