37aee9
======== Quick installation guide with the MySQL backend ========
37aee9
37aee9
Perform the following commands to install Bacula with its default configuration
37aee9
and all daemons and consoles in one server.
37aee9
37aee9
1) Install packages
37aee9
37aee9
# yum -y install mysql-server \
37aee9
    bacula-director bacula-storage bacula-client \
37aee9
    bacula-console bacula-console-bat
37aee9
37aee9
2) Select the MySQL database backend
37aee9
37aee9
# alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so
37aee9
37aee9
3) Create database
37aee9
37aee9
# systemctl enable mysqld.service
37aee9
# systemctl start mysqld.service
37aee9
37aee9
# cd /usr/libexec/bacula
37aee9
# ./create_bacula_database mysql
37aee9
# ./make_bacula_tables mysql
37aee9
# ./grant_bacula_privileges mysql
37aee9
37aee9
4) Change passwords in /etc/bacula/*.conf with something you like.
37aee9
37aee9
# sed -i -e 's/@@DIR_PASSWORD@@/dir-password/g' \
37aee9
        -e 's/@@FD_PASSWORD@@/fd-password/g' \
37aee9
        -e 's/@@SD_PASSWORD@@/sd-password/g' \
37aee9
        -e 's/@@MON_DIR_PASSWORD@@/mon-dir-password/g' \
37aee9
        -e 's/@@MON_FD_PASSWORD@@/mon-fd-password/g' \
37aee9
        -e 's/@@MON_SD_PASSWORD@@/mon-sd-password/g' \
37aee9
        /etc/bacula/*.conf
37aee9
37aee9
5) Enable daemons and check they are working
37aee9
37aee9
# systemctl enable bacula-dir.service
37aee9
# systemctl enable bacula-sd.service
37aee9
# systemctl enable bacula-fd.service
37aee9
37aee9
# systemctl start bacula-dir.service
37aee9
# echo status dir=bacula-dir | bconsole
37aee9
37aee9
# systemctl start bacula-sd.service
37aee9
# echo status storage=bacula-sd | bconsole
37aee9
37aee9
# systemctl start bacula-fd.service
37aee9
# echo status client=bacula-fd | bconsole
37aee9
37aee9
6) To grant console access to regular users add the read permission to the
37aee9
console configuration files. Remember that there is no authentication check; so
37aee9
a user that can launch the console can perform any command.
37aee9
37aee9
# chmod +r /etc/bacula/bconsole.conf /etc/bacula/bat.conf