1 So you want to set up your own wiki using ikiwiki? This turorial will walk
2 you through setting up a wiki that is stored in [[Subversion]] and that has
3 optional support for commits from the web.
5 1. [[Install]] ikiwiki.
7 apt-get install ikiwiki
9 2. Create the subversion repository for your wiki.
11 svnadmin create /svn/wikirepo
12 svn mkdir file:///svn/wikirepo/trunk -m create
14 3. Check out the repository to make the working copy that ikiwiki will use.
16 svn co file:///svn/wikirepo/trunk ~/wikiwc
18 4. Create some files them into subversion.
20 echo "Welcome to my empty wiki." > ~/wikiwc/index.mdwn
21 echo "Feel free to edit this page" > ~/wikiwc/sandbox.mdwn
22 svn add ~/wikiwc/*.mdwn
23 svn commit ~/wikiwc -m add
25 5. Build your wiki for the first time.
27 ikiwiki --verbose ~/wikiwc/ ~/public_html/wiki/ \
28 --url=http://host/~you/wiki/
30 Replace the url with the right url to your wiki. You should now
31 be able to visit the url and see your page that you created earlier.
33 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding
34 the wiki. You can play around with other ikiwiki parameters such as
35 --wikiname too. Get conformatble with its command line.
37 7. Set up a Subversion [[post-commit]] hook to automatically rebuild your
38 wiki when you commit to it.
40 ikiwiki ~/wikiwc/ ~/public_html/wiki/ \
41 --url=http://host/~you/wiki/ --wrapper
42 mv ikiwiki-wrap /svn/wikirepo/hooks/post-commit
44 8. Set up a [[CGI]] to allow editing the wiki from the web.
46 ikiwiki ~/wikiwc/ ~/public_html/wiki/ \
47 --url=http://host/~you/wiki/ --wrapper --cgi
48 chmod 6755 ikiwiki-wrap
49 mv wrapper ~/public_html/wiki/ikiwki.cgi
51 Note that this assumes that your web server will run CGI scripts from
52 your public_html directory. You might need to put it somewhere else
53 depending on your web server configuration.
55 9. Add links to the CGI to all the pages in your wiki, and update your
56 post-commit hook to add such links when updating the wiki in the
57 future. Note the use of the [[WrapperParamsTrick]].
59 ikiwiki $(/svn/wikirepo/hooks/post-commit --params) --rebuild
60 ikiwiki $(/svn/wikirepo/hooks/post-commit --params) \
61 --cgiurl=http://host/~you/wiki/ikiwiki.cgi \
63 mv ikiwiki-wrap /svn/wikirepo/hooks/post-commit
65 Be sure to change the cgiurl to the actual url to the wiki.cgi you
68 10. Enjoy your new wiki!