Install Bacula-Web using Composer

Since version 8.0.0, Bacula-Web dependencies are managed using Composer.

As stated on Composer’s official website

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

Let’s start by installing Composer on your system

Install Composer

Most Linux distro provides Composer as package, so to install it run this command

On Debian / Ubuntu
$ sudo apt-get install composer

On Red Hat, Centos, Fedora
$ sudo yum install composer

If your distro doesn’t provide Composer package, Composer website contains all information you can install it manually as explained on this page.

Important

Make sure you’re using latest Composer version. Read more on Packagist.com website

Use Composer to install Bacula-Web

From your $HOME folder, run the command below

$ composer create-project --no-dev --prefer-dist bacula-web/bacula-web bacula-web

Once done, you can check Bacula-Web installation by running the command below

$ cd bacula-web && composer check

Checking platform requirements for packages in the vendor dir
composer-plugin-api  2.2.0       success
ext-dom              20031129    success
ext-gettext          7.4.3       success
ext-json             7.4.3       success
ext-libxml           7.4.3       success
ext-mbstring         *           success provided by symfony/polyfill-mbstring
ext-openssl          7.4.3       success
ext-pcre             7.4.3       success
ext-pdo              7.4.3       success
ext-phar             7.4.3       success
ext-posix            7.4.3       success
ext-simplexml        7.4.3       success
ext-sqlite3          7.4.3       success
ext-tokenizer        7.4.3       success
ext-xml              7.4.3       success
ext-xmlwriter        7.4.3       success
php                  7.4.3       success

Fix files/folders ownership and permissions

On Centos / Red Hat / Fedora

$ sudo mv -v bacula-web /var/www/html/
$ sudo chown -Rv apache: /var/www/html/bacula-web

On Debian / Ubuntu

$ sudo mv -v bacula-web /var/www/
$ sudo chown -Rv www-data: /var/www/bacula-web
$ sudo chmod -Rv 755 /var/www/bacula-web
$ sudo chmod -v 775 /var/www/bacula-web/application/views/cache
$ sudo chmod -v 775 /var/www/bacula-web/application/assets/protected

Note

Depending on your distro, Apache root folder can be /var/www or /var/www/html

Once you’re done, it’s time to Configure Bacula-Web