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. Or you might copy the
22 files from /usr/share/ikiwiki/basewiki and check those in to get a
23 head start on creating your wiki.
25 echo "Welcome to my empty wiki." > ~/wikiwc/index.mdwn
26 echo "Feel free to edit this page" > ~/wikiwc/sandbox.mdwn
27 svn add ~/wikiwc/*.mdwn
28 svn commit ~/wikiwc -m add
30 5. Build your wiki for the first time.
32 ikiwiki --verbose ~/wikiwc/ \
33 /usr/share/ikiwiki/templates ~/public_html/wiki/ \
34 --url=http://host/~you/wiki/
36 Replace the url with the right url to your wiki. You should now
37 be able to visit the url and see your page that you created earlier.
39 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding
40 the wiki. You can play around with other ikiwiki parameters such as
41 `--wikiname` and `--rebuild` too. Get comfortable with its command line
44 7. By now you should be getting tired of typing in all the command line
45 options each time you change something in your wiki's setup. And it's
46 also getting old to have to manualy rebuild the wiki each time you
47 change a file. Time to introduce setup files.
49 A sample setup file is [[ikiwiki.setup]]. Download it (or copy it from
50 `doc/ikiwiki.setup` in the ikiwiki sources), and edit it.
52 Most of the options, like `wikiname` in the setup file are the same as
53 ikiwiki's command line options (documented in [[usage]]. `srcdir`,
54 `templatedir` and `destdir` are the three directories you specify when
55 running ikiwiki by hand. `svnrepo` is the path to your subversion
56 repository. Make sure that all of these are pointing to the right
57 directories, and read through and configure the rest of the file to your
60 Note that the default file has a block to configure a svn wrapper. This
61 sets up a [[post-commit]] hook to update the wiki.
63 When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
64 will set everything up and update your wiki.
66 8. Set up [[CGI]] to allow editing the wiki from the web.
68 Just edit ikiwiki.setup, uncomment the block for the cgi wrapper, make
69 sure the filename for the cgi wrapper is ok, run
70 `ikiwiki --setup ikiwiki.setup`, and you're done!
72 9. Add [[PageHistory]] links to the top of pages. This requires you to have
73 setup [[ViewCVS]] or something similar to access your [[Subversion]]
74 repository. The `historyurl` setting makes ikiwiki add the links, and
75 in that url, "\[[file]]" is replaced with the name of the file to view. So
76 edit ikiwiki.setup and set `historyurl` to something like this:
78 `http://svn.host/trunk/\[[file]]?root=wiki`
80 Then run `ikiwiki --setup ikiwiki.setup` again.
82 10. Enjoy your new wiki! Add yourself to [[IkiWikiUsers]]