diff --git a/doc/install/INSTALL.md b/doc/install/INSTALL.md index 68ce27fa..a501386c 100644 --- a/doc/install/INSTALL.md +++ b/doc/install/INSTALL.md @@ -1,30 +1,18 @@ ## INSTALL -Remember: this project is still in alpha state. - ### SYSTEM REQUIREMENTS -* A working Bareos environment, Bareos 12.4 or later, including a Bareos catalog database (currently only PostgreSQL is tested) +* A working Bareos environment, Bareos 12.4 or later, including a Bareos catalog database * An Apache 2.x Webserver with mod-rewrite, mod-php5 and mod-setenvif enabled * PHP 5.3.3 or later * PHP PDO Extension * PHP intl Extension * PHP DATE Extension + * PHP OpenSSL Extension * Zend Framework 2.2.x or later * A Browser of your choice with JavaScript enabled -* when using composer.phar (installer for additional components): - * PHP PHAR Extension - * PHP OpenSSL Extension - -### How bareos-webui accesses Bareos - -Bareos-webui connects to Bareos by - * native connection to the director - * database connection (read-only) to the Bareos catalog - -## Installation -### Package based installation +### PACKAGE BASED INSTALLATION The bareos-webui packages are available for a number of Linux distributions, see http://download.bareos.org/bareos/contrib/ @@ -49,7 +37,7 @@ However, not all distributions offer these packages. * add the [Bareos contrib](http://download.bareos.org/bareos/contrib/) repository that is matching your Linux distribution * install the package bareos-webui - * configure your database connection to your Bareos catalog in ```/etc/bareos-webui.conf.php``` (this is the link target of ```/usr/share/bareos-webui/config/autoload/local.php```). See [configure database connection](#configure-the-database-connection) + * configure your database and director connections in ```/etc/bareos-webui.conf.php``` (this is the link target of ```/usr/share/bareos-webui/config/autoload/local.php```). See [configure database and director connections](#configure-database-and-director-connection) * reload your Apache webserver * test bareos-webui using the url: [http://localhost/bareos-webui](http://localhost/bareos-webui) * Attention: the default installation only allows access from localhost. This can be adapted in the ```bareos-webui.conf``` file, that is location in the Apache configuration files directory. However, when allowing access from other systems, you should also configure other access restrictions like user login. @@ -57,7 +45,7 @@ However, not all distributions offer these packages. ### Installation from github sources -* Get we latest version from github, e.g. +* Get the latest version from github, e.g. ``` cd /usr/share/ @@ -89,7 +77,7 @@ cd /etc/apache2/conf.d wget https://raw.github.com/bareos/bareos-webui/master/install/apache/bareos-webui.conf ``` -Note: On Debian the ZF2_PATH Variable in your bareos-webui.conf is currently needed, if you are using the ZF2 package from Bareos contrib. +Note: On Debian the ZF2_PATH Variable in your bareos-webui.conf is currently needed, if you are using the ZF2 package from Bareos contrib. This will change and no longer be necessary in future, but it is the way to go for the moment. ``` @@ -97,7 +85,31 @@ This will change and no longer be necessary in future, but it is the way to go f SetEnv "ZF2_PATH" "/usr/share/php5" ``` -### Configure the database connection +### Configure a restricted console in your bareos-dir.conf used by bareos-webui + +The restricted console is used for authentication by the webui, name and password are the credentials you have to provide in the authentication form of the webui, +after choosing the director you wish to connect to. The status, messages, show, version run and rerun commands are currently needed by the webui. + +``` +# +# Restricted console used by bareos-webui +# +Console { + Name = test + Password = "test" + CommandACL = status, .status, messages, show, version, run, rerun, restore + Job ACL = *all* + Schedule ACL = *all* + Catalog ACL = *all* + Pool ACL = *all* + Storage ACL = *all* + Client ACL = *all* + FileSet ACL = *all* + #Where ACL = +} +``` + +### Configure the database and director connections Bareos-webui needs only a read-only connection to the Bareos catalog database, so there are multiple possibilities to configure bareos-webui: * reuse the exsiting Bareos database user @@ -133,9 +145,10 @@ Reload the PostgreSQL configuration: pg_ctl reload ``` + ##### -Adapt the bareos-webui configuration file to match your database settings. +Adapt the bareos-webui configuration file to match your database and director settings. * Manual installation: * Copy ```bareos-webui/config/autoload/local.php.dist``` to ```bareos-webui/config/autoload/local.php``` and edit the local.php file to your needs. @@ -143,21 +156,81 @@ Adapt the bareos-webui configuration file to match your database settings. * The file local.php is available as ```/etc/bareos-webui.conf.php```. It is the link target of the configuration file used by bareos-webui ```/usr/share/bareos-webui/config/autoload/local.php```. Please edit this file. -As the result, the configuration file should look similar to this: +As the result, the local.php (/etc/bareos-webui.conf.php) configuration file should look similar to this: ``` return array( - 'db' => array( - // Set your database driver here: Pdo_Mysql, Pdo_Pgsql, Mysqli or Pgsql + 'db' => array( + 'adapters' => array( + 'localhost' => array( 'driver' => 'Pdo_Pgsql', - // Set your database here 'dbname' => 'bareos', - // Set your hostname here 'host' => 'localhost', - // Set your username here - 'username' => 'bareos_webui', - // Set your password here - 'password' => '', + 'username' => 'bareos', + 'password' => '', + ), + /* + 'remote-dir' => array( + 'driver' => 'Pdo_Pgsql', + 'dbname' => 'bareos', + 'host' => 'remote-db-server', + 'username' => 'bareos', + 'password' => '', + ), + */ + ), + ), + 'directors' => array ( + 'localhost' => array( + 'host' => 'localhost', + 'port' => '9101', + 'tls_verify_peer' => false, + 'server_can_do_tls' => false, + 'server_requires_tls' => false, + 'client_can_do_tls' => false, + 'client_requires_tls' => false, + 'ca_file' => null, + 'cert_file' => null, + 'cert_file_passphrase' => null, + 'allowed_cns' => null, + ), + /* + 'remote-dir' => array( + 'host' => 'FQDN remote dir', + 'port' => '9101', + 'tls_verify_peer' => false, + 'server_can_do_tls' => false, + 'server_requires_tls' => false, + 'client_can_do_tls' => false, + 'client_requires_tls' => false, + 'ca_file' => null, + 'cert_file' => null, + 'cert_file_passphrase' => null, + 'allowed_cns' => null, ), + */ + ), ); + +``` + +Your bareos-dir.conf file should have at least one restricted console entry which should look similar to this as it is used for authentication: + +``` +# +# Restricted console used by bareos-webui +# +Console { + Name = test + Password = "test" + CommandACL = status, .status, messages, show, version, run, rerun, restore + Job ACL = *all* + Schedule ACL = *all* + Catalog ACL = *all* + Pool ACL = *all* + Storage ACL = *all* + Client ACL = *all* + FileSet ACL = *all* + #Where ACL = +} ```