Difference between revisions of "Help:Running MediaWiki on SuSE Linux 9.3"

From lensowiki
Jump to: navigation, search
(Math Formulars with texvc)
 
m (1 revision(s))
(No difference)

Revision as of 05:34, 19 July 2006

 

Installing MediaWiki on SuSE Linux 9.3


This text describes my personal experience installing MediaWiki on a quite fresh installation of SuSE Linux 9.3.

  • Please note: I am not a professional server admin; the Wiki runs in a closed environment, so security issues are not really dealt with here. Also, I am describing the state as the system is running, without a clue why :-) It might well be, that I am listing useless packages as well.

Most of information was extracted from [1]


Needed software

YaST tells me, that for apache2 the following packages are installed:

* apache2
* apache2-mod_auth_mysql
* apache2-mod_php4
* apache2-prefork

For php, we have

* php4
* php4-exif
* php4-gd	(Note: this is necessary for working with thumbnails!)
* php4-gettext
* php4-mysql
* php4-session

For mysql, we have

* mysql
* mysql-administrator
* mysql-client
* mysql-shared

Procedure

The first step was to check, whether the web server was running. This can be done by either using a browser on the server and typing

http://localhost

or from another computer and use the server's name or IP. If the apache default pages are installed, they should appear.

Hint: SuSE makes administration of services quite easy, if you know about the start- and stop-scripts. For apache, the script is “rcapache2”, which understands (among others) the arguments “start”, “stop” and “restart”. I had to restart the apache server several times during installation.

In order to make the wiki accessible every time the server is on, you should also set the webserver to be started on boot via YaST.

This done, I extracted the downloaded MediaWiki into the default web server path resulting in folder name of /srv/www/htdocs/mediawiki.... and changed the name of the new directory to “wiki”.

After cd'ing into the wiki directory, I did a

chmod a+w config

in order to be able to configure the wiki.

Then I set up the mysql database. The packages listed above were installed, MySQL was started using the SuSE rcmysql script, which functions like the rcapache2 script. If the database should also be started on boot of the server, be sure to set this up with the YaST runlevel editor (runlevels 3 and 5 should suffice).


Then a database was created like detailed on [2] ( In a previous installation, I did not set up the database at all but let the wiki installer do the job; but due to a hdd crash on that computer, I had to import an old database dump - this is a long and different story and I cannot describe what eventually led to success. )

After all this, the setup tool was called by simply browsing to the wiki directory and following the steps the software told me.


Edits in the configuration files

I adapted the /etc/php.ini with following:

* memory_limit = 20M
* post_max_size = 20M
* upload_max_filesize = 20M

Uploads were already enabled; this was different to my previous SuSE9.0 installation, where it took me quite a while to find out how to eventually enable uploads.

in /srv/www/htdocs/wiki/LocalSettings.php, I changed:

* $wgDisableUploads = false;
* $wgUseImageResize = true;

and I replaced the default logo with my own.

As for my in-house installation I do not need the “donations” and “current events” links in the menu bar, I also copied the respective array definitions from <wikidir>/includes/DefaultSettings.php and pasted them at the end of my LocalSettings.php, with the not wanted lines commented out by double slashes ( // ).


Now the wiki does, what I wanted it to do.


Math Formulars with texvc

  • texvc-binary was compiled on a RedHat machine, but it works on Suse Linux as well. Download texvc-binary from SourceForge.
  • copy texvc as a binary into the math/-directory (e.g. /srv/www/htdocs/wiki/math).
  • check, if latex and dvips is available and executable for the Webserver (e.g. apache with user wwwrun). Open shell as root, set user to wwwrun with su - wwwrun and call latex and dvips. If the program was not found, install tetex with yast.
  • check, if convert from ImageMagick package is available and executable for the Webserver. Call convert from shell as user wwwrun. If the program was not found, install ImageMagick with yast.
  • check, if gs (GhostScript) package is available and executable for the Webserver. Call gs from shell as user wwwrun. If the program was not found, install gs GhostScript.
  • If packages were already installed, you have to set permissions to execute the mentioned binary properly. The webserver user (e.g. wwwrun) should have the rights to execute convert, gs, latex, dvips for example if wwwrun is member of a group that has the permission to execute convert.
  • edit the file LocalSetings.php in wiki-directory (e.g. /srv/www/htdocs/wiki/LocalSettings.php) and search for $wgUseTex and set $wgUseTex=true.
  • Create a tmp/-Directory as a subdir of wiki-directory (e.g. /srv/www/htdocs/wiki/tmp). The tmp-directory should be writable for the Webserver user (e.g. wwwrun).

What to do if things don't work

  • closing the wiki window of your browser, emptying the browser cache and then opening up again a wiki window might resolve some strange effects
  • after completing the steps above, I restarted the apache webserver and the mysql database by using the SuSE rcapache2 and rcmysql scripts.

(tbc)

I am not yet finished with wiki configuration; I am currently working on the formulas.


I wish everyone good luck with installing MediaWiki on SuSE Linux!

For criticism and/or questions feel free to contact me: wolfram <at> strempfer <dot> de