Monday 29 August 2022

Bacula 13 Installation on Linux - CentOS 8/Redhat 8/Oracle Linux 8/Rocky Linux 8


Bacula 13 Install

REF: Verify Download URL from: https://www.bacula.org/source-download-center/

Current Download URL for Bacula 13: https://www.bacula.org/download/11146/


Linux dependencies installation. 

At this point I considered you have installed Linux already with static network configurations. I have installed Oracle Linux 8. 


IMP: Make sure selinux is disabled

setenforce 0

sudo sed -i "s/enforcing/disabled/g" /etc/selinux/config

sudo sed -i "s/enforcing/disabled/g" /etc/sysconfig/selinux


yum -y install make gcc-c++ readline-devel zlib-devel lzo-devel libacl-devel mt-st mtx postfix openssl-devel mysql-devel


#******Installing bacula 13 from source code.*******#


URL FOR SOURCE CODE: https://www.bacula.org/download/11146/


wget -qO- https://www.bacula.org/download/11146/ | tar -xzvf - -C /usr/src


yum -y install make gcc-c++ zlib-devel lzo-devel libacl-devel openssl-devel


cd /usr/src/bacula*


./configure --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-working-dir=/var/lib/bacula --with-logdir=/var/log --enable-smartalloc --with-mysql --with-archivedir=/mnt/backup --with-job-email=your@email.com.br --with-hostname=ip_or_qualified_name


make -j8 && make install && make install-autostart


#PATHS TO MYSQL SCRIPTS IF INSTALLED USING YUM - Not recommended


chmod o+rx /usr/libexec/bacula/*


/usr/libexec/bacula/create_mysql_database -u root -p 

/usr/libexec/bacula/make_mysql_tables -u root -p 

/usr/libexec/bacula/grant_mysql_privileges -u root -p


#PATHS TO MYSQL SCRIPTS IF INSTALLED USING SOURCE CODE


# MySQL:

chmod o+rx /etc/bacula/scripts/*

/etc/bacula/scripts/create_mysql_database -u root -p  

/etc/bacula/scripts/make_mysql_tables -u root -p 

/etc/bacula/scripts/grant_mysql_privileges -u root -p


#Create bacula user for bacula-database access & grant database all permissions.


CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'P@ssw0rd';


GRANT ALL PRIVILEGES ON bacula.* TO 'bacula'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;



#Make sure bacula system user is created. if not created create one


adduser bacula

passwd bacula


#Set bacula mysql user/password in /etc/bacula/bacula-dir.conf


Catalog {

  Name = MyCatalog

  dbname = "bacula"; dbuser = "bacula"; dbpassword = "P@ssw0rd"

}

Check and start bacula services

systemctl start bacula-dir

systemctl start bacula-sd

systemctl start bacula-fd


systemctl status bacula-dir;

systemctl status bacula-sd;

systemctl status bacula-fd;


systemctl enable bacula-dir

systemctl enable bacula-sd

systemctl enable bacula-fd


...Done...

How to add WIndows/Linux Clients for backup and define jobs


In progress.......

No comments:

Post a Comment