oscartheduckin’ around

February 12, 2007

moinmoin on edgy eft

Filed under: edgy eft, MoinMoin, tech, ubuntu — oscartheduck @ 4:22 am

28.1.07 – Happy new year. I recently had cause to set up moinmoin on ubuntu 6.10, and figured I’d give you the blow by blow. Because it’s not as simple as I’d like it to be, in spite of the excellent documentation on moinmoin’s website.

First, get the base packages. You’re looking at a simple “sudo apt-get install moinmoin-common”. No problems there, then.

Now, moinmoin is python based, which is good because if it wasn’t then there’s no way on this fucking planet that I would’ve managed the install properly. See, there’re a few things along the way that get mangled between apt-getting and attempting to follow the moinmoin documentation.

So, now grab the moinmoin official packages. I know, I know, you just apt-getted the binaries, but this actually seems like a necessary step. See, moinmoin wants to have a bunch of special MoinMoin scripts installed as python packages, and this is the easiest way to get there.

Once you’ve grabbed the official packages, gunzip and untar ’em to your desktop.

Locate setup.py and run it as described here. It adds all the packages to your python setup (python 2.4 is included as default on Ubuntu, I think). Remember to sudo the install command.

Now, test whether or not that worked properly. At the command line type “python”. THe prompt will change. Now type “import MoinMoin”. It should just work with no weird errors at all, you just get the >>> prompt again. Hit ctrl-D to leave python.

So great, you’ve got the install done. Next is to alter permissions and tweak some files to get YOUR wiki instance running rather than the default. You’ll appreciate the use of python as the base language here.

First, altering permissions. This is important as it changes how public your wiki is. I wanted one that only one group on my linux box could alter, everyone else was to be locked out. So, first thing I did was create a new user account to be the wiki admin. You can do this through gnome’s gui tool very easily, just use that for now.

I called my new user moinmoin and added a new group for that user called moinmoin, and my following examples assume that you do the same thing.

Now that you have the group and user IDs set up, cd into the moinmoin directory that you have; it’s /usr/share/moin. Now there are a few ways to change the group recursively. Easiest way is probably chgrp -R. So run this command:

sudo chgrp -R moinmoin ./

Now if you do an ls -l you should see that your moinmoin group (whatever it is) owns all the files and folders and whatnot.

Now do this:

sudo chmod -R 770 ./

 

This makes it so the owner, root, can edit everything, and anyone in the moinmoin group can edit everything, but the rest of the world can’t. It’s good security, unless you want to go the traditional wiki route of allowing ANYONE to edit ANYTHING in which case 777 is a good way to go.

Now, creating the wiki instance. The moinmoin documentation here is very good, so click here and follow it. If you make your wiki instance as the moinmoin user, it’ll have the correct group owner automagically.

If you make a mistake here, it’s most likely duplicating some directory names. My wiki is called SeventhSon, and when I checked their instructions I had a /usr/share/moin/SeventhSon/SeventhSon/[all the data], so I copied the data into the higher Seventh Son and deleted the other one.

Almost everything is done.

This is linux, based on unix. As such, when you want to offer a service it runs as a constant process; think about ssh. If you want ssh to run, you set up the sshd script to run. There’s a moinmoin script that needs to run in order to offer this service. Weirdly enough, I didn’t notice this being mentioned anywhere on moinmoin’s documentation, I found it mentioned here.

You may as well copy it into your wiki’s directory, for convenience. It’ll be in /usr/share/moin/server/, and it’s called moin.py You can run it from wherever you see it, though.

 

Almost there. If you run moin.py by entering from the wiki directory ./moin.py. You get instructions about how to access your wiki – open a browser and enter localhost:8000 as the URL to visit.

You should get an error, telling you something like:

“/org/mywiki/data doesn’t exist.”

 

I managed to luck upon the way to fix this.

sudo vi /etc/moin/mywiki.py and change the data directory listed in the last line to /usr/share/moin/[yourwikiname].

Done!

Advertisements

9 Comments »

  1. Hey, Thanks for this guide, very helpful. Moinmoin documentation sucks :/

    -s

    Comment by malarky — April 7, 2007 @ 2:24 pm

  2. AFter ur patch, i could get through the data direcroty problem, but this one came up….

    ConfigurationError:
    data_underlay_dir “./underlay/” does not exists, or has incorrect ownership or
    permissions.

    Any idea ?

    bytespedition@gmail.com

    Comment by viking — April 10, 2007 @ 3:09 pm

    • I get the same error:
      data_underlay_dir “./underlay/” does not exists, or has incorrect ownership or
      permissions.

      What to do??

      Comment by Michiel — November 27, 2010 @ 11:31 am

      • Hey Michiel,

        did you follow stuff about the farmconfig file? If so, I’m fresh out: try talking to the moin developers on their IRC channel or their mailing list. They’re friendly folks!

        Comment by oscartheduck — November 28, 2010 @ 6:49 am

  3. I replied thusly within an email to viking:

    I have a dozen ideas, actually. First, the guide is a little bit woolly on some of the details; I should update it some time, but I’d need to install Edgy Eft again.

    Basically, I’m willing to bet pounds to pennies that the problem is in either permissions or wikiconfig.py. Do an ls -l in the moin directory, make sure that your permissions are all fine and dandy.

    If they are, then insert an absolute path into wikiconfig.py to your underlay directory. Absolute paths saved me from several similar errors.

    I don’t know how experienced you are in linux, so it’s hard to know exactly how much hand holding you’ll need here. If the above doesn’t make sense, bear in mind I’m not a moin tech support line, but I’ll try and help you out as best I can.

    Comment by James — April 10, 2007 @ 3:43 pm

  4. viking replied with some great information:

    “hi… thanks for hte prompt reply.. i think u wudnt have got that error if you would have renamed farmconfig.py to farmconfig_ and removed the byte code generated. Talking to one of developers he told that the package manager installation makes farmconfig as the default one. Once i removed the farmconfig from /etc/moin/, i could solve hte problem. Perhaps if u try this and suceed u can put it in ur blog. ”

    So consider mving the farmconfig file!

    Comment by James — April 10, 2007 @ 4:28 pm

  5. It’s really a great and helpful piece of info. I’m satisfied that you
    just shared this helpful information with us.

    Please keep us up to date like this. Thanks for sharing.

    Comment by Fredericka — June 27, 2013 @ 2:05 am

  6. An impressive share! I’ve just forwarded this onto a colleague who has been conducting a little research on this. And he actually bought me lunch simply because I stumbled upon it for him… lol. So let me reword this…. Thank YOU for the meal!! But yeah, thanx for spending the time to talk about this matter here on your internet site.

    Comment by facebook marketing services — August 6, 2013 @ 10:34 pm

  7. I’ve been surfing online more than three hours today, yet
    I never found any interesting article like yours. It’s pretty worth enough for me.

    In my view, if all web owners and bloggers made good content as you did, the web will be a lot more
    useful than ever before.

    Comment by best offer dvd — June 4, 2014 @ 7:15 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: