Index: drbl-biocluster/BioCluster_Setup.sh
===================================================================
--- drbl-biocluster/BioCluster_Setup.sh	(revision 93)
+++ drbl-biocluster/BioCluster_Setup.sh	(revision 102)
@@ -1,23 +1,5 @@
 #!/bin/bash
 
-if [ ! -e /etc/debian_version ]; then
-  echo "本批次安裝檔目前僅適用 Debian 或 Ubuntu 系列，敬請見諒!!"
-  exit 1
-fi
-
-case "$1" in
-  clean)
-    sudo rm -rf add_path ape_2.3-1.tar.gz biocLite.R BioConductor.R blast gee_4.13-13.tar.gz GPG-KEY-DRBL lattice_0.17-25.tar.gz mito.nt.gz mpiblast-1.5.0-pio mpiBLAST-1.5.0-pio.tgz mpich2-1.0.8p1 mpich2-1.0.8p1.tar.gz nlme_3.1-92.tar.gz Rmpi_0.5-7.tar.gz torque-2.3.6 torque-2.3.6.tar.gz wwwblast-2.2.20-ia32-linux.tar.gz
-    exit 0;
-    ;;
-  install)
-    biocluster_setup
-    ;;
-  *)
-    echo "Usage: $0 [ install | clean ]"
-    ;;
-esac
-
-biocluster_setup()
+biocluster_install()
 {
 #####################################################################
@@ -67,7 +49,7 @@
   sudo R CMD INSTALL lattice_0.17-25.tar.gz
 fi
-if [ ! -e ape_2.3-1.tar.gz ]; then
-  wget http://cran.r-project.org/src/contrib/ape_2.3-1.tar.gz
-  sudo R CMD INSTALL ape_2.3-1.tar.gz
+if [ ! -e ape_2.3-2.tar.gz ]; then
+  wget http://cran.r-project.org/src/contrib/ape_2.3-2.tar.gz
+  sudo R CMD INSTALL ape_2.3-2.tar.gz
 fi
 #####################################################################
@@ -134,4 +116,18 @@
   sudo apt-get -y install linux-image-2.6.22.19-lustre-686 lustre-modules-2.6.22.19-lustre-686 lustre-utils 
 fi
+########
+# 安裝 Ganglia 叢集監控系統
+########
+if [ ! -f /usr/sbin/gmond ] || [ ! -f /usr/sbin/gmetad ]; then
+  echo "Installing Ganglia ...."
+  sudo apt-get install gmetad ganglia-monitor
+  sudo apt-get install rrdtool librrds-perl librrd-dev apache2 libapache2-mod-php5 php5-gd apache2-mpm-prefork apache2-utils apache2.2-common libapr1 libaprutil1 libmysqlclient15off libpq5 mysql-common openssl-blacklist ssl-cert
+  echo "deb http://free.nchc.org.tw/debian testing main" > testing.list
+  sudo mv testing.list /etc/apt/sources.list.d/
+  sudo apt-get update
+  sudo apt-get install ganglia-webfrontend
+  sudo rm /etc/apt/sources.list.d/testing.list
+  sudo apt-get update
+fi
 #####################################################################
 # 以下為叢集版本的生資相關軟體
@@ -196,2 +192,36 @@
 fi
 }
+
+function biocluster_config()
+{
+########
+# 設定 Torque
+########
+if [ -d /var/spool/torque/ ]; then
+  for i in `sudo ls /tftpboot/nodes/`
+  do 
+    sudo cp -r /var/spool/torque /tftpboot/nodes/$i/var/spool/
+  done
+fi
+}
+
+if [ ! -e /etc/debian_version ]; then
+  echo "本批次安裝檔目前僅適用 Debian 或 Ubuntu 系列，敬請見諒!!"
+  exit 1
+fi
+
+case "$1" in
+  clean)
+    sudo rm -rf add_path ape_2.3-1.tar.gz biocLite.R BioConductor.R blast gee_4.13-13.tar.gz GPG-KEY-DRBL lattice_0.17-25.tar.gz mito.nt.gz mpiblast-1.5.0-pio mpiBLAST-1.5.0-pio.tgz mpich2-1.0.8p1 mpich2-1.0.8p1.tar.gz nlme_3.1-92.tar.gz Rmpi_0.5-7.tar.gz torque-2.3.6 torque-2.3.6.tar.gz wwwblast-2.2.20-ia32-linux.tar.gz
+    exit 0;
+    ;;
+  install)
+    biocluster_install
+    ;;
+  config)
+    biocluster_config
+    ;;
+  *)
+    echo "Usage: $0 [ install | config | clean ]"
+    ;;
+esac
