2021年11月8日 星期一

Bacula 11.0.5 install with source tar file

Reference:
 
步驟:
  •  安裝 CentOS 7.x (最小安裝即可)
    • yum install mariadb-server mariadb-devel mariadb gcc gcc-c++ -y
      systemctl start mariadb.service
      systemctl enable mariadb.service
  • Source tar file download
    • download bacula-11.0.5.tar.gz
  • tar zxvf bacula-11.0.5.tar.gz
  • cd bacula-11.0.5
    •         CFLAGS="-g -O2" \
                ./configure \
                  --sbindir=$HOME/bacula/bin \
                  --sysconfdir=/etc/bacula \
                  --with-pid-dir=$HOME/bacula/bin/working \
                  --with-subsys-dir=$HOME/bacula/bin/working \
                  --enable-smartalloc \
                  --with-mysql \
                  --with-working-dir=$HOME/bacula/bin/working \
                  --with-dump-email=your@address.com \
                  --with-job-email=your@address.com \
                  --with-smtp-host=localhost
    • make
      make install
      make install-autostart
  • $HOME/bacula/bin/create_mysql_database -u root
  • $HOME/bacula/bin/grant_mysql_privileges -u root
  • $HOME/bacula/bin/make_mysql_tables -u root
  • mysql -u root -p
    • mysql -u root -p
          UPDATE mysql.user SET password=PASSWORD("password") WHERE user='bacula';
          UPDATE mysql.user SET password=PASSWORD("password") WHERE user='root';
          FLUSH PRIVILEGES;
          exit
  • Configure Bacula Director
    • vi /etc/bacula/bacula-dir.conf
      • 修改Password, Address (192.168.x.x), dbpassword
    • bacula-dir -tc /etc/bacula/bacula-dir.conf
  • Configure Bacula Storage
    • mkdir /home/backup
    • chown bacula:bacula /home/backup
    • vi /etc/bacula/bacula-sd.conf
      • 修改Password, Archive Device = /home/backup
    • bacula-sd -tc /etc/bacula/bacula-sd.conf
  • Configure Bacula Console
    • vi /etc/bacula/bconsole.conf
      • 修改Password
    • bconsole -tc /etc/bacula/bconsole.conf
  • Configure Bacula file daemon
    • vi /etc/bacula/bacula-fd.conf
      • 修改Password
    • bacula-fd -tc /etc/bacula/bacula-fd.conf
  • cd $HOME/bacula/bin
    • ./bacula start
  • yum install wget -y
  • 安裝webmin (https://sourceforge.net/projects/webadmin/files/webmin/)
    • wget https://sourceforge.net/projects/webadmin/files/webmin/1.981/webmin-1.981-1.noarch.rpm --no-check-certificate
    • yum install webmin-1.981-1.noarch.rpm -y
    • service webmin status
    • chkconfig webmin on
  • 調整 firewalld
    • firewall-cmd --zone=public --add-port=10000/tcp --permanent
      firewall-cmd --reload
  • 連到 https://<Your IP>:10000 調整設定
    • System / Bacula Backup System
    • Click on “ Module Configuration” link
    • Select the database type and fill the bacula database user and password
  • 先做 Label Volume 再開始測試 backup

沒有留言:

張貼留言