jazz/drbl-ganglia: drbl-ganglia.sh

File drbl-ganglia.sh, 1.2 KB (added by jazz, 15 years ago)
Line 
1#!/bin/bash
2
3function install_drbl()
4{
5  echo "Installing Diskless Remote Boot in Linux ...."
6  echo "deb http://free.nchc.org.tw/drbl-core drbl stable" > drbl.list
7  sudo mv drbl.list /etc/apt/sources.list.d/
8  wget http://drbl.nchc.org.tw/GPG-KEY-DRBL
9  sudo apt-key add GPG-KEY-DRBL
10  rm GPG-KEY-DRBL
11  sudo apt-get update
12  sudo apt-get install drbl
13  sudo /opt/drbl/sbin/drblsrv -i
14  sudo /opt/drbl/sbin/drblpush -i
15}
16
17function install_ganglia()
18{
19  echo "Installing Ganglia ...."
20  sudo apt-get install gmetad ganglia-monitor
21  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
22  echo "deb http://free.nchc.org.tw/debian testing main" > testing.list
23  sudo mv testing.list /etc/apt/sources.list.d/
24  sudo apt-get update
25  sudo apt-get install ganglia-webfrontend
26  sudo rm /etc/apt/sources.list.d/testing.list
27  sudo apt-get update
28}
29
30function configure_gmetad()
31{
32  echo "Configuring gmetad ..."
33}
34
35function configure_gmom()
36{
37  echo "Configuring gmom ..."
38}
39
40if [ ! -d /opt/drbl ]; then
41  install_drbl
42fi
43
44if [ ! -f /usr/sbin/gmond ] || [ ! -f /usr/sbin/gmetad ]; then
45  install_ganglia
46fi