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