Skip to content

Instantly share code, notes, and snippets.

@vpnwall-services
Last active January 23, 2024 22:55
Show Gist options
  • Save vpnwall-services/e512f121ae9a0e7598b1ac66288bd266 to your computer and use it in GitHub Desktop.
Save vpnwall-services/e512f121ae9a0e7598b1ac66288bd266 to your computer and use it in GitHub Desktop.
[Install Bacula From Sources] Compile and install Bacula tools from sources #backup #bacula #linux #debian #compile #install #latest
#!/bin/bash
#VERSION="9.4.2"
#apt-get install -y build-essential libreadline6-dev zlib1g-dev liblzo2-dev mt-st mtx postfix libacl1-dev libssl-dev libmysql++-dev mysql-server
#mkdir /tmp/bacula
#cd /tmp/bacula
#wget https://sourceforge.net/projects/bacula/files/bacula/$VERSION/bacula-$VERSION.tar.gz
#cd /usr/src/bacula*
#./configure --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-#working-dir=/var/lib/bacula --with-logdir=/var/log --enable-smartalloc --with-mysql --with-archivedir=/mnt/backup [email protected] --#with-hostname=ip_or_qualified_name
#make -j8 && make install && make install-autostart
#chmod o+rx /etc/bacula/scripts/*
#/etc/bacula/scripts/create_mysql_database -u root -p && \
#/etc/bacula/scripts/make_mysql_tables -u root -p && \
#/etc/bacula/scripts/grant_mysql_privileges -u root -p
install_server(){
apt-get install -y build-essential libreadline6-dev zlib1g-dev liblzo2-dev mt-st mtx postfix libacl1-dev libssl-dev libmysql++-dev mysql-server
wget -qO- http://bacula.us/current | tar -xzvf - -C /usr/src
cd /usr/src/bacula*
./configure --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-working-dir=/var/lib/bacula --with-logdir=/var/log --enable-smartalloc --with-mysql --with-archivedir=/home/bacula/backup [email protected] --with-hostname=149.202.79.139
make -j8 && make install && make install-autostart
chmod o+rx /etc/bacula/scripts/*
/etc/bacula/scripts/create_mysql_database -u root -p && \
/etc/bacula/scripts/make_mysql_tables -u root -p && \
/etc/bacula/scripts/grant_mysql_privileges -u root -p
}
install_client(){
wget -qO- http://bacula.us/current | tar -xzvf - -C /usr/src
cd /usr/src/bacula*
./configure --enable-client-only --enable-build-dird=no --enable-build-stored=no --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-working-dir=/var/spool/bacula/ --with-logdir=/var/log --enable-smartalloc
make -j8 && make install && make install-autostart-fd
service bacula-fd start
}
# or add stretch-backports and
# aptitude update ; aptitude show bacula -t stretch-backports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment