This is an old revision of the document!
Table of Contents
Installing Bacula 5.0.x on Ubuntu Server 9.10
this is work in progress! Don't use it yet!
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.
this is work in progress! Don't use it yet!
Preparing MySQL
aptitude install mysql-server mysql-client # choose secure password
edit ~/.my.cnf
to contain the following lines:
[client] user="root" password="<enter your literal password here>"
Preparing the System
create a system (-r
) account:
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
)
As we are going to compile bacula with TCP Wrapper support, make sure it can be accessed locally by adding the following linew to /etc/hosts.allow
:
ALL: LOCAL ALL: 127.0.0.1 ALL: <ip number of system>
Install the tool(s):
aptitude install mtx
Installing bacula
Install packages (needed on a fresh installed server)
aptitude install gcc g++ libqt4-dev libreadline-dev libmysqlclient-dev \ libwrap0-dev python-dev
Download files:
mkdir download cd download wget -c "https://sourceforge.net/projects/bacula/files/bacula/5.0.1/bacula-5.0.1.tar.gz/download" wget -c "https://sourceforge.net/projects/bacula/files/bacula/5.0.1/bacula-docs-5.0.1.tar.bz2/download" wget -c "https://sourceforge.net/projects/bacula/files/bacula/5.0.1/bacula-gui-5.0.1.tar.gz/download" wget -c "https://sourceforge.net/projects/bacula/files/bacula/5.0.1/bacula-regress-5.0.1.tar.gz/download" cd ..
Compile things:
mkdir src cd src tar -xvkpzf ../download/bacula-5.0.1.tar.gz cd bacula-5.0.1 ./configure --prefix=/opt/bacula-5.0.1 \ --sbindir=/opt/bacula-5.0.1/bin \ --sysconfdir=/opt/bacula-5.0.1/etc \ --mandir=/opt/bacula-5.0.1/man \ --docdir=/opt/bacula-5.0.1/html \ --htmldir=/opt/bacula-5.0.1/html \ --with-working-dir=/opt/bacula-5.0.1/working \ --with-pid-dir=/opt/bacula-5.0.1/working \ --with-subsys-dir=/opt/bacula-5.0.1/working \ --with-scriptdir=/opt/bacula-5.0.1/scripts \ --with-plugindir=/opt/bacula-5.0.1/plugins \ --libdir=/opt/bacula-5.0.1/lib \ --enable-smartalloc \ --enable-tray-monitor \ --enable-bat \ --with-mysql \ --with-smtp-host=localhost \ --with-baseport=9101 \ --with-tcp-wrappers \ --with-python \ --enable-lockmgr \ --disable-conio \ --with-readline=/usr/include/readline make
Du as root:
mkdir /opt/bacula-5.0.1 cd /opt ln -s bacula-5.0.1 bacula cd <wherever you compiled it>/src/bacula-5.0.1 make install cd /opt/bacula chgrp bacula etc/*.conf chown bacula:bacula working
Continue as user (using ~/.my.cnf
as described above)
Setup MySQL for bacula:
cd <wherever you compiled it>/src/cat ./grant_mysql_privileges mysql -u bacula -p ''
Hit Enter at the password prompt (initial password is empty, which is not the same as no password. Enter at the SQL prompt:
set password = password('<enter new literal bacula mysql password here') ; quit
remove MySQL history as it contains the unencrypted password:
rm -v ~/.mysql_history
continue with setting up MySQL for bacula:
./create_mysql_database ./make_mysql_tables
Build static clients
./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 \ --enable-tray-monitor \ --enable-bat \ --with-mysql \ --with-smtp-host=localhost \ --with-baseport=9101 \ --with-tcp-wrappers \ --with-python \ --enable-lockmgr \ --disable-conio \ --with-readline=/usr/include/readline \ --enable-client-only \ --disable-libtool \ --enable-static-fd