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/ ~/public_html/wiki/ \
33 --url=http://host/~you/wiki/
35 Replace the url with the real url to your wiki. You should now
36 be able to visit the url and see your page that you created earlier.
38 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding
39 the wiki. You can play around with other ikiwiki parameters such as
40 `--wikiname` and `--rebuild` too. Get comfortable with its command line
43 7. By now you should be getting tired of typing in all the command line
44 options each time you change something in your wiki's setup. And it's
45 also getting old to have to manualy rebuild the wiki each time you
46 change a file. Time to introduce setup files.
48 A sample setup file is [[ikiwiki.setup]]. Download it (or copy it from
49 `doc/ikiwiki.setup` in the ikiwiki sources), and edit it.
51 Most of the options, like `wikiname` in the setup file are the same as
52 ikiwiki's command line options (documented in [[usage]]. `srcdir`
53 and `destdir` are the two directories you specify when
54 running ikiwiki by hand. `svnrepo` is the path to your subversion
55 repository. Make sure that all of these are pointing to the right
56 directories, and read through and configure the rest of the file to your
59 Note that the default file has a block to configure a svn wrapper. This
60 sets up a [[post-commit]] hook to update the wiki.
62 When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
63 will set everything up and update your wiki.
65 8. Set up [[CGI]] to allow editing the wiki from the web.
67 Just edit ikiwiki.setup, uncomment the block for the cgi wrapper, make
68 sure the filename for the cgi wrapper is ok, run
69 `ikiwiki --setup ikiwiki.setup`, and you're done!
71 9. Add [[PageHistory]] links to the top of pages. This requires you to have
72 setup [[ViewCVS]] or something similar to access your [[Subversion]]
73 repository. The `historyurl` setting makes ikiwiki add the links, and
74 in that url, "\[[file]]" is replaced with the name of the file to view. So
75 edit ikiwiki.setup and set `historyurl` to something like this:
77 `http://svn.host/trunk/\[[file]]?root=wiki`
79 Then run `ikiwiki --setup ikiwiki.setup` again.
81 10. Enjoy your new wiki! Add yourself to [[IkiWikiUsers]]