Installing Bareos

We will start by switching into our root user:

sudo su

Install wget:

yum install -y wget

Download the Bareos repository:

URL=http://download.bareos.org/bareos/release/latest/$DIST
wget -O /etc/yum.repos.d/bareos.repo $URL/bareos.repo

Install the Bareos packages

yum install bareos bareos-database-$DATABASE
yum install postgresql-server postgresql-contrib

Initialize Postgres:

postgresql-setup initdb

Start Postgres and enable it on boot:

systemctl start postgresql
systemctl enable postgresql

Setup the Bareos database:

su postgres -c /usr/lib/bareos/scripts/create_bareos_database
su postgres -c /usr/lib/bareos/scripts/make_bareos_tables
su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges

Start the Bareos daemons:

service bareos-dir start
service bareos-sd start
service bareos-fd start

Install the webUI:

yum install bareos-webui

Configure SELinux to allow connections:

setsebool -P httpd_can_network_connect on

Restart apache and the Bareos director:

systemctl restart httpd
systemctl restart bareos-dir

Start the Bareos console:

bconsole

Add an admin username, replace the word secret with a secure password:

configure add console name=admin password=secret profile=webui-admin

You can now navigate to http://your-server-ip//bareos-webui/ and login with your admin credentials.

Next Steps

Your server is now setup with Bareos for server backup and restoration. You can now review the Bareos documentation in order to setup automated server backup operations.