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 # soon
9 Ikiwiki requires [[MarkDown]] be installed, and also uses the following
10 perl modules: `CGI::Session` `CGI::FormBuilder` `HTML::Template`
12 2. Create the subversion repository for your wiki.
14 svnadmin create /svn/wikirepo
15 svn mkdir file:///svn/wikirepo/trunk -m create
17 3. Check out the repository to make the working copy that ikiwiki will use.
19 svn co file:///svn/wikirepo/trunk ~/wikiwc
21 4. Create some files and add them into subversion.
23 echo "Welcome to my empty wiki." > ~/wikiwc/index.mdwn
24 echo "Feel free to edit this page" > ~/wikiwc/sandbox.mdwn
25 svn add ~/wikiwc/*.mdwn
26 svn commit ~/wikiwc -m add
28 5. Build your wiki for the first time.
30 ikiwiki --verbose ~/wikiwc/ \
31 /usr/share/ikiwiki/templates ~/public_html/wiki/ \
32 --url=http://host/~you/wiki/
34 Replace the url with the right url to your wiki. You should now
35 be able to visit the url and see your page that you created earlier.
37 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding
38 the wiki. You can play around with other ikiwiki parameters such as
39 --wikiname too. Get confortable with its command line.
41 7. By now you should be getting tired of typing in all the command line
42 options each time you change something in your wiki's setup. And it's
43 also getting old to have to manualy rebuild the wiki each time you
44 change a file. Time to introduce setup files.
46 A sample setup file is [[ikiwiki.setup]]. Download it (or copy it from
47 `doc/ikiwiki.setup` in the ikiwiki sources), and edit it.
49 Most of the options, like `wikiname` in the setup file are the same as
50 ikiwiki's command line options (documented in [[usage]]. `srcdir`,
51 `templatedir` and `destdir` are the three directories you specify when
52 running ikiwiki by hand. `svnrepo` is the path to your subversion
53 repository. Make sure that all of these are pointing to the right
54 directories, and read through and configure the rest of the file to your
57 Note that the default file has a block to configure a svn wrapper. This
58 sets up a [[post-commit]] hook to update the wiki.
60 When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
61 will set everything up and update your wiki.
63 8. Set up [[CGI]] to allow editing the wiki from the web.
65 Just edit ikiwiki.setup, uncomment the block for the cgi wrapper, make
66 sure the filename for the cgi wrapper is ok, run
67 `ikiwiki --setup ikiwiki.setup`, and you're done!
69 9. Add [[PageHistory]] links to the top of pages. This requires you to have
70 setup [[ViewCVS]] or something similar to access your [[Subversion]]
71 repository. The `historyurl` setting makes ikiwiki add the links, and
72 in that url, "[[]]" is replaced with the name of the file to view. So
73 edit ikiwiki.setup and set `historyurl` to something like this:
75 `http://svn.host/trunk/[[]]?root=wiki`
77 Then run `ikiwiki --setup ikiwiki.setup` again.
79 10. Enjoy your new wiki! Add yourself to [[IkiWikiUsers]]