mediawiki

Finishing the eee-box installation

It’s been a while since I blogged about the installation of my eee-box – and my intention to use it as a server.

Of course, I did some basic installation in the meantime – and the box is now running perfectly. :)

So – here’s the final chapter in this two-part series, and a list of everything I did to get the box up and running:

Basic tools

The first thing I missed was my good old vim – easy:

sudo apt-get install vim

did the trick. :)

I then made sure that updates happen automatically – there’s a good page on that in the serverguide, and all I had to make sure was that mailx was installed. Logwatch is also an option – but only after a mailsystem is up and running (see below).

Web-Stuff

MySQL installation was pretty easy: I followed the server guide’s page on this, and then created also /etc/mysql/conf.d/charsets.cnf (Download here) – this helped me get rid of some UTF8-errors on my old gentoo box already…

I then made the mysql server accessible from the outside by adding

bind-address my.ip.addr.ess

into /etc/mysql/my.cnf, then following this excellent website that explains everything on how to remote access a mysql database.

After that, I installed apache2 – again, the server guide’s page on that subject includes everything necessary. The guide’s page on PHP also has a lot of good information – I ended up installing php5, libapache2-mod-php5, php5-cli and php5-mysql. Finally, I created a phpinfo.php and deleted index.html, in /var/www.

For the usage of automatic WordPress updates, I also installed an ftp-server – again, just followed the server guide. In WordPress, when installing a plugin, I then have to enter “localhost” plus my local user name plus the corresponding password, whenever it asks for a connection information.

Finally, I installed mediawiki; the packages to install were mediawiki, mediawiki-math, imagemagick and php5-gd; the installation itself is again covered in the server guide.

After the configuration of mediawiki (make sure you use the old backward-compatible charset!), I enabled TeX and uploads and moved my old mediawiki according to my own blog entry (hey – they start to come in handy!!)

For some reason, I had to change the password of my mediawiki admin user after that – luckily, I found this blog entry… and then, I installed the cite extension – again, I followed my own guide on doing so. :)

Samba

For Samba, the installation was really easy; the corresponding page on the ubuntu server guide explains everything needed. All I had to do was to smbpasswd my working user – and everything worked. While I now have a nice NAS, I still wanted to be able to access my home share from outside – mainly due to filesharing, see below.

Mailserver

The mailserver is always a little tricky; I decided to go with dovecot, postfix, procmail and getmail. I started with dovecot (only use the instructions relating to dovecot, not the ones relating to postfix!), and for a proper postfix installation, I closely (!) followed this doc (also, I had to install procmail in order to get over this flawlessly). I created an alias for root pointing to my working user, as explained here. And finally, I installed getmail, as explained on howtoforge.

It took me three attempts – but following these documents in the given order should do it.

Filesharing

While I obviously know that filesharing involves a lot of illegal (or at least…. grey) activities, I still use it – how to get an ubuntu ISO file faster than via bittorrent? Not to speak of all the great american tv shows that you just can’t watch around here (not even DVD’s are available, sometimes….) – so, I still rely on bittorrent and, sometimes on mldonkey. The basic instructions I noted down a while ago were useful, when it came down to configuring mldonkey (it’s config files are in /var/lib/mldonkey…)

As for bittorrent, I highly recommend to go with devinw’s installer package that installs lighthttpd, rtorrent and wtorrent – it’s in the ubuntu forums and it worked after a couple of problems – read the forum entry in case of troubles!

Backup system

I then installed rsnapshot and configured it, following the work I did a while ago.

Upgrade to 9.04

Final step was to update to 9.04 – there is a good instruction provided by the canonical folks on how to do so.

The box now runs for something over 2 months – no problems, AT ALL! :)

Maybe I’ll go ahead and try some anti-spam solution, once again…. :)

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Mediawiki madness

After the upgrade to Ubuntu 9.04, my mediawiki stopped working properly – on all pages with TeX math stuff, I encountered the following error message, when viewing in the browser:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "MathRenderer::_recall". MySQL returned error "1267: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (localhost)".

After searching around (google has a LOT to say about mediawiki and collations – but all of it did not really help), I found out that the following combination works:

  1. All tables should be set to collation latin1_bin (and the database itself as well)
  2. I set up mediawiki, and when selecting the charset, I chose the mysql4 compatibility one (the last one in the list), leading to these entries in /etc/mediawiki/LocalSettings.php:
    $wgDBmysql5 = false;
  3. I created the file /etc/mysql/conf.d/charsets.cnf with the following content:

[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=latin1

[mysqladmin]
character-sets-dir      = /usr/share/mysql/charsets
default-character-set   = latin1

[mysqlcheck]
character-sets-dir      = /usr/share/mysql/charsets
default-character-set   = latin1

[mysqldump]
character-sets-dir      = /usr/share/mysql/charsets
default-character-set   = latin1

[mysqlimport]
character-sets-dir      = /usr/share/mysql/charsets
default-character-set   = latin1

[mysqlshow]
character-sets-dir      = /usr/share/mysql/charsets
default-character-set   = latin1

[myisamchk]
character-sets-dir      = /usr/share/mysql/charsets

[mysampack]
character-sets-dir      = /usr/share/mysql/charsets

[mysqld]
character-set-server    = latin1
default-character-set   = latin1

#found this on http://forums.gentoo.org/viewtopic-t-521569-highlight-mysql+collation+utf8.html
[php-apache2handler]
default-character-set   = latin1

With all this, my mediawiki (v1.13) works as before…

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Mediawiki 1.3.0 broken in Gentoo

28.09.08, 12:02 | Tags: ,,, | 1 comment

As I wanted to start with my studies revisions on M362 today, I realized that I couldn’t access my mediawiki-environment with all my notes any more!

The error message was something about a missing “includes/parser.php” file (“no such file or directory”).

When I googled for this, I stumbled upon a corresponding Gentoo bug – apparently, the mediawiki-package is broken. I have to admit, I begin to dislike Gentoo more and more for things like this – it seems that the distribution has lost quite a deal of package maintainers… while I am usually ok with the server packages (this is the first time this happens with a package on the server), I am struggling in maintaining a smooth client environment – which is why I decided to switch my Linux client over to Ubuntu. More on this to come soon…

Anyway, back to the mediawiki-problem. Digging into the stuff, I manually extracted the tar-ball (it’s in /usr/portage/distfiles/mediawiki-1.3.0.tar.gz). It seems that the following directories are completely missing when installing the package:

  • includes/db/
  • includes/parser
  • includes/specials

I manually copied them into my mediawiki-installation. After that, I had to run the upgrade.php (see mediawiki upgrade instructions) script by issueing

cd /var/www/localhost/htdocs/mediawiki/maintenance
php upgrade.php

After this, my installation runs fine, again; to be blunt, everything else would have been a disaster, to be honest… as all my study-notes are still in the wiki-environment…

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Mediawiki Cite extension

Today, I wanted to write an article in my internal mediawiki (in which I keep track of my study notes); as it was the first time I intended to include a reference to a book, I wanted to have this in the fancy wikipedia way with references and footnotes.

I quickly found out that this requires a mediawiki extension called “Cite“; with the instructions on the site, it was easy to install the extension (I had to emerge subversion first, however). Nice – now I can use <ref> within my mediawiki…. I just need to think about this whenever I upgrade mediawiki (i. e. to download Cite again and modify LocalSettings.php)

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Backup on the server

17.08.07, 14:30 | Tags: ,,,, | No comments

As already discussed yesterday, I am going for some serious backup stuff now.

Here’s the server’s rsnapshot.conf:

config_version 1.2
snapshot_root /mnt/usbhd/
cmd_cp /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_logger /usr/bin/logger
cmd_du /bin/du
cmd_rsnapshot_diff /usr/bin/rsnapshot-diff
interval fullbackup 6
verbose 2
loglevel 3
logfile /var/log/rsnapshot.log
exclude_file /etc/rsnapshot.exclude
link_dest 1
# LOCALHOST
backup /home/ localhost/
backup /etc/ localhost/
backup_script /home/thomas/.bin/backupmediawiki localhost/zuhausewiki/

And the new file ~/.bin/backupmediawiki looks like this:

#!/bin/sh
/usr/bin/mysqldump --user=root --password=**** wikidb > wikidb.sql
/usr/bin/tar -cjf zuhausewiki.images.tar.bz2 /var/www/localhost/htdocs/mediawiki/images

Now, with rsnapshot fullbackup, the backup process is initiated. The only thing I have to work on is finding out how to start it automatically when the USB HDD is plugged in. As the Gentoo Wiki is down at the moment, I will wait for this.

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon
  • Page 1 of 2
  • 1
  • 2
  • >