1 Gruta Installation Guide
2 ========================
4 This document contains a brief guide for the installation of Gruta,
5 the web content management system.
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.1 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
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 --------------------------------
65 # protect the 'var' subdirectory (the Gruta raw
66 # storage depot) from being served via web
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 ^/(.+)/$ /?t=TOPIC&topic=$1 [PT,L]
79 RewriteRule ^/(.+)/index\.html$ /?t=TOPIC&topic=$1 [PT,L]
80 RewriteRule ^/(.+)/~([0-9]+)\.html$ /?t=TOPIC&topic=$1&offset=$2 [PT,L]
81 RewriteRule ^/(.+)/(.+)\.html$ /?t=STORY&topic=$1&id=$2 [PT,L]
82 RewriteRule ^/rss\.xml$ /?t=RSS [PT,L]
83 RewriteRule ^/sitemap\.xml$ /?t=SITEMAP [PT,L]
84 RewriteRule ^/style\.css$ /?t=CSS [PT,L]
90 # activate CGIs and set g.cgi as index
91 cgi.assign = ( ".cgi" => "" )
92 index-file.names = ( "g.cgi" )
94 # protect the 'var' subdirectory (the Gruta raw
95 # storage depot) from being served via web
96 url.access-deny = ( "/var" )
98 # static URL rewriting instructions
100 "^/([0-9]+)\.html$" => "/?t=INDEX;offset=$1",
101 "^/([0-9]+)-([0-9]+)\.html$" => "/?t=SEARCH_BY_DATE;from=$1;to=$2",
102 "^/tag/(.+)\.html$" => "/?t=SEARCH_BY_TAG;tag=$1",
103 "^/tag/$" => "/?t=TAGS",
104 "^/top/$" => "/?t=TOP_TEN",
105 "^/(.+)/$" => "/?t=TOPIC;topic=$1",
106 "^/(.+)/index\.html$" => "/?t=TOPIC;topic=$1",
107 "^/(.+)/~([0-9]+)\.html$" => "/?t=TOPIC;topic=$1;offset=$2",
108 "^/(.+)/(.+)\.html$" => "/?t=STORY;topic=$1;id=$2",
109 "^/rss\.xml$" => "/?t=RSS",
110 "^/sitemap\.xml$" => "/?t=SITEMAP",
111 "^/style\.css$" => "/?t=CSS"
115 Angel Ortega <angel@triptico.com>