]> sipb.mit.edu Git - ikiwiki.git/blob - doc/setup.mdwn
Merge branch 'master' of git://github.com/wking/ikiwiki
[ikiwiki.git] / doc / setup.mdwn
1 This tutorial will walk you through setting up a wiki with ikiwiki.
2
3 [[!toc ]]
4
5 ## Install ikiwiki
6
7 If you're using Debian or Ubuntu, ikiwiki is an <code><a href="http://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_basic_package_management_operations">apt-get</a> install ikiwiki</code> away.
8 If you're not, see the [[download]] and [[install]] pages.
9
10 ## Create your wiki
11
12 All it takes to create a fully functional wiki using ikiwiki is running
13 one command.
14 [[!template id=note text="""
15 For more control, advanced users may prefer to set up a wiki
16 [[by_hand|byhand]].
17 """]]
18
19         % ikiwiki --setup /etc/ikiwiki/auto.setup
20
21 Or, set up a blog with ikiwiki, run this command instead.
22
23         % ikiwiki --setup /etc/ikiwiki/auto-blog.setup
24
25 `librpc-xml-perl` and `python-docutils` dependencies are needed.
26
27 Either way, it will ask you a couple of questions.
28
29         What will the wiki be named? foo
30         What revision control system to use? git
31         What wiki user (or openid) will be admin? joey
32         Choose a password:
33
34 Then, wait for it to tell you an url for your new site..
35
36         Successfully set up foo:
37                 url:         http://example.com/~joey/foo
38                 srcdir:      ~/foo
39                 destdir:     ~/public_html/foo
40                 repository:  ~/foo.git
41         To modify settings, edit ~/foo.setup and then run:
42                 ikiwiki --setup ~/foo.setup
43
44 Done! 
45
46 ## Using the web interface
47
48 Now you can go to the url it told you, and edit pages in your new wiki
49 using the web interface.
50
51 (If the web interface doesn't seem to allow editing or login, you may
52 need to [[configure_the_web_server|tips/dot_cgi]].)
53
54 ## Checkout and edit wiki source
55
56 Part of the fun of using ikiwiki is not being limited to using the
57 web for editing pages, and instead using your favorite text editor and
58 [[Revision_Control_System|rcs]]. 
59
60 To do this, you need to check out a copy of the source to your wiki.
61 (You should avoid making changes directly to the `srcdir`, as that
62 checkout is reserved for use by ikiwiki itself.)
63
64 Depending on which [[Revision_Control_System|rcs]] you chose to use,
65 you can run one of these commands to check out your own copy of your wiki's
66 source. (Remember to replace "foo" with the real directory name.)
67
68         git clone foo.git foo.src
69         svn checkout file://`pwd`/foo.svn/trunk foo.src
70         cvs -d `pwd`/foo get -P ikiwiki
71         bzr clone foo foo.src
72         hg clone foo foo.src
73         darcs get foo.darcs foo.src
74         # TODO monotone, tla
75
76 Now to edit pages by hand, go into the directory you checked out (ie,
77 "foo.src"), and fire up your text editor to edit `index.mdwn` or whatever
78 other page you want to edit. If you chose to set up a blog, there is even a
79 sample first post in `posts/first_post.mdwn` that you can edit.
80
81 Once you've edited a page, use your revision control system to commit
82 the changes. For distributed revision control systems, don't forget to push
83 your commit.
84
85 Once the commit reaches the repository, ikiwiki will notice it, and
86 automatically update the wiki with your changes.
87
88 ## Customizing the wiki
89
90 There are lots of things you can configure to customize your wiki.
91 These range from changing the wiki's name, to enabling [[plugins]],
92 to banning users and locking pages.
93
94 If you log in as the admin user you configured earlier, and go to
95 your Preferences page, you can click on "Setup" to customize many
96 wiki settings and plugins.
97
98 Some settings cannot be configured on the web, for security reasons or
99 because misconfiguring them could break the wiki. To change these settings,
100 you can manually edit the setup file, which is named something like
101 "foo.setup". The file lists all available configuration settings
102 and gives a brief description of each.
103
104 After making changes to this file, you need to tell ikiwiki to use it:
105
106         % ikiwiki --setup foo.setup
107
108 Alternatively, you can ask ikiwiki to change settings in the file for you:
109
110         % ikiwiki --changesetup foo.setup --plugin goodstuff
111
112 See [[usage]] for more options.
113
114 ## Customizing file locations
115
116 As a wiki compiler, ikiwiki builds a wiki from files in a source directory,
117 and outputs the files to a destination directory. The source directory is
118 a working copy checked out from the version control system repository.
119
120 When you used `auto.setup`, ikiwiki put the source directory, destination
121 directory, and repository in your home directory, and told you the location
122 of each. Those locations were chosen to work without customization, but you
123 might want to move them to different directories.
124
125 First, move the destination directory and repository around.
126    
127         % mv public_html/foo /srv/web/foo.com
128         % mv foo.git /srv/git/foo.git
129
130 If you moved the repository to a new location, checkouts pointing at the
131 old location won't work, and the easiest way to deal with this is to delete
132 them and re-checkout from the new repository location.
133    
134         % rm -rf foo
135         % git clone /srv/git/foo.git
136
137 Finally, edit the setup file. Modify the settings for `srcdir`, `destdir`,
138 `url`, `cgiurl`, `cgi_wrapper`, `git_wrapper`, etc to reflect where
139 you moved things. Remember to run `ikiwiki --setup` after editing the
140 setup file.
141
142 ## Enjoy your new wiki!
143
144 Add yourself to [[IkiWikiUsers]]. And check out
145 the [[tips]] to find out how to get more out of ikiwiki.