This is an old revision of the document!
dnf install postgresql-server
postgresql-setup initdb
systemctl enable –now postgresql
sudo su - postgres
$ createuser bacula
$ psql
psql (10.14)
Type “help” for help.
postgres=# ALTER USER bacula PASSWORD 'bacula';
ALTER ROLE
postgres=# ALTER USER bacula LOGIN SUPERUSER CREATEDB CREATEROLE;
ALTER ROLE
postgres=# \q
$ exit
logout
Now you should uncomment the following setting in the /var/lib/pgsql/data/postgresql.conf file:
listen_addresses = 'localhost'
Now you need to change the connection configuration to the following format in the /var/lib/pgsql/data/pg_hba.conf file:
connection configuration of bacula on centos
Finally, you must restart the service using the following command to apply the changes:
systemctl restart postgresql.service
dnf install bacula-director bacula-storage bacula-console bacula-client
You can create databases, tables, and privileges by following the instructions below. Note that you must run them on behalf of the newly created Bacula user:
cd /usr/libexec/bacula/
sudo -u bacula ./create_postgresql_database
sudo -u bacula ./make_postgresql_tables
sudo -u bacula ./grant_postgresql_privileges