This shows you the differences between two versions of the page.
bacula [2016/01/06 20:09] 127.0.0.1 external edit |
bacula [2020/02/13 22:55] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
- | ====== Bacula ====== | ||
- | < | ||
- | If RPM's are not available for your version, then rebuild for your Linux version. | ||
- | |||
- | < | ||
- | rpmbuild --rebuild --define ' | ||
- | </ | ||
- | Version 1.38.0 of bacula supports SSL/TLS when compiled from source, but the available RPMS were not built with SSL/TLS support. | ||
- | |||
- | ====== Download/ | ||
- | I installed the available RPM first so I could replace the binaries with SSL-enabled ones. | ||
- | |||
- | I downloaded the source package for 1.38.x (tar.gz) and did a configure with SSL and the options I found in the .spec file of the SRC rpm: | ||
- | < | ||
- | < | ||
- | ./configure \ | ||
- | --prefix=/ | ||
- | --sbindir=/ | ||
- | --sysconfdir=/ | ||
- | --with-scriptdir=/ | ||
- | --enable-smartalloc \ | ||
- | --with-openssl \ | ||
- | --with-sqlite \ | ||
- | --with-working-dir=/ | ||
- | --with-pid-dir=/ | ||
- | --with-subsys-dir=/ | ||
- | --with-dir-user=bacula \ | ||
- | --with-dir-group=bacula \ | ||
- | --with-sd-user=bacula \ | ||
- | --with-sd-group=disk \ | ||
- | --with-fd-user=root \ | ||
- | --with-fd-group=bacula \ | ||
- | --with-readline | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | ./configure \ | ||
- | --prefix=/ | ||
- | --sbindir=/ | ||
- | --sysconfdir=/ | ||
- | --with-scriptdir=/ | ||
- | --enable-smartalloc \ | ||
- | --with-openssl \ | ||
- | --enable-client-only \ | ||
- | --with-working-dir=/ | ||
- | --with-pid-dir=/ | ||
- | --with-subsys-dir=/ | ||
- | </ | ||
- | and installed the binaries over top of the RPM ones: | ||
- | |||
- | < | ||
- | make -j6 | ||
- | |||
- | make -C src/dird/ install | ||
- | make -C src/ | ||
- | make -C src/filed/ install | ||
- | make -C src/stored/ install | ||
- | </ | ||
- | ====== Download/ | ||
- | This is a complete source installation, | ||
- | |||
- | < | ||
- | apt-get install mysql-server libmysqlclient15-dev libssl-dev libreadline5-dev | ||
- | |||
- | / | ||
- | / | ||
- | |||
- | ./configure \ | ||
- | --prefix=/ | ||
- | --sbindir=/ | ||
- | --sysconfdir=/ | ||
- | --with-scriptdir=/ | ||
- | --enable-smartalloc \ | ||
- | --with-openssl \ | ||
- | --with-mysql \ | ||
- | --with-working-dir=/ | ||
- | --with-pid-dir=/ | ||
- | --with-subsys-dir=/ | ||
- | --with-dir-user=bacula \ | ||
- | --with-dir-group=bacula \ | ||
- | --with-sd-user=bacula \ | ||
- | --with-sd-group=bacula \ | ||
- | --with-fd-user=root \ | ||
- | --with-fd-group=bacula \ | ||
- | --with-readline | ||
- | make -j6 && make install | ||
- | |||
- | cd / | ||
- | </ | ||
- | ====== Generate certificates ====== | ||
- | < | ||
- | cd /etc/bacula | ||
- | </ | ||
- | The first time, generate a new CA certificate for signing | ||
- | |||
- | < | ||
- | sed -i ' | ||
- | / | ||
- | </ | ||
- | Generate a CSR signing request, and then sign it. The challenge password can be empty, but be sure the Common Name matches the DNS name you will use to connect to the remote bacula-fd server! | ||
- | |||
- | < | ||
- | / | ||
- | SSLEAY_CONFIG=' | ||
- | |||
- | mv newkey.pem bacula-< | ||
- | mv newcert.pem bacula-< | ||
- | </ | ||
- | copy (scp) < | ||
- | |||
- | < | ||
- | chmod 640 bacula-< | ||
- | chgrp bacula bacula-< | ||
- | </ | ||
- | ====== Add relevant sections to the .conf files ====== | ||
- | < | ||
- | |||
- | < | ||
- | Director { | ||
- | ... | ||
- | # console --> director server | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Verify Peer = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | |||
- | Client { | ||
- | ... | ||
- | # director --> file daemon client | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | |||
- | Storage { | ||
- | ... | ||
- | # director --> storage daemon client | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | Director { | ||
- | ... | ||
- | # director --> filedaemon server | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Verify Peer = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | |||
- | FileDaemon { | ||
- | ... | ||
- | # file daemon --> storage daemon client | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | Storage { | ||
- | ... | ||
- | # file daemon --> storage daemon server | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Verify Peer = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | |||
- | Director { | ||
- | ... | ||
- | # director --> storage daemon server | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Verify Peer = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | Director { | ||
- | ... | ||
- | # bconsole --> director client | ||
- | TLS Enable = yes | ||
- | TLS Require = yes | ||
- | TLS Key = / | ||
- | TLS Certificate = / | ||
- | TLS CA Certificate File = / | ||
- | } | ||
- | </ | ||