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