Contents
- Before you go on
- Why I wrote this?
- Piece of Advice #1
- Piece of Advice #2
- Backing Up your Moin wiki
- Some Vitamin C and One Aspirin. Removing Moin
- Downloading and Unpacking
- Installing Moin 1.3
- Creating your wiki
- Testing Moin 1.3
- First Problems
- Testing Again
- Enjoying Moin 1.3
- Migrating "data" from 1.2.4 to 1.3
- Messages you need to submit
Before you go on
This "surviving" writing is based on my experiences I had using/trying to use:
- Gnu/Linux Debian 3.1
- kernel 2.4.18-newpmac
- Moin 1.2.4
Moin 1.3
- Apache 1.x
the Apache1.x setting I tried also has worked for Apache2 (apache2.conf)
- Mozilla 1.7.3
- Python 2.3.4
python-dev (apt-get install python-dev)
OldWorld G3 Powerbook 350 MHz
Why I wrote this?
I had a huge headache after reading, trying, and looking for piece-of-cake documentation about 'migrating' to 1.3 from 1.2.4. In the end, I had to take a couple of aspirins and a much longer road, mixing some explanations from:
README,
README.migration,
- and some of comments inside the migration scripts (unbelievably, it was just the last script the best to be read!) .
Yes, lots of reading!
Maybe it also important to mention that if you are an end-user just like me (intelligent person but not a geek, nor someone who can easily go from one technology to another in just one nano second - like developers make it look) the whole process may take about 2 hours. Hopefully, this will take a lot less if you read this (maybe only 45 minutes!) and everything goes just like I write it.
Piece of Advice #1
No matter what you read and what instructions you follow, ALWAYS take notes of everything you do, step by step. Believe me, it's perfectly likely you'll see yourself a bit lost after so much doing and reading, and scratching your head.
Piece of Advice #2
BACK UP all the information you have about your currently running Moin 1.2.4.
By everything I just mean:
- the directory where you currently run your Moin.
As I am Debian end-user, I used apt-get install moin to install 1.2.4. That was good in the sense that I had almost everything installed for me (I only had to follow the instructions from README.Debian) and it took me 5 minutes to be editing Moin pages.
- Following that README.Debian file instructions means I ended up with:
/var/local/lib/name_of_wiki_instance --- very important. It has the pages you created/modified.
/var/local/lib/htdocs --- no need to back it up unless you changed css/images after installing 1.2.4
For a Gentoo user who has used emerge to install, the default directory for Moin code and executables is /usr/lib/python*.*/site-packages/MoinMoin
- Debian placed these files and directories for me:
/etc/moin/farmconfig.py --- no need to back it up unless you edited after installing 1.2.4
/usr/share/moin --- no need to back it up unless you modified anything after installing 1.2.4
/usr/share/lib/python2.3/site-packages/MoinMoin --- no need to back it up unless you modified anything special after installing 1.2.4
Don't worry, if you do not know how to make backups, I'll explain in the next chapter.
Backing Up your Moin wiki
This is just one way out of many that you can use to back up your data. So, I backed up the aforementioned 'dirs' and 'data'
$ cd /var/local/OldWikis/ $ tar cvpf my_wiki.tar mywiki
For this example, I had my wikis in /var/local/OldWikis
Of course, you will do something similar to all 'dirs' and 'data' you think it's important to keep it backed up.
Some Vitamin C and One Aspirin. Removing Moin
The vitamin C is good to prevent heart attacks. What? Yes, you may have one because I removed everything I had in my box regarding Moin, no matter whether I had it backed up or not.
The aspirin is in case you start feeling headaches worrying about your 'to-be-removed' data ...
I will add more info later to complement this or to make it more "friendly"
$ rm -rf /usr/share/moin $ rm -rf /usr/lib/python2.3/site-packages/MoinMoin $ rm /etc/moin/farmconfig.py $ rm -rf /var/local/lib
Downloading and Unpacking
Well, you know the drill. You can either use your web browser "download manager" or 'wget' (i.e.). As regular user I chose 'wget'.
$ wget -c http://arch.thinkmo.de/moin--main--1.3.tar.gz
Once it has been 100% downloaded, let's unpack it.
$ tar xvzf moin--main--1.3.tar.gz
Installing Moin 1.3
Go to the dir you unpack moin--main--1.3.tar.gz
From here and on, very like:
But if you prefer to stay here, just keep reading then. However, maybe it is a good idea to have the aforementioned pages charged on a different 'tab' (if you are using Mozilla, for instance).
So, we are inside our recently unpacked Moin-1.3 directory. Next step is to let 'python' install and generate an install.log
$ python setup.py install --record=install.log
Read the install.log once installation has succeded. Take notes of the paths where all data was directed. You would get something like this:
/usr/lib/python2.3/site-packages/MoinMoin/ /usr/bin/cachecleaner /usr/bin/cachecleaner /usr/bin/globaledit /usr/bin/moin-dump /usr/bin/pagescleaner /usr/bin/pstats /usr/bin/repair-language /usr/share/moin/
Please note that I only listed a summary and you will get a list with many subdirectories under MoinMoin/ and moin/. For more information, please visit HelpOnInstalling/BasicInstallation.
Creating your wiki
Next, let's create a 'moin instance'. Rememeber a 'wiki instance' is nothing else but your wiki-site, and you will be able to have many instances if you need to.
Before you create your 'wiki instance', think of a simple, easy-to-rememeber name for your wiki. Please, I strongly recommend you to visit HelpOnInstalling/WikiInstanceCreation for more information about sizes and locations.
$ mkdir /var/local/AllMyWikis # you could choose any other path :)
Notice: for example purposes, I chose the name AllMyWikis and that's where I can place all the wiki instances I need/want to create. Also, as I got the control of my Edbuntu box, I wil proceed with the public wiki settings described on HelpOnInstalling/ApacheOnLinux, but using a shorter way (at least it is shorter for me).
Let's create your wiki!
for example purposes, I chose the name 'moining' this time. Also remember you could use apache2.conf instead of httpd.conf.
$ cd /var/local/AllMyWikis $ mkdir moining $ cp -R /usr/share/moin/data /var/local/AllMyWikis/moining/ $ cp -R /usr/share/moin/underlay /var/local/AllMyWikis/moining/ $ cp /usr/share/moin/config/wikiconfig.py /var/local/AllMyWikis/moining/ $ echo "" >>/etc/apache/httpd.conf $ echo "Alias /wiki/ \"/usr/share/moin/htdocs/\"" >>/etc/apache/httpd.conf $ echo "ScriptAlias /moining \"/var/local/AllMyWikis/moining/cgi-bin/moin.cgi\"" >>/etc/apache/httpd.conf
Now, permissions are very important settings.
$ chown -R www-data.www-data /var/local/AllMyWikis/moining # check that USER and GROUP are correct $ chmod -R ug+rwX /var/local/AllMyWikis/moining # USER.GROUP may read and write $ chmod -R o-rwx /var/local/AllMyWikis/moining # everybody else is rejected
Well, that's about it. You have already installed MoinMoin wiki. All you have to do now is proceed with the setting of wikiconfig.py.
Testing Moin 1.3
Now it is time to test your Moin.
If you see it working but without content, see MoinMoinBugs/EmptyWiki.
Follow the instructions on HelpOnInstalling/TroubleShooting.
First Problems
Mainly, I can say I have minor problems understanding the instructions for the Apache settings and following some of the instructions on HelpOnInstalling/ApacheOnLinux. However, must I admit these "problems" may be due only to my misunderstanding and lack of knowledge.
Anyways, I do suggest that if you do not understand the 'full path' concept, just make sure that your wikiconfig.py has these lines correctly
data_dir = '../data/' data_underlay_dir = '../underlay/' url_prefix = '/wiki'
Testing Again
Follow the instructions on HelpOnInstalling/TroubleShooting
Enjoying Moin 1.3
It should work! When it does, Moin just rocks!
Migrating "data" from 1.2.4 to 1.3
Data is the equivalent for Moin wiki pages. So actually, when we backed up the data directory, we saved those pages so that they are transformed into Moin 1.3 format.
MoinMoinBugs/MigrationIssues contains a list of things that happen during the migration process but are not documented. Mostly minor stuff, but the paranoid admin will prefer to know about it rather than fear that something went wrong.
Overall, migration works fine.
Basically, what you do is to execute several scripts that are well indicated by a number. Also, you can read all scripts comments inside them (I did) but usually, the just repeat the stuff written in previous scripts, so after reading number 6 comments you get real bored
Of course, in order to use the scripts you have to copy the data directory
$ cd to_where_you_stored_the_backup_tar_file $ tar xvpf the_tar_file $ cd /usr/lib/python2.3/site-packages/MoinMoin/scripts/migration/ $ cp -a the_data_directory_residing_in_the_unpacked_tar_file . # note the '.' dot at the end
Next, you make all .py scripts executable
chmod +x 12_to_13_mig1.py chmod +x 12_to_13_mig3.py chmod +x 12_to_13_mig3.py ...etc
Obviously, you can use a better command to make all scripts executable at once.
Then, you just have to execute each script, starting from #1
$ ./12_to_13_mig1.py
or also
$ for f in `\ls -1 12_to_13_mig*.py`; do echo $f; ./$f; done
You'll see a lot of 'output' and do not panic if sometimes you read Error..... That is "normal" ;-p
AFAIK, if scripts really fail, you will see not "new directory.number" created, so, if you do see such directory, it means the script did its job well.
Now, you go on with 2nd script and keep repeating the procedure until you get to the last script.
$ ./12_to_13_mig2.py
Finally, just copy the data directory -that was transformed by the scripts you have just run- to the data directory in current your wiki instance.
Do not forget to check permissions are set correctly. If they are not, do the following.
$ chown -R www-data.www-data /var/local/AllMyWikis/moining $ chmod -R ug+rwX /var/local/AllMyWikis/moining $ chmod -R o-rwx /var/local/AllMyWikis/moining
Happy wiking!!!
If you have attachments with non-ASCII chars in their names, take a look at MoinMoinBugs/UnicodeDecodeErrorInAttachmentName.
Messages you need to submit
Please, do use the @SIG stuff.
Did you have problems with 1.2 slashes (/) being turned into 1.3 escapes (2F) rather than real slashes? -- -- JohnWhitlock 2004-12-20 22:27:49
Nevermind - running the first script twice on the same data will result in ugly problems. -- JohnWhitlock 2004-12-20 22:54:54