Manual talk:Running MediaWiki on Debian GNU/Linux

From MediaWiki.org
Jump to: navigation, search
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).


obsolete instructions?[edit | edit source]

A lot of the instructions are irrelevant and out of date.

As of April 8th, 2007, Mediawiki 1.7 is now a part the stable Debian GNU/Linux version 4.0, codenamed "etch".

To clean things up we could split this into three parts.

  1. Clear instructions for users of the stable version.
  2. Clear instructions for users of the unstable/testing version.
  3. Non Debian ways of doing things for users that can not use the available packages.

Any reference to older versions of MediaWiki and alternative methods of installing MediaWiki is highly irrellevant.

TeX Support[edit | edit source]

You need these packages installed:

  • ocaml
  • imagemagick
  • gs
  • cjk-latex
  • php4-imagick
apt-get install ocaml imagemagick gs cjk-latex php4-imagick

After installtion, enable inline LaTeX equations by uncommenting:

$wgUseTeX           = true;

in LocalSettings.php file.

Next compile texvc in your math directory:

cd /var/www/wiki/math
make

read math/README for further detailed instructions. Maybe those instructions arent enough for the possible errors. Could someone help with that?

Old problems[edit | edit source]

For example, this problem that does not exist any more:

It tried to install it, but I could not find any LocalSettings.php file (seems to be needed). There is however a dangling symlink with that name. What should that file contain?

When I browse http://myhost/mediawiki/config/ it tells me:

 MediaWiki 1.4.14 installation
 Wiki is configured.
 Already configured... return to the wiki.
 (You should probably remove /var/lib/mediawiki/config for added security.)

But when I return to the wiki (http://myhost/mediawiki/index.php) it tells me that the wiki isn't configured yet.


Had the same problem, and SOLVED it this way:
1) remove the default AdminSettings.php and LocalSettings.php files from /var/lib/mediawiki directory; that files came with the 'mediawiki' package and for some reason were no use after the package installation;
2) return to 'http://myhost/mediawiki/config/index.php' page, which is now working fine, and configure wiki;
3) following the instructions move /var/lib/mediawiki/LocalSettings.php to /etc/mediawiki/ and chmod it to 600;
4) comment out following section in /usr/share/mediawiki/index.php:

 if( !file_exists( 'LocalSettings.php' ) ) {
         if ( file_exists( 'config/LocalSettings.php' ) ) {
                 die( "To complete the installation, move <tt>/var/lib/mediawiki$
         } else {
                 die( "You'll have to <a href='config/index.php'>set the wiki up$
         }
 }

5) try to run wiki; if error occures, change line 25 in /usr/share/mediawiki/index.php from:

require_once( './LocalSettings.php' );

to:

require_once( '/etc/mediawiki/LocalSettings.php' );

That's all. It works for me, but IT NEEDS TO BE CHECKED by someone experienced, maybe this solution implies some security leaks?

To be honest I wouldn't be installing a new wiki on 1.4 now, mediawiki is a fast improving web app and people are likely to wan't to run the latest version not whatever old version thier distro has. Also the debian model of "one copy only and installed where the package manager wants it" doesn't fit very well with the webapp module of "possiblly multiple copies and installed where the websites are". Finally imo you shouldn't be running servers on testing/unstable without a very good reason. Plugwash 23:37, 25 February 2006 (UTC)

The reason that for "one copy only and installed where the package manager wants it" is so that the system can keep your installation up do date.

On the point of "running servers on testing". Each version of Debian is used almost unchanged for a long time. Last version upgrade took almost 2 years. Where possible using the stable system is a good idea. On the other hand system administrators often set up special servers for certain applications like MediWiki. In that case running testing or even "unstable" is way to keep up with newer versions of available software. The core system is quite stable and Apache2, mysql and other basic services tend not to break. Upstream developers and debian package maintainers are not making unstable software. The fact that Debian calls it unstable refers to the fact that the Debian-packaging has not been tested and that the software is a new version. The Debian Mediawiki package maintainers are doing an excellent job. You are probably better of trusting them rather than doing manual installs and upgrades your self, unless you relay know what you are doing. gragnar

excellent instructions[edit | edit source]

I'm completely new to wiki and just followed these instructions and it all works!!! The only problem I had was with TeX support. My problem was not with compiling texvc, it even worked from the command line, but not for the web server. The problem was solved by chmod 777 (instead of 666) to the images/math and images/tmp directories. I changed this on the main page because I don't think it can harm anyone, and maybe other people also need this.

Anyway, these instructions are excellent!!

I (ChrisDennis) agree. It's all up and running on my server, and it's only 1am!

The only problem I had was that the mediawiki-1.4.9 untarred with all the files belonging to user:group 501:501 -- there was no corresponding user or group on my system. I changed everything to root:root, but that didn't work. After a bit more reading, I changed both the user and group in /etc/apache2/apache2.conf from 'www-data' to 'httpd', and then chown'ed all the mediawiki files to httpd:httpd. Then it worked.

The other irritation was that browsing to http://myserver/mediawiki in Firefox gave a message asking what to do with a PHTML file; browsing to http://myserver/mediawiki/index.php works fine.

Ya, you're doing an excellent job maintaining this. Thanx.
149.99.85.143 19:51, 12 March 2006 (UTC)

localhost problem...[edit | edit source]

I did all the things described here but when I try to get into the page I'm redirected to 'localhost', even when I'm not there!! I think this is not an apache problem, since all other pages/folders/etc on the same server work just fine. So what happens is I can only use the wiki when I access it from the server where I installed it... this is such a drag! I searched all of the config/php/css files and none of them mentions localhost!! what is going on!?

If I try:
http://fullpathtoserver/wiki
I get the localhost problem, on the other hand:
http://fullpathtoserver/wiki/index.php/Main_Page
works! From then on, everything works fine, except when I try to edit something, after I save the localhost thing happens again... So, I guess my problem is in index.php.

I did something that helped, added these two lines to the LocalSettings.php:

  • unset($wgServer);
  • unset($wgProto);

HOWEVER, only:
http://fullpathtoserver/wiki/
woks, on the other hand:
http://fullpathtoserver/wiki
still does not... damn!

And adding those lines makes the {{SERVER}} var disappear. so THAT IS NOT A FIX!

Could this maybe be a bug??? I'm running version 1.3.7 Please help...


Actually I think this is an Apache problem. When you specify a URL like http://fullpathtoserver/wiki Apache knows that "wiki" resolves to a directory and sends a redirect back to http://SERVERNAME/wiki/ where SERVERNAME is the value set in your httpd.conf. You need to edit your Apache config and set an appropriate servername. You will see this problem any time you refer to any directory without providing the trailing slash and your server name is set to something other than your "real" name.

http://httpd.apache.org/docs/mod/core.html#servername

Hope this helps.

-- Jeff Clement

Multi-Processing Modules[edit | edit source]

Does MediaWiki work with other apache2 MPM? Like apache2-mpm-worker

apt-get install mediawiki[edit | edit source]

It would be excellent if someone packaged MediaWiki for Debian and put it in some apt repository. 196.200.85.103 00:16, 24 Mar 2005 (UTC)

Additional Packages to install for Debian GNU/Linux[edit | edit source]

I followed the instructions here to install the wiki on Debian LAMP and the instructions were great! One problem I ran into, didn't have anything directly to do with installation but I noticed some of the FAQ solutions point to running PHP-cli for some maintenance things. I needed to also:

apt-get install php4-cli

I am in no way an expert here so I'm not sure if this should be added without further testing.

Success report[edit | edit source]

Unsure if this is useful to anyone, but these instructions worked for me too, a novice, August 2005. My only suggestion is that the instructions beginning with Once configuration is done you'll need to move the created LocalSettings.php to the parent directory might be placed in the PHP installer as well as here.

Help[edit | edit source]

Hi. I'm having troubles installing the latest stable of Wikimedia. Running PHP 4.3.10-16, whenever code like the following runs (wiki/includes/Skin.php:92) :

$options = array( 'highlightbroken', 'hover' );
foreach( $options as $opt ) { ... }

$opt is being filled by an array, not the string 'highlightbroken'. This is breaking the install... anyone have any thoughts? If so, email me (danroy@gmail.com)

seems a strange issue, i've never seen anyone else report what version of debian is this and how did you install php. Plugwash 01:20, 1 September 2005 (UTC)

How to configure Mediawiki package?[edit | edit source]

I prefer to use packages where possible, and now that Mediawiki has hit Testing, I've just installed the package. But since the instructions assume you've used a tarball, I can't figure out how to configure it from the instructions. :(

Please help.

It appears that everything is put in /var/lib/mediawiki and by default it can be accessed from http://server/mediawiki/ --66.131.254.160 00:29, 17 December 2005 (UTC)

I'm using Debian as well, and I prefer to make use of packages as well. But as long as there is no official Debian package available--I didn't want to wait for it. I don't see the point, why not to use the tarball for first and, when Etch is available, install the official Debian mediawiki package. Since the most important parts of your mediawiki site will go to the database, you can rip your previous mediawiki home directory off and access the database thereafter by the official Debian mediawiki gear.

So, I just created a /usr/local/mediawiki directory, where I unpacked the tarball. The Running_MediaWiki_on_Debian_GNU/Linux Debian mediawiki howto guides you right well to the installation process.--I spotted one glitch in the apache part, since I needed to tell the webserver where to find the mediawiki scripts, but that was easily done, as I added the lines below to a newly created /etc/apache/conf.d/mediawiki.conf:

Alias /wiki /usr/local/mediawiki

<Directory /usr/local/mediawiki/>
       Options +FollowSymLinks
       AllowOverride All
       order allow,deny
       allow from all
</Directory>

Hope to help.--80.135.145.145

master source/multi-slave[edit | edit source]

Apparently, the site pointed out by the create_slave_wiki link is down. Neither there is that page cached on google -- and everyone is just pointing to that single page. I didn't find a mirror for it. So, can anybody point out another source, where one can get that script--or even better the whole page?--80.135.145.145 15:14, 26 December 2005 (UTC)

errors from cti.ecp.fr site[edit | edit source]

Has something moved? And if so to where?

aptitude update
Err http://www.cti.ecp.fr binary/ Packages
  301 Moved Permanently
Ign http://www.cti.ecp.fr binary/ Release
Err http://www.cti.ecp.fr source/ Sources
  301 Moved Permanently

Aptitude install: Math folder? Where?[edit | edit source]

These instructions seem a little old. The math folder doesn't appear with a fresh install or with the mediawiki-math install via aptitude. Am I missing something? I have no idea how to install LaTeX support. I followed these instructions to the letter. — Preceding unsigned comment added by Appliedluck (talkcontribs) 2010-02-12T03:18:20

I second this. I found texvc in my /usr/bin/ directory. a^2 between math tags worked. No need for these instructions. — Preceding unsigned comment added by Martinoc (talkcontribs) 2010-04-18T02:51:53

If you just do a sudo apt-get install mediawiki-math, you shouldn't have to do anything else. At least that's how it worked for me. --Stefan2 23:44, 9 February 2012 (UTC)