summaryrefslogtreecommitdiffstats
path: root/doc/appendix/guides/web-reports-install.txt
blob: 06932efc971fafd86e2d80ab59c3248551f0e22c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.. -*- mode: rst -*-

.. _EPEL: http://fedoraproject.org/wiki/EPEL

.. This is combination of the Ubuntu guide and the Centos guide for
   installing the web reports.

.. _appendix-guides-web-reports-install:

========================
Web Reporting Quickstart
========================

You need to install the bcfg2-web package that is available for your
particular distribution. All packages for Fedora are in the Fedora
Package Collection.

You can find packages for CentOS and RHEL in EPEL_::

    [root@system01 ~]# yum -y install bcfg2-web

The same packages are needed for Debian/Ubuntu systems::

    [root@system01 ~]# aptitude install bcfg2-web

Add Reporting to the plugins line of ``bcfg2.conf``. The resulting
**[server]** section should look something like this::

    [server]
    repository = /var/lib/bcfg2
    plugins = Bundler,Cfg,...,Reporting

    [reporting]
    transport = LocalFilesystem

You then need to initialize the reporting database::

    [root@system01 ~]# bcfg2-admin reports init

Start/restart the Bcfg2 server::

    [root@system01 ~]# /etc/init.d/bcfg2-server restart

Start the Bcfg2 report collector::

    [root@system01 ~]# /etc/init.d/bcfg2-report-collector start

Run the Bcfg2 client in order to populate the statistics database.

Copy server/statistics sections of ``bcfg2.conf`` to
``/etc/bcfg2-web.conf`` (make sure it is world-readable).  You should
then have something like this::

    [server]
    repository = /var/lib/bcfg2
    plugins = Bundler,Cfg,...,Reporting

    [database]
    engine = sqlite3
    # 'postgresql', 'mysql', 'mysql_old', 'sqlite3' or 'ado_mssql'.
    name =
    user =
    # Not used with sqlite3.
    password =
    # Not used with sqlite3.
    host =
    # Not used with sqlite3.
    port =

    [reporting]
    transport = LocalFilesystem

Restart apache and point a browser to your Bcfg2 server.

If using sqlite be sure the sql database file and directory containing
the database are writable to apache.