bugfix: duplicate rows in TagStorage for racks
[racktables-incomplete-works] / README.Fedora
CommitLineData
e9f3a277
DO
1RUNNING RACKTABLES ON A FEDORA SYSTEM
2=====================================
3
4Most files in Fedora package of RackTables application reside in the
5/usr/share/RackTables directory regardless of package version. It is
6assumed, that this directory is never directly used in httpd's "document
7root" setting. Instead a symlink or a PHP "require" construct should be
8used for the index.php (and ONLY index.php) file based on some other
9directory, which is actually used as wwwroot. This greatly improves
10security and allows for the two use cases described below.
11
121. Single RackTables instance per server. By default the application
dd14756b
AA
13expects its configuration file (secret.php) in /etc/RackTables directory,
14which is a part of the RPM. In a fresh installation the files is missing,
15no MySQL database is setup and there is no symlink.
e9f3a277
DO
16
17Setting up the symlink is simple: one needs to decide on the URL of the
18RackTables system and map it to filesystem path. For example, the commands
19below are likely to enable access through "http://localhost/racktables/":
20
21# mkdir /var/www/html/racktables
22# ln -s /usr/share/RackTables/wwwroot/index.php /var/www/html/racktables
23
24After that opening the URL in a browser will bring up RackTables installer,
25which will fill in /etc/RackTables/secret.php file and the contents of the
26MySQL database. After that the setup is complete.
27
28
292. Multiple RackTables instances per server. The application is designed
30to be able to serve many independent MySQL databases with the same
31codebase, but different configuration files. This requires a separate
32config directory per each instance. Each of the directories will feature
33an own secret.php file configured for its own MySQL database.
34
35For example, 3 virtual hosts should provide an independent RackTables
36application each. It is assumed, that httpd is already configured for the
37virtual hosts using respective directories:
38
39/var/www/vhosts/racktables.example1.com
40/var/www/vhosts/racktables.example2.com
41/var/www/vhosts/racktables.example3.com
42
43The configuration directories could be:
44
45# mkdir /etc/RackTables/example[123]
46
47The "wwwroot" directories will require a short PHP wrapper file each. The
48wrappers will differ only in the value of $racktables_confdir setting:
49
50# cat > /var/www/vhosts/racktables.example1.com/index.php <<<EOF
51<?php
52
53$racktables_confdir = '/etc/RackTables/example1';
54require '/usr/share/RackTables/wwwroot/index.php';
55
56?>
57EOF
58
59Once the wrapper files are installed, setup of each instance must be
60completed independently through the HTTP installer. Once this is done,
61every instance can be independently maintained, backed up and even deleted.