Contents |
Check the following USE flags:
imagemagick math tetex vhosts
|_ is actually needed to display math in MediaWiki
# emerge mediawiki # ln -s /var/www/localhost/htdocs/mediawiki/ /var/www/schmid.dk/wiki
start a browser and browse to http://www.sitename.dk/wiki - select to set up the Wiki
Site name : SchmidWiki Contact e-mail : [my email address] Sysop account name : schmid Password / Again : [my password] MySQL server : servitor Database name : wikidb DB username : wikiuser DB password / Again : [wikiuser password]
# mv config/LocalSettings.php . # vim LocalSettings.php
$wgUseTeX = true;
$wgMathPath = "{$wgUploadPath}/math";
$wgMathDirectory = "{$wgUploadDirectory}/math";
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";
# rm -fr config
I hate to wait 10 seconds for refresh, when I log in, so I hacked it:
# sed -i -e "s/10;url/0;url/g" /var/www/localhost/htdocs/mediawiki/includes/OutputPage.php
You can change the style by altering the files of the standard monobook style:
mediawiki/stylesheets/monobook/main.css <- main stylesheet mediawiki/LocalSettings.php <- logo ($wgLogo)
Backup all dirs but 'math' and 'tmp' from '/var/www/localhost/htdocs/mediawiki/images'. Backup LocalSettings.php.
Manually:
$ mysqldump -u wikiuser -p wikidb |gzip >/tmp/wiki_backup.gz
In a script:
$ mysqldump -u wikiuser -p[wikiuser password] wikidb |gzip >/tmp/wiki_backup.gz
If you are upgrading MediaWiki from an older version, the old database is automatically converted for the new version without any problems.
And it works:
Euler's identity:
The first ebuild of MediaWiki was created in November 2004, one month after schmid.wiki was started, so I first installed it "the hard way", which was actually really easy.
First, I checked whether I had mySQL installed (never used it...)
# emerge -p mysql
...
[ebuild R ] dev2004-10-18b/mysql-4.0.20-r1
|
|_ yes, it is installed.
Then, I added it to the default runlevel
# rc-update -a mysql default <- add it to the default runlevel
# /usr/bin/mysql_install_db <- configuration
# rc default <- start it up
# mysqladmin -u root -h servitor password 'new_password' <- create root user with new password
# mysqladmin -p -h servitor create wikidb
# mysql -u root -p
mysql> use mysql
mysql> update user set Password=PASSWORD('mypassord_here'); <- this is an ugly hack - fix it
later...
# emerge dev-lang/ocaml # emerge imagemagick # emerge tetex
# wget http://mesh.dl.sourceforge.net/sourceforge/wikipedia/mediawiki-[newest version].tar.gz
# tar -xvzf mediawiki-[newest version].tar.gz
# mv mediawiki-[newest version] /var/www/schmid.dk/wiki <- 'wiki' is the new URL name for
the MediaWiki installation
# cd /var/www/schmid.dk/wiki
# chmod a+w config
# cd /var/www/schmid.dk/wiki/math
It seems that the syntax used for the 'convert' command in the texvc source is wrong for convert 6.1.3:
# vim render.ml
Change this:
let cmd_convert finalpath = "convert -quality 100 -density 120 ps:- " ^ finalpath ^ " >/dev/null 2>/dev/null"
To this:
let cmd_convert finalpath = "convert -quality 100 -density 120 - " ^ finalpath ^ " >/dev/null 2>/dev/null"
And compile it:
# make
Create and set permissions for math PNG file directory 'math' and temporary directory 'tmp':
# mkdir math tmp # chown apache:users math tmp # chmod 744 math tmp