User Tools

Site Tools


do a base install of Centos, without openoffice…

Now add some more packages.

yum install autoconf automake e2fsprogs-devel gcc-c++ glibc-devel glibc-headers kernel-devel krb5-devel libacl-devel libgomp libstdc++-devel libtermcap-devel libxml2-devel lsscsi m4 make mt-st mysql mysql-devel mysql-server ncurses ncurses-devel openssl-devel perl-DBI php php-gettext php-pear qt4 qt4-devel redhat-rpm-config rpm-build rpm-devel rpm-libs screen zlib-devel 

This list could probably be reduced down, but I don't have the time/inclination to do that just yet.

Now install the epel repo

rpm -Uvh

and install some more

yum install qwt qwt-devel wxGTK

create the build folders

mkdir /usr/src/redhat
mkdir /usr/src/RPM
mkdir /usr/src/packages

and change their permissions

chmod -R 777 /usr/src/redhat
chmod -R 777 /usr/src/RPM
chmod -R 777 /usr/src/packages

as a user, setup a build environment, I use one that I found here

chmod 755 RPM-build-tree.txt

download the bacula .src.rpm files to a directory in the user folder structure (not as root!)

then in that directory, as that non root user

rpmbuild --rebuild --define "build_centos5 1" --define "build_mysql5 1" --define "build_bat 1" --define "build_wzconsole 1" bacula-5.0.3-1.src.rpm
rpmbuild --rebuild --define "build_centos5 1" --define "build_mysql5 1" --define "build_bat 1" --define "build_wzconsole 1" bacula-bat-5.0.3-2.src.rpm
rpmbuild --rebuild --define "build_centos5 1" --define "build_mysql5 1" --define "build_bat 1" --define "build_wzconsole 1" bacula-mtx-5.0.3-1.src.rpm
rpmbuild --rebuild --define "build_centos5 1" --define "build_mysql5 1" --define "build_bat 1" --define "build_wzconsole 1" bacula-docs-5.0.3-1.src.rpm

then install, as an elevated user, the .rpm files from the build directories

Now you need to setup the database

Add the user to MySQL

mysql -p and then enter your password

set password for 'bacula'@'localhost' = password ('YourPassword');
set password for 'bacula'@'%' = password ('YourPassword');

If you have one set, before running the scripts to create the database, you need to edit them to allow for a MySQL administrator level password

cd /usr/lib/bacula/
nano grant_mysql_privileges
nano create_mysql_database
nano make_mysql_tables


if $bindir/mysql $* -u root -f <<END-OF-DATA


if $bindir/mysql -p $* -u root -f <<END-OF-DATA
cd /usr/lib/bacula/

start the services

You should now have a working installation of bacula. Configuring the tape library I leave as an exercise for the reader :-)

None of the above is my own work, I just assembled various parts that I found on many sites into a single document.

howto_install_bacula_5.0.0_from_src.rpm_on_rhel_5_or_centos_5.txt · Last modified: 2011/10/19 02:57 (external edit)