Added index navigation to bin/gruta-snapshot.
[gruta.git] / INSTALL
bloba66d9d50e6bc45085de0781ccc2f4c019b1f108b
1 Gruta Installation Guide
2 ========================
4 This document contains a brief guide for the installation of Gruta,
5 the web content management system.
7 Installation steps
8 ------------------
10 Install the Artemus and Grutatxt modules, available from:
12  - http://triptico.com/software/artemus.html
13  - http://triptico.com/software/grutatxt.html
15 You'll need at least Artemus 5.0.2 and Grutatxt 2.0.16 (please take
16 note that these versions may be development ones, so you might need
17 to download them from the Git repository).
19 If you want to use the DBI source driver, you'll need DBI and a
20 corresponding DBD, of course. SQLite is fine and probably what
21 you want.
23 These other Perl modules will be used if installed:
25  - Image::Size (to include image sizes in `img' tags)
26  - RPC::XML::Client (to use blogspam.net comment spam checks)
27  - Net::Akismet (to use Akismet comment spam checks)
29 Install Gruta's package:
31     $ perl Makefile.PL && make && su -c "make install"
33 Execute the `gruta-mksite' script as the user the web server daemon runs
34 as, for example `www-data' under Debian. Answer all the questions and
35 a suitable directory tree will be created. If you answer affirmatively
36 to the 'static urls' question, be sure to include the URL rewriting
37 instructions suitable to your webserver (see below).
39 Now your web server daemon should be instructed to use `g.cgi' (the
40 Gruta entry CGI program) as the directory index. Again, see below for
41 webserver configuration examples.
43 Point your browser to the URL. As it's the first time, an `admin' user
44 with a random password has been created and the program flow redirected
45 to the administration page. Select the `admin' user from the _Users_ section
46 and set a new password. After that, move to the _Configuration_ section and
47 make all the changes you need.
49 Create some topics. New topics will appear in the top menu. Clicking on
50 them will allow you to create new stories. If you create a topic with the
51 topic id `info', the stories with ids `about' and `legal' will be magically
52 added to the top header. For the rest of your stories, create another topic.
53 One with id `main' will be OK.
55 Webserver configuration examples
56 --------------------------------
58 apache
59 ~~~~~~
62  # directory index
63  DirectoryIndex g.cgi
65  # protect the 'var' subdirectory (the Gruta raw
66  # storage depot) from being served via web
67  <Location /var>
68      order allow,deny
69      deny from all
70  </Location>
72  # static URL rewriting instructions
73  RewriteRule ^/([0-9]+)\.html$          /?t=INDEX&offset=$1              [PT,L]
74  RewriteRule ^/([0-9]+)-([0-9]+)\.html$ /?t=SEARCH_BY_DATE&from=$1&to=$2 [PT,L]
75  RewriteRule ^/tag/(.+)\.html$          /?t=SEARCH_BY_TAG&tag=$1         [PT,L]
76  RewriteRule ^/tag/$                    /?t=TAGS                         [PT,L]
77  RewriteRule ^/top/$                    /?t=TOP_TEN                      [PT,L]
78  RewriteRule ^/([0-9]{8})/$             /?t=SEARCH_BY_DATE;from=$1000000;to=$1235959 [PT,L]
79  RewriteRule ^/(.+)/$                   /?t=TOPIC&topic=$1               [PT,L]
80  RewriteRule ^/(.+)/index\.html$        /?t=TOPIC&topic=$1               [PT,L]
81  RewriteRule ^/(.+)/~([0-9]+)\.html$    /?t=TOPIC&topic=$1&offset=$2     [PT,L]
82  RewriteRule ^/(.+)/(.+)\.html$         /?t=STORY&topic=$1&id=$2         [PT,L]
83  RewriteRule ^/rss\.xml$                /?t=RSS                          [PT,L]
84  RewriteRule ^/sitemap\.xml$            /?t=SITEMAP                      [PT,L]
85  RewriteRule ^/style\.css$              /?t=CSS                          [PT,L]
87 lighttpd
88 ~~~~~~~~
91  # activate CGIs and set g.cgi as index
92  cgi.assign = ( ".cgi" => "" )
93  index-file.names = ( "g.cgi" )
95  # protect the 'var' subdirectory (the Gruta raw
96  # storage depot) from being served via web
97  url.access-deny = ( "/var" )
99  # static URL rewriting instructions
100  url.rewrite-once = (
101     "^/([0-9]+)\.html$"          => "/?t=INDEX;offset=$1",
102     "^/([0-9]+)-([0-9]+)\.html$" => "/?t=SEARCH_BY_DATE;from=$1;to=$2",
103     "^/tag/(.+)\.html$"          => "/?t=SEARCH_BY_TAG;tag=$1",
104     "^/tag/$"                    => "/?t=TAGS",
105     "^/top/$"                    => "/?t=TOP_TEN",
106     "^/([0-9]{8})/$"             => "/?t=SEARCH_BY_DATE;from=$1000000;to=$1235959",
107     "^/(.+)/$"                   => "/?t=TOPIC;topic=$1",
108     "^/(.+)/index\.html$"        => "/?t=TOPIC;topic=$1",
109     "^/(.+)/~([0-9]+)\.html$"    => "/?t=TOPIC;topic=$1;offset=$2",
110     "^/(.+)/(.+)\.html$"         => "/?t=STORY;topic=$1;id=$2",
111     "^/rss\.xml$"                => "/?t=RSS",
112     "^/sitemap\.xml$"            => "/?t=SITEMAP",
113     "^/style\.css$"              => "/?t=CSS"
117 Angel Ortega <angel@triptico.com>