37aee9
======== Quick installation guide with the default PostgreSQL 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 postgresql-server \
37aee9
    bacula-director bacula-storage bacula-client \
37aee9
    bacula-console bacula-console-bat
37aee9
37aee9
2) Select the PostgreSQL database backend
37aee9
37aee9
# alternatives --set libbaccats.so /usr/lib64/libbaccats-postgresql.so
37aee9
37aee9
3) Create database
37aee9
37aee9
# postgresql-setup initdb
37aee9
# systemctl enable postgresql.service
37aee9
# systemctl start postgresql.service
37aee9
37aee9
# su - postgres
37aee9
$ cd /usr/libexec/bacula
37aee9
$ ./create_bacula_database
37aee9
$ ./make_bacula_tables
37aee9
$ ./grant_bacula_privileges
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