]> sipb.mit.edu Git - ikiwiki.git/blob - doc/setup.mdwn
web commit by joey
[ikiwiki.git] / doc / setup.mdwn
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.
4
5 1. [[Install]] ikiwiki. See [[download]] for where to get it.
6
7 2. Create the subversion repository for your wiki.
8
9                 svnadmin create /svn/wikirepo
10                 svn mkdir file:///svn/wikirepo/trunk -m create
11
12 3. Check out the repository to make the working copy that ikiwiki will use.
13
14                 svn co file:///svn/wikirepo/trunk ~/wikiwc
15
16 4. Build your wiki for the first time.
17
18                 ikiwiki --verbose ~/wikiwc/ ~/public_html/wiki/ \
19                         --url=http://host/~you/wiki/
20
21    Replace the url with the real url to your wiki. You should now
22    be able to visit the url and see your wiki.
23
24 5. Customise your wiki. The files in `/usr/share/ikiwiki/basewiki/` are
25    used if you don't have a custom version, so let's start by making a
26    custom version of the wiki's index page:
27
28                 cp /usr/share/ikiwiki/basewiki/index.mdwn ~/wikiwc
29                 svn add ~/wikiwc/index.mdwn
30                 $EDITOR ~/wikiwc/index.mdwn
31                 svn commit ~/wikiwc/index.mdwn -m customised
32
33    You can also add any files you like from scratch of course.
34
35 6. Repeat steps 4 and 5 as desired, editing or adding pages and rebuilding
36    the wiki. You can play around with other ikiwiki parameters such as
37    `--wikiname` and `--rebuild` too. Get comfortable with its command line
38    (see [[usage]]).
39
40 7. By now you should be getting tired of typing in all the command line
41    options each time you change something in your wiki's setup. And it's
42    also getting old to have to manualy rebuild the wiki each time you
43    change a file. Time to introduce setup files. 
44    
45    A sample setup file is [[ikiwiki.setup]]. Download it (or copy it from
46    `doc/ikiwiki.setup` in the ikiwiki sources), and edit it. 
47    
48    Most of the options, like `wikiname` in the setup file are the same as
49    ikiwiki's command line options (documented in [[usage]]. `srcdir`
50    and `destdir` are the two directories you specify when
51    running ikiwiki by hand. `svnrepo` is the path to your subversion 
52    repository. Make sure that all of these are pointing to the right
53    directories, and read through and configure the rest of the file to your
54    liking.
55
56    Note that the default file has a block to configure a svn wrapper. This
57    sets up a [[post-commit]] hook to update the wiki.
58
59    When you're satisfied, run `ikiwiki --setup ikiwiki.setup`, and it
60    will set everything up and update your wiki.
61
62 8. Set up [[CGI]] to allow editing the wiki from the web.
63
64    Just edit ikiwiki.setup, uncomment the block for the cgi wrapper, make
65    sure the filename for the cgi wrapper is ok, run 
66    `ikiwiki --setup ikiwiki.setup`, and you're done!
67
68 9. Add [[PageHistory]] links to the top of pages. This requires you to have
69    setup [[ViewCVS]] or something similar to access your [[Subversion]]
70    repository.  The `historyurl` setting makes ikiwiki add the links, and 
71    in that url, "\[[file]]" is replaced with the name of the file to view. So
72    edit ikiwiki.setup and set `historyurl` to something like this:
73
74         `http://svn.host/trunk/\[[file]]?root=wiki`
75    
76    Then run `ikiwiki --setup ikiwiki.setup` again.
77
78 10. Enjoy your new wiki! Add yourself to [[IkiWikiUsers]]