Skip to content

Commit

Permalink
Documentation updated
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Bergkemper <frank.bergkemper@dass-it.de>
  • Loading branch information
fbergkemper committed Sep 18, 2015
1 parent 2c7d79c commit edaaa82
Showing 1 changed file with 270 additions and 3 deletions.
273 changes: 270 additions & 3 deletions doc/INSTALL.md
Expand Up @@ -218,15 +218,282 @@ dirport = 9101

**Note:** You can add as many directors as you want.

#### Step 6 - SELinux
Now, you are able to login by calling http://<yourhost>/bareos-webui in your browser of choice.

If you do not use SELinux on your system, you can skip this step.
### INSTALLATION FROM SOURCE

To install bareos-webui on a system with SELinux enabled, the following additional step must be performed.
In this example we assume a running Apache2 Webserver with PHP5 and mod_rewrite is already installed and configured properly.

#### Step 1 - Get the source

```
cd /srv/www/htdocs
git clone https://github.com/bareos/bareos-webui.git
```

or

```
cd /srv/www/htdocs
wget https://github.com/bareos/bareos-webui/archive/Release/15.2.1.tar.gz
tar xf 15.2.1.tar.gz
```

#### Step 2 - Get Zend Framework 2

If not installed in other ways we get Zend Framework 2 via Composer.
Read more about Composer here: https://getcomposer.org/

```
cd bareos-webui
./composer.phar install
```

#### Step 3 - Configure Apache2 Webserver

You can for example copy the default configuration file and edit it to your needs.

```
cd /etc/apache2/conf.d
cp /srv/www/htdocs/bareos-webui/install/apache/bareos-webui.conf .
vim bareos-webui.conf
```

In this example it looks like following.

```
#
# Bareos WebUI Apache configuration file
#
# Environment Variable for Application Debugging
# Set to "development" to turn on debugging mode or
# "production" to turn off debugging mode.
<IfModule env_module>
SetEnv "APPLICATION_ENV" "production"
</IfModule>
Alias /bareos-webui /srv/www/htdocs/bareos-webui/public
<Directory /srv/www/htdocs/bareos-webui/public>
Options FollowSymLinks
AllowOverride None
# Following module checks are only done to support
# Apache 2.2,
# Apache 2.4 with mod_access_compat and
# Apache 2.4 without mod_access_compat
# in the same configuration file.
# Feel free to adapt it to your needs.
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Allow from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
<IfModule mod_access_compat.c>
Order deny,allow
</IfModule>
Require all granted
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /bareos-webui
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag register_globals off
</IfModule>
</Directory>
```

Restart your Apache Webserver.

#### Step 4 - Configure the directors

Create a required configuration file /etc/bareos-webui/directors.ini and edit it to your needs.

***Note:*** The location and name of the directors.ini is mandatory.

```
mkdir /etc/bareos-webui
cd /etc/bareos-webui
cp /srv/www/htdocs/bareos-webui/install/directors.ini .
vim directors.ini
```

A basic directors.ini should look similar to this.

```
[director121-dir]
enabled = "yes"
diraddress = "10.10.121.100"
dirport = 9101
[director122-dir]
enabled = "yes"
diraddress = "10.10.122.100"
dirport = 9101
[director123-dir]
enabled = "no"
diraddress = "10.10.123.100"
dirport = 9101
```

#### Step 5 - Create restricted named consoles

Configure restricted named consoles and reload your director configuration. Those consoles are like user accounts and used by the webui.
Therefore you need need to create for example two files with the following content on the host your director runs on and you want to be
able to connect to via the webui.

```
#
# Preparations:
#
# include this configuration file in bareos-dir.conf by
# @/etc/bareos/bareos-dir.d/webui-consoles.conf
#
#
# Restricted consoles used by bareos-webui
#
Console {
Name = user1
Password = "user1"
Profile = profile1
}
Console {
Name = user2
Password = "user3"
Profile = profile2
}
Console {
Name = user3
Password = "user3"
Profile = profile3
}
```

```
#
# Preparations:
#
# include this configuration file in bareos-dir.conf by
# @/etc/bareos/bareos-dir.d/webui-profiles.conf
#
#
# bareos-webui profile resources
#
Profile {
Name = profile1
CommandACL = status, messages, show, version, run, rerun, cancel, .api, .bvfs_*, list, llist, use, restore, .jobs, .filesets, .clients
Job ACL = *all*
Schedule ACL = *all*
Catalog ACL = *all*
Pool ACL = *all*
Storage ACL = *all*
Client ACL = *all*
FileSet ACL = *all*
Where ACL = *all*
}
Profile {
Name = profile2
CommandACL = status, messages, show, version, run, rerun, cancel, .api, .bvfs_*, list, llist, use, restore, .jobs, .filesets, .clients
Job ACL = *all*
Schedule ACL = *all*
Catalog ACL = *all*
Pool ACL = *all*
Storage ACL = *all*
Client ACL = *all*
FileSet ACL = *all*
Where ACL = *all*
}
Profile {
Name = profile3
CommandACL = status, messages, show, version, run, rerun, cancel, .api, .bvfs_*, list, llist, use, restore, .jobs, .filesets, .clients
Job ACL = *all*
Schedule ACL = *all*
Catalog ACL = *all*
Pool ACL = *all*
Storage ACL = *all*
Client ACL = *all*
FileSet ACL = *all*
Where ACL = *all*
}
```

After including both files and reloading the director you are done and able to use the webui.

Login via your favorite browser by calling: http://<host>/bareos-webui/.

### ADDITIONAL INFORMATION

#### SELinux

To install bareos-webui on a system with SELinux enabled, the following additional step have to be performed.

* Allow HTTPD scripts and modules to connect to the network

```
setsebool -P httpd_can_network_connect on
```

#### NGINX

If you want to use bareos-webui on e.g. nginx with php5-fpm a basic working configuration could look like this.

```
server {
listen 9100;
server_name bareos;
root /var/www/bareos-webui/public;
location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .php$ {
include snippets/fastcgi-php.conf;
# With php5-cgi alone pass the PHP
# scripts to FastCGI server
# listening on 127.0.0.1:9000
# fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
```

0 comments on commit edaaa82

Please sign in to comment.