Crippa Andrea

Installare Bacula 5.0.2 su Centos 5.4 tramite VMWARE con supporto per MySQL e Gui WebMin

This entry was posted by admin ( Crippa Andrea ) on 2 May 2010 at 10:43 and have got 1117 reads . It's field under Linux and tagged , , , , , , , , , , , , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Configurare l’Ambiente Virtuale

1) – Create una Macchina Virtuale come Red Hat Linux 5
2) – Rimuovete la scheda di rete creata di Default
3) – Aggiungete una nuova scheda di rete come VMXNET3

NOTA BENE : Potresti preferire una Macchina Virtuale con 2 schede di rete : La prima dedicata all’accesso remoto (vedi SSH) e la seconda su una VLAN dedicata per il traffico legato alla funzione di LAN BACKUP.

Creazione del SISTEMA BASE

Installate Centos 5.4. Durante l’installazione, DESELEZIONATE :
– Desktop : gnome
Mettete lo spunto su “personalizza ora” , e selezionate su SVILUPPO :
– Librerie di Sviluppo
– Tool di Sviluppo
– Sviluppo del Software Antiquato
Selezionate su SISTEMA BASE
– Supporto del Software Antiquato

INSTALLARE E CONFIGURARE I VMWARE TOOL
– Iniziate l’installazione dei VMWare Tool
– Montate il CDROM
– Copiate il file .tar.gz in /tmp
– Smontate il CDROM
– Estraete la tarball (tar -zxf) and eseguite l’installazione (./vmware-install.pl)

Alla fine della installazione, eseguite i seguenti comandi :
kudzu
service network restart

– Configurate le impostazioni di rete, ramite /etc/sysconfig/network-scripts/ifcfg-eth0 come preferite

INSTALLARE IL DATABASE SERVER
Per installare il database , fate questo :
yum install mysql-server
yum install mysql-devel.i386

NOTA BENE : Potete installare MySQL anche durante il setup inziale, in questo caso lanciate solo l’installazione di mysql-devel.i386

SCARICARE ED INSTALLARE BACULA
Download bacula and extract it :
wget http://sourceforge.net/projects/bacula/files/bacula/5.0.2/bacula-5.0.2.tar.gz/download
tar -zxf bacula-5.0.2.tar.gz
cd bacula-5.0.2

Configura Bacula for compiling (please note that u have to change the email settings) :
CFLAGS="-g -Wall" \
./configure \
--sbindir=$HOME/bacula/bin \
--sysconfdir=$HOME/bacula/bin \
--with-pid-dir=$HOME/bacula/bin/working \
--with-subsys-dir=$HOME/bacula/bin/working \
--with-mysql \
--with-working-dir=$HOME/bacula/bin/working \
--with-dump-email=your@address.com \
--with-job-email=your@address.com \
--with-smtp-host=localhost

NOTE : La mia installazione di default è la seguente :

CFLAGS="-g -Wall" \
./configure \
--sbindir=/usr/share/bacula/bin \
--sysconfdir=/usr/share/bacula/etc \
--with-pid-dir=/usr/share/bacula/bin/working \
--with-subsys-dir=/usr/share/bacula/bin/working \
--with-mysql \
--with-working-dir=/usr/share/bacula/bin/working \
--with-dump-email=x@y.it \
--with-job-email=x@y.it \
--with-smtp-host=XXX.XXX.XXX.XXX

Compile and install bacula :
make
make install

CREATE DEFAULT DATABASE FOR BACULA
service mysqld start

Andate in /usr/share/bacula/etc ed eseguite gli script seguenti :
./grant_mysql_privileges
./create_mysql_database
./make_mysql_tables

CONFIGURARE IL SISTEMA PER L’AVVIO AUTOMATICO
Copiate gli script di start-stop da /usr/share/bacula/bin in /etc/init.d
cp /usr/share/bacula/bin/bacula /etc/init.d
cp /usr/share/bacula/bin/bacula-sd /etc/init.d
cp /usr/share/bacula/bin/bacula-fd /etc/init.d
cp /usr/share/bacula/bin/bacula-dir /etc/init.d

Modicate lo script di startup (/etc/init.d/bacula), aggiungendo questa linea all’inizio (per rendere lo script di avvio compatibile con chkconfig) :
# chkconfig: - 87 26

NOTE : Lo script così modificato somiglierà a questo …
#! /bin/sh
# chkconfig: - 87 26
#
# bacula This shell script takes care of starting and stopping
# the bacula daemons.
#
# This is pretty much watered down version of the RedHat script
# that works on Solaris as well as Linux, but it won't work everywhere.
#
# description: It comes by night and sucks the vital essence from your computers.

Lanciate il seguente comando :
chkconfig mysqld on
chkconfig bacula on
service bacula start

DOWNLOAD E AVVIO DI WEBMIN
Scaricate il software webmin :
cd /tmp
wget http://downloads.sourceforge.net/project/webadmin/webmin/1.510/webmin-1.510.tar.gz?use_mirror=heane

Installate Perl-Net-SSL se avete intenzione di usare SSL per l’interfaccia grafica di webmin :
yum install perl-Net-SSLeay.i386

Estraete webmin dalla tarball :
tar -zxf webmin-1.510.tar.gz
cd webmin-1.510

Eseguite lo script di setup :
./setup.sh

NOTE : Le impostazioni di default sono sufficienti, semplicemente specificate una password.

CONFIGURARE IL FIREWALL
Configurate il firewall di Centos per permettere l’accesso alla interfaccia Web di WebMin (si suppone che sia stata preservata la configurazione di default com ascolto sulla porta 10000) editando il file di configurazione /etc/sysconfig/iptables. Aggiungete la seguente riga prima del REJECT :
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9101 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9102 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9103 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT

Riavviate il firewall :
service iptables restart

CONFIGURATE WEBMIN
Accedete a WebMin , compilate il box di ricerca con la parola “bacula”
Fate click sul primo risultato, e cambiate la configurazione del modulo.
- Cambiate "Database Type" in MySql
- Cambiate "config dir" in /usr/share/bacula/etc

Congratulazioni …. avete instalato bacula con supporto a MySQLe accesso via WebMin

VN:F [1.9.3_1094]
Rating: 9.0/10 (4 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)
[lang_en]Installing Bacula 5.0.2 on Centos 5.4 using VMWARE with MySQL support and WebMin Gui[/lang_en][lang_it]Installare Bacula 5.0.2 su Centos 5.4 tramite VMWARE con supporto per MySQL e Gui WebMin[/lang_it], 9.0 out of 10 based on 4 ratings
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
:, , , , , , , , , , , , ,

4 Comments for this entry

  • black_jad

    La guida è ottima l’installazione non ha dato alcun tipo di problema tranne che per webmin il quale chiede le credenziali del database bacula….

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  • black_jad

    come non detto con user bacula è ok ma webmin da sempre questo messaggio:

    The Bacula console command /usr/share/bacula/etc/bconsole could not communicate with the Bacula director. Make sure the password in /usr/share/bacula/etc/bconsole.conf is correct.

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  • admin

    Ciao, appena ritorno dalle ferie farò qualche test per vedere cosa c’e’ di sbagliato.

    Che versione di bacula hai installato ? Ora dovrebbe essere disponibile la 5.0.3 , io ancora non ho avuto modo di provarla ….

    VN:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  • sergio

    ciao, ho seguito la tua guida sicuramente molto chiara e ben dettagliata ma c’è qualcosa che non funziona: l’installazione va a buon fine [almeno cosi mi pare] ma nel momento in cui vado a copiare gli script di start-stop non trova quelli di bacula-sd e bacula-dir ma soprattutto non riesco a trovare il file baculd-dir.conf senza il quale non puo’ funzionare il server.
    Inoltre probabilmente proprio perchè questo file non viene installato anche webmin da problemi. Ho installato questa versione proprio per seguire passo passo le tue indicazioni, anche se è uscito un update minor. Scusa per il disturbo!! se puoi fammi sapere!

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)

1 Trackback or Pingback for this entry

Leave a Reply