Installation Bacula 9 and Baculum on CentOS 7

Installation Bacula 9 and Baculum on CentOS 7

Source:

 

This tutorial install DIR and SD on one machine.

 

1. Download bacula tar from sourceforge.net:

bacula-9.4.1.tar.gz

and sent tar to server
 

2. Install PostgreSQL:

sudo yum install postgresql-server postgresql-contrib postgresql-devel
sudo postgresql-setup initdb
sudo systemctl start postgresql
sudo systemctl enable postgresql

 

3. Configuration firewalld:

sudo firewall-cmd --permanent --zone=public --add-port=9101-9103/tcp
sudo firewall-cmd --reload

 

4. Disable SELinux:

sudo nano -c /etc/selinux/config

change to “SELINUX=disabled” and restart the server

sudo reboot

 

5. Install bacula (DIR, SD and FD):

tar -xvzf bacula-9.4.1.tar.gz
cd bacula-9.4.1

sudo yum install gcc gcc-c++ libacl-devel lzo-devel mt-st mtx openssl-devel readline-devel zlib-devel

sudo ./configure --prefix=/usr/local/bacula --with-scriptdir=/usr/local/bacula/scripts --with-postgresql=/usr

sudo make
sudo make install

sudo make install-autostart

sudo chmod o+rx /usr/local/bacula/scripts/create_postgresql_database /usr/local/bacula/scripts/make_postgresql_tables /usr/local/bacula/scripts/grant_postgresql_privileges

sudo -u postgres /usr/local/bacula/scripts/create_postgresql_database
sudo -u postgres /usr/local/bacula/scripts/make_postgresql_tables
sudo -u postgres /usr/local/bacula/scripts/grant_postgresql_privileges

sudo chmod o-rx /usr/local/bacula/scripts/create_postgresql_database /usr/local/bacula/scripts/make_postgresql_tables /usr/local/bacula/scripts/grant_postgresql_privileges

sudo su postgres
psql -d bacula
alter user bacula with password 'password';

and

sudo nano -c /var/lib/pgsql/data/pg_hba.conf

change all “peer” and “ident” to “trust” (This option is very low security.) and

sudo systemctl restart postgresql.service

 

6. Configuration DIR, SD and FD:

You must do the rest yourself. Bacula configuration is not easy.
 

7. Install baculum:
bacula.us/baculum/
 

rpm --import http://bacula.org/downloads/baculum/baculum.pub

echo "
[baculumrepo]
name=Baculum CentOS repository
baseurl=http://bacula.org/downloads/baculum/stable/centos
gpgcheck=1
enabled=1

[baculumrepo]
name=Baculum Fedora repository
baseurl=http://bacula.org/downloads/baculum/stable/fedora
gpgcheck=1
enabled=1" > /etc/yum.repos.d/baculum.repo

yum install -y baculum-common baculum-api baculum-api-httpd baculum-web baculum-web-httpd

echo "Defaults:apache "'!'"requiretty
apache  ALL=NOPASSWD:  /usr/sbin/bconsole
apache  ALL=NOPASSWD:  /usr/sbin/bdirjson
apache  ALL=NOPASSWD:  /usr/sbin/bsdjson
apache  ALL=NOPASSWD:  /usr/sbin/bfdjson
apache  ALL=NOPASSWD:  /usr/sbin/bbconsjson" > /etc/sudoers.d/baculum

chown -R apache /opt/bacula/etc

firewall-cmd --permanent --zone=public --add-port=9095-9096/tcp
firewall-cmd --reload

systemctl enable httpd.service
systemctl restart httpd.service

# Use the Internet browser to access and configure Baculum API http://localhost:9096/ and then Baculum http://localhost:9095/
# (replace localhost for the actual IP address if necessary)

 

First configure the API through the http://localhost:9096/ URL (admin, admin). You can test each of the settings you have made. An API access credential (user and password or oauth) will be defined.
 

Then, access the Baculum interface (http://localhost:9095/ – admin, admin) and also configure the language, access to the Bacula database, the Baculum API and Baculum Interface credential.
 
 
 
 

Dodaj komentarz

Twój adres email nie zostanie opublikowany.

This site uses Akismet to reduce spam. Learn how your comment data is processed.