{{H:h|system admin toc}}

==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 [http://meta.wikimedia.org/wiki/Help:Installation]

===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 <pre><nowiki>http://localhost</nowiki></pre> 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 -Y�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 <pre>chmod a+w config</pre> 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 [http://meta.wikimedia.org/wiki/MySQL_config]
( 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 [http://prdownloads.sourceforge.net/wikipedia/texvc-linux-x86-20050202.tar.gz?download texvc-binary] from SourceForge.
* copy texvc as a binary into the math/-directory (e.g. /srv/www/htdocs/wiki/math).
* check, if <tt>latex</tt> and <tt>dvips</tt> is available and executable for the Webserver (e.g. apache with user <i>wwwrun</i>).  Open shell as root, set user to wwwrun with <tt>su - wwwrun</tt> and call <i>latex</i> and <i>dvips</i>. If the program was not found, install <i>tetex</i> with <i>yast</i>.
* check, if <tt>convert</tt> from ImageMagick package is available and executable for the Webserver. Call <i>convert</i> from shell as user <i>wwwrun</i>. If the program was not found, install <i>ImageMagick</i> with <i>yast</i>.
* check, if <tt>gs</tt> (GhostScript) package is available and executable for the Webserver. Call <i>gs</i> from shell as user <i>wwwrun</i>. If the program was not found, install <i>gs GhostScript</i>.
* 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 <tt>convert, gs, latex, dvips</tt> for example if <i>wwwrun</i> is member of a group that has the permission to execute <tt>convert</tt>. 
* edit the file <i>LocalSetings.php</i> in wiki-directory (e.g. /srv/www/htdocs/wiki/LocalSettings.php) and search for <tt>$wgUseTex</tt> and  set <tt>$wgUseTex=true</tt>.
* 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.


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