CentOS 7 Compiling Bacula Backup (Part 2)

Domain name: example.com     Realm name: EXAMPLE.COM

Workgroup: EXAMPLE     Server IP address: xx.xx.xx.xx

Server name: linuxsvr01     Client name: linuxclnt01

Root password: ?Pa55w0rd!

This compilation will install only the file daemon (bacula-fd) on the host and of course no need for MariaDB.

This presumes a minimal install of CentOS 7 on host (hostname=linuxsvr02.example.com) (Installing CentOS 7 Server) and that the Post Installation Tasks have been completed.

As Bacula is written to be used with many different Linux distros some of which do not have SELinux on by default I am going to disable it in this installation with the following commands then reboot machine

# setenforce 0
# sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux
# sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config && cat /etc/selinux/config

We will now install the apps and libraries for Bacula

# yum -y install epel-release
# yum -y install lshw htop nano wget mlocate
# yum -y groupinstall "Development Tools"
# yum -y install ncurses-devel readline-devel qt qt-devel lzo-devel dejavu-* libacl-devel
# export PATH=/usr/lib64/qt4/bin/:$PATH

Time to do an update

# yum -y update

Download latest version of Bacula (9.0.4) then detar

# wget https://sourceforge.net/projects/bacula/files/bacula/9.0.4/bacula-9.0.4.tar.gz
# tar -xzvf bacula-9.0.4.tar.gz -C /usr/src

Change to the Bacula folder

# cd /usr/src/bacula-9.0.4

Run configure (take out --with-mysql and insert --enable-client-only in its place)

# CFLAGS="-g -Wall" ./configure --sbindir=/opt/bacula/bin --sysconfdir=/opt/bacula/etc --enable-smartalloc --enable-client-only --with-working-dir=/opt/bacula/working --with-pid-dir=/opt/bacula/working --with-subsys-dir=/opt/bacula/working --with-systemd --enable-readline

Compile Bacula

# make

And install

# make install

Open firewall port

# firewall-cmd --add-port=9103/tcp --permanent --zone=public
# firewall-cmd --reload

Autostart the daemon

# make install-autostart
(cd platforms && make DESTDIR= install-autostart || exit 1)
make[1]: Entering directory `/usr/src/bacula-9.0.4/platforms'
make[2]: Entering directory `/usr/src/bacula-9.0.4/platforms/redhat'
# set symlinks for script at startup and shutdown
# set symlinks for script at startup and shutdown
# set symlinks for script at startup and shutdown
make[2]: Leaving directory `/usr/src/bacula-9.0.4/platforms/redhat'
make[1]: Leaving directory `/usr/src/bacula-9.0.4/platforms'