打印本文 打印本文 关闭窗口 关闭窗口
发布MySQL集群自动安装脚本1.0!
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1865  更新时间:2009/4/22 20:49:08  文章录入:mintao  责任编辑:mintao
COMPUTER_ID=$(($COMPUTER_ID + 1)) done #Write management server configuration for MGM in $MGMS do echo "[MGM]" >> $CLST_PATH/config.ini echo " HostName=$MGM" >> $CLST_PATH/config.ini echo "" >> $CLST_PATH/config.ini done #Write storage nodes configuration for DB in $DBS do echo "[DB]" >> $CLST_PATH/config.ini echo " ExecuteOnComputer=$DB" >> $CLST_PATH/config.ini echo "" >> $CLST_PATH/config.ini done #Write mysql servers configuration for API in $APIS do echo "[API]" >> $CLST_PATH/config.ini if [ 0 -ne $API ] then echo " ExecuteOnComputer=$API" >> $CLST_PATH/config.ini fi echo "" >> $CLST_PATH/config.ini done #Create Ndb.cfg echo "Create $CLST_PATH/Ndb.cfg" >> install.log echo "host=$MGM_HOST:$MGM_PORT" >> $CLST_PATH/Ndb.cfg echo "" >> $CLST_PATH/Ndb.cfg echo "Configurations! Cluster programs has been installed successfully." echo "" echo "1. To start management server(MGM), use the following command:" echo " cd $CLST_PATH" echo " ./ndb_mgmd" echo "" echo "2. To start stroage node(DB), use the following command:" echo " cd $CLST_PATH" echo " ./ndbd" echo "" echo "3. To manage the cluster, use the following command:" echo " cd $CLST_PATH" echo " ./ndb_mgm" echo "" echo "4. Else, nothing to do.;)" echo "" echo "Enjoy yourself." else echo "Cluster installation has been stopped, the reason is:"; echo " No database server installed." echo "So you can not use cluster programs in this machine!" fi fi
2. 设置脚本权限,让它可执行:chmod 755 install.sh
3. 执行该脚本:./install.sh 或者 ./install <MySQL安装目录>

具体使用说明,英语好的看脚本注释吧;英语不好的,那就再等等,过几天会release出来。

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口