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