My Desktop Wiki
I recently set up a desktop wiki for my personal use, but I felt like the documentation wasn't being as clear as it could have been. On the other hand, I didn't feel confident enough to edit the master documentation, so I'm documenting my installation process here. Maybe parts of this page could be taken to the master documentation later.
I'm going to assume here that a Linux/Unix style system is being used, the user's home directory is at /home/user and the wiki directory is at /home/user/homewiki.
First I downloaded Moin from MoinMoinDownload and untarred it into /home/user which in this case created /home/user/moin-1.6.3. It might be easier considering later updates to rename that to just /home/user/moin, though, but I went with the default.
At this point it may be useful to read HelpOnInstalling/StandaloneServer but I did some thing differently than what is written there.
I created a wiki instance, which is "officially" documented in HelpOnInstalling/WikiInstanceCreation but again I did it a bit differently:
cd ~ mkdir homewiki cp -R moin-1.6.3/wiki/data homewiki/ cp -R moin-1.6.3/wiki/htdocs homewiki/ cp -R moin-1.6.3/wiki/underlay homewiki/
- Then I copied moin.py and wikiconfig.py into the wiki directory as well:
cp moin-1.6.3/moin.py homewiki/ cp moin-1.6.3/wikiconfig.py homewiki/
- Now all files should be where they need to be, but a few things need to be adjusted.
- In about lines 29 and 30 of moin.py (the one in homewiki/) the sys.path gets set. The default value is ok, since wikiconfig.py is in the homewiki/ directory as well, but it is not enough. Because I didn't install Moin at all, I just extracted the tarball, the path to the Moin code files needs to be added as well. This is what I have around those lines:
moinpath = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0]))) moinpath2 = '/home/user/moin-1.6.3/' sys.path.insert(0, moinpath2) sys.path.insert(0, moinpath)
- This makes the sys.path so that it has the homewiki/ path first and the Moin code path second. The order is important, as Moin will only then use the wikiconfig.py file in homewiki/. In this case the Moin version is in the path, which means this file will certainly need editing when Moin is updated.
- As I don't have a wiki/ directory inside the homewiki/ directory, a couple of other things need to be edited as well. First, the docs variable in moin.py needs to be changed. It'll be around line 70 and I only removed the 'wiki' part, so now it is:
docs = os.path.join(moinpath, 'htdocs')
- I needed to do the same kind of changes in wikiconfig.py as well, so around the lines 14 and 15 I have:
data_dir = os.path.join(moinmoin_dir, 'data') data_underlay_dir = os.path.join(moinmoin_dir, 'underlay')
That should be it. Now I just run Moin from the console by doing:
cd ~/moin-1.6.3/ ./moin.py
And then go to localhost:8080 to use the wiki.