]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/setup.mdwn
update, formatting
[git.ikiwiki.info.git] / doc / setup.mdwn
1 This tutorial will walk you through setting up a wiki with ikiwiki.
3 [[!toc ]]
5 ## [[Download]] and [[install]] ikiwiki
7 If you're using Debian or Ubuntu, ikiwiki is an `apt-get install ikiwiki` away.
8 If you're not, see the [[download]] and [[install]] pages.
10 ## Create your wiki
12 All it takes to create a fully functional wiki using ikiwiki is running
13 one command.
15         % ikiwiki -setup /etc/ikiwiki/auto.setup
17 Or, set up a blog with ikiwiki, run this command instead.
19         % ikiwiki -setup /etc/ikiwiki/auto-blog.setup
21 Either way, it will ask you a couple of questions.
23         What will the wiki be named? foo
24         What revision control system to use? git
25         What wiki user (or openid) will be admin? joey
26         Choose a password:
28 Then, wait for it to tell you an url for your new site..
30         Successfully set up foo:
31                 url:         http://example.com/~joey/foo
32                 srcdir:      ~/foo
33                 destdir:     ~/public_html/foo
34                 repository:  ~/foo.git
35         To modify settings, edit ~/foo.setup and then run:
36                 ikiwiki -setup ~/foo.setup
38 Done! 
40 ## Using the web interface
42 Now you can go to the url it told you, and edit pages in your new wiki
43 using the web interface.
45 You can log in using the wiki user and password (or the openid)
46 that you told it to set up earlier. That user is an admin, so you can
47 go to the Preferences page and click on "Wiki Setup" to further
48 configure the wiki.
50 (If the web interface doesn't seem to allow editing or login, you may
51 need to configure [[apache|tips/apache_cgi]] or 
52 [[lighttpd|tips/lighttpd_cgi]].)
54 ## Checkout and edit wiki source
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]]. 
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.
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.)
68         git clone foo.git foo.src
69         svn checkout file://`pwd`/foo.svn/trunk foo.src
70         bzr clone foo foo.src
71         hg clone foo foo.src
72         # TODO monotone, tla
74 Now to edit pages by hand, go into the directory you checked out (ie,
75 "foo.src"), and fire up your text editor to edit `index.mdwn` or whatever
76 other page you want to edit. If you chose to set up a blog, there is even a
77 sample first post in `posts/first_post.mdwn` that you can edit.
79 Once you've edited a page, use your revision control system to commit
80 the changes. For distributed revision control systems, don't forget to push
81 your commit.
83 Once the commit reaches the repository, ikiwiki will notice it, and
84 automatically update the wiki with your changes.
86 ## Customizing the wiki
88 There are lots of things you can configure to customize your wiki.
89 These range from changing the wiki's name, to enabling [[plugins]],
90 to banning users and locking pages.
92 If you log in as the admin user you configured earlier, and go to
93 your Preferences page, you can click on "Wiki Setup" to customize many
94 wiki settings and plugins.
96 Some settings cannot be configured on the web, for security reasons or
97 because misconfiguring them could break the wiki. To change these settings,
98 you can manually edit the setup file, which is named something like
99 "foo.setup". The file lists all available configuration settings
100 and gives a brief description of each.
102 After making changes to this file, you need to tell ikiwiki to use it:
104         % ikiwiki -setup foo.setup
106 ## Customizing file locations
108 As a wiki compiler, ikiwiki builds a wiki from files in a source directory,
109 and outputs the files to a destination directory. The source directory is
110 a working copy checked out from the version control system repository.
112 When you used `auto.setup`, ikiwiki put the source directory, destination
113 directory, and repository in your home directory, and told you the location
114 of each. Those locations were chosen to work without customization, but you
115 might want to move them to different directories. There are three steps to
116 this process.
118 1. Move the destination directory and repository around.
120         % mv public_html/foo /srv/web/foo.com
121         % mv foo.git /srv/git/foo.git
123 2. Create a new source directory checkout. If you moved the repository
124    to a new location, checkouts pointing at the old location won't work,
125    and the easiest way to deal with this is to delete them and re-checkout
126    from the new repository location.
128         % rm -rf foo
129         % git clone /src/git/foo.git
131 3. Edit the setup file. Modify the settings for `srcdir`, `destdir`,
132    `url`, `cgiurl`, `cgi_wrapper`, `git_wrapper`, etc to reflect where
133    you moved things. Remember to run `ikiwiki -setup` after editing the
134    setup file.
136 ## Enjoy your new wiki!
138 Add yourself to [[IkiWikiUsers]]. And check out
139 the [[tips]] to find out how to get more out of ikiwiki.