User Tools

Site Tools


docs:tips_n_tricks:installing_bacula.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:tips_n_tricks:installing_bacula.html [17.03.2010 20:38 CET] peterdocs:tips_n_tricks:installing_bacula.html [02.04.2010 00:33 CEST] (current) peter
Line 1: Line 1:
 ====== Installing Bacula 5.0.x on Ubuntu Server 9.10 ====== ====== Installing Bacula 5.0.x on Ubuntu Server 9.10 ======
  
-FIXME this is work in progress! Don't use it yet! FIXME +As Ubuntu is shipping with Bacula 2.4 and there is no more recent version available in the backports repository, using bacula 5.0.x on Ubuntu 9.10 means compiling it from scratch - this is meant to be a short copy-n-paste instruction on how to do this.
- +
-As Ubuntu is shipping with Bacula 2.4 and there is no more recent version available in the backports repository, using bacula 5.0.x on Ubuntu 9.10 means compilint it from scracht - this is meant to be a short copy-n-paste instruction on how to do this. +
- +
-FIXME this is work in progress! Don't use it yet! FIXME+
  
 ===== Preparing MySQL ===== ===== Preparing MySQL =====
Line 23: Line 19:
  
   useradd -r -m -c "Bacula System Account" -s /bin/noshell bacula   useradd -r -m -c "Bacula System Account" -s /bin/noshell bacula
 +  addgroup bacula tape
  
 (using /bin/noshell is a security measure. If you ever have to become bacula, use the command\\ ''su - bacula -s /bin/bash'') (using /bin/noshell is a security measure. If you ever have to become bacula, use the command\\ ''su - bacula -s /bin/bash'')
Line 31: Line 28:
   ALL: 127.0.0.1   ALL: 127.0.0.1
   ALL: <ip number of system>   ALL: <ip number of system>
 +
 +Install the tool(s):
 +
 +  aptitude install mtx
  
 ===== Installing bacula ===== ===== Installing bacula =====
Line 90: Line 91:
   cd <wherever you compiled it>/src/bacula-5.0.1   cd <wherever you compiled it>/src/bacula-5.0.1
   make install   make install
 +  
 +  cd /opt/bacula
 +  chgrp bacula etc/*.conf
 +  chown bacula:bacula working
  
 __Continue as user (using ''~/.my.cnf'' as described [[#preparing_mysql|above]])__ __Continue as user (using ''~/.my.cnf'' as described [[#preparing_mysql|above]])__
Line 95: Line 100:
 Setup MySQL for bacula: Setup MySQL for bacula:
  
-  cd <wherever you compiled it>/src/cat +  cd /opt/bacula/scripts 
-  ./grant_mysql_privileges+  /bin/sh ./grant_mysql_privileges
   mysql -u bacula -p ''   mysql -u bacula -p ''
  
Line 110: Line 115:
 continue with setting up MySQL for bacula: continue with setting up MySQL for bacula:
  
-  ./create_mysql_database +  /bin/sh ./create_mysql_database 
-  ./make_mysql_tables+  /bin/sh ./make_mysql_tables 
 + 
 +__Fix file permissions as root:__\\ 
 +(this is needed, as we do not want to run the storage deamon and the director as root) 
 +  cd /opt/bacula/scripts 
 +  chmod a+x mtx-changer dvd-handler disk-changer startmysql stopmysql \ 
 +            bacula-ctl-dir bacula-ctl-sd bacula-ctl-fd bconsole make_catalog_backup.pl delete_catalog_backup 
 +  cd /opt/bacula/bin 
 +  chmod a+x * 
 + 
 +===== Reinit database ===== 
 + 
 +This will destroy all information about previous backups!!! It's only noted here to get rid of data produced by testruns! 
 + 
 +  cd /opt/bacula/scripts 
 +  /bin/sh ./drop_mysql_tables 
 +  /bin/sh ./make_mysql_tables 
 + 
 +You might want to "clean" your tape as well: 
 + 
 +   (stop Bacula or unmount the drive) 
 +   mt -f /dev/nst0 rewind 
 +   mt -f /dev/nst0 weof 
 + 
 +(These two hints are from the [[http://www.bacula.org/5.0.x-manuals/en/main/main/Installing_Configuring_MySQ.html#SECTION004130000000000000000 
 +|bacula manual]]) 
 + 
 +I recomment to clean the working directory as well: 
 + 
 +  rm -rv /opt/bacula/working/
 + 
 +===== Build client only ===== 
 + 
 +  ./configure --prefix=/opt/bacula-5.0.1-client \ 
 +    --sbindir=/opt/bacula-5.0.1-client/bin \ 
 +    --sysconfdir=/opt/bacula-5.0.1-client/etc 
 +    --mandir=/opt/bacula-5.0.1-client/man \ 
 +    --docdir=/opt/bacula-5.0.1-client/html \ 
 +    --htmldir=/opt/bacula-5.0.1-client/html \ 
 +    --with-working-dir=/opt/bacula-5.0.1-client/working \ 
 +    --with-pid-dir=/opt/bacula-5.0.1-client/working \ 
 +    --with-subsys-dir=/opt/bacula-5.0.1-client/working \ 
 +    --with-scriptdir=/opt/bacula-5.0.1-client/scripts \ 
 +    --with-plugindir=/opt/bacula-5.0.1-client/plugins \ 
 +    --libdir=/opt/bacula-5.0.1-client/lib \ 
 +    --enable-smartalloc \ 
 +    --disable-tray-monitor \ 
 +    --disable-bat \ 
 +    --enable-client-only \ 
 +    --with-smtp-host=localhost \ 
 +    --with-baseport=9101 \ 
 +    --with-tcp-wrappers \ 
 +    --enable-lockmgr \ 
 +    --disable-conio 
 + 
 +NB: ''--enable-static-fd'' didn't work for me 
 + 
 +===== Further Reading ===== 
 + 
 +There is a lot of documentation on the projects web page. Especcially useful for configuration is the [[http://www.bacula.org/5.0.x-manuals/en/main/main/Director_Index.html|Directors index]]. 
docs/tips_n_tricks/installing_bacula.html.1268854718.txt.gz · Last modified: 17.03.2010 20:38 CET by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki