MediaWiki:Config

Some configuration notes about our installation.

=Apache=

Note that subversion needs Apache2 to run properly. We use the standard install from RedHat. The Apache2 server (httpd) is stopped started and restarted as follows:

/etc/rc.d/init.d/httpd stop /etc/rc.d/init.d/httpd start /etc/rc.d/init.d/httpd restart

The Apache configuration file is located at /etc/httpd/conf/httpd.conf. The only modifications done were:


 * AcceptPathInfo to beautify MediaWiki's URLs:
 * 1) JP Renaud
 * 2) AcceptPathInfo is required for the nice URLs in the wiki so that
 * 3) requests to /wiki/Page send to /w/index.php?page=Page

AcceptPathInfo on

Alias /wiki /var/www/html/w/index.php Alias /index.php /var/www/html/w/index.php
 * Two aliases to beautify Mediawiki's URLs
 * 1) JP Renaud
 * 2) Aliases for the wiki to get nice URLs

=PHP= The standard PHP install from RedHat is just fine too although we also need php-mysql for MediaWiki (see the section on MySQL below). To speed-up the websites, a PHP cache program (eaccelerator) has been installed. This is described below.

=Subversion=

subversion.conf
The subversion RPMs were downloaded from the subversion website. A copy of the relevant RPMs is still stored in /root/RPMs.

The configuration of the Apache server for subversion is kept in the file /etc/httpd/conf.d/subversion.conf:

LoadModule dav_svn_module    modules/mod_dav_svn.so
 * 1) Needed to do Subversion Apache server.

LoadModule authz_svn_module  modules/mod_authz_svn.so
 * 1) Only Needed if you decide to do "per-directory" access control.


 * 1) Direct access to the repositories in /home/subversion #
 * 1) Direct access to the repositories in /home/subversion #

 DAV svn SVNParentPath /home/subversion

AuthzSVNAccessFile /etc/svn-rules
 * 1) Access control policy


 * 1) Require a valid user

Require valid-user
 * 1)   Satisfy Any


 * 1) How to authenticate a valid user
 * 2) (they are stored in /etc/svn-users)

AuthType Basic AuthName "Subversion repositories" AuthUserFile /etc/svn-users



The repositories are in /home/subversion (and not in /var/www/html). They belong to the apache user. The access rules are in /etc/svn-rules and the users in /etc/svn-users. Note that both files belong to the apache user. We require authentification for everybody (i.e. there is anonymous read access). This is something that we might change in the future.

Creating new repositories
To create a new repository, log in as apache, create a new directory in /home/subversion with the right name and then use svnadmin to make this directory a repository:

su apache cd /home/subversion mkdir newproject svnadmin create newproject

Managing users
The password file is /etc/svn-users and belongs to the apache user. To create new users, log in as apache and use the htpasswd command. Basically:

htpasswd /etc/svn-users newuser     # to add a new user htpasswd /etc/svn-users -D olduser  # to delete an old user htpasswd /etc/svn-users existinguser # to change the password of an existing user

Tweaking access rules
The access rules are in /etc/svn-rules. This file belongs to the apache user. The syntax is very simple and almost self-explanatory. Refer to the [http:// Subversion RedBook] for details.

=WebSVN=

subversion.conf
=Mediawiki=

MySQL
As root: up2date mysql up2date mysql-server up2date php-mysql

Configuration
=eaccelerator= As Mediawiki is quite CPU intensive, it is very advantageous to cache the php scripts in compiled form so that execution is faster. This is done on source via the eaccelerator program. The speed-up is very impressive.

Instalation
Download the right RPM (Redhat EL3, x86) from. One copy (php-eaccelerator-4.3.2_0.9.3-4.1.el3.rf.i386.rpm) has been saved in /root/RPMs/ on source. Install the RPM, as root:

cd /root/RPMs rpm -i php-eaccelerator-4.3.2_0.9.3-4.1.el3.rf.i386.rpm

That's it! You need to restart Apache though: /etc/rc.d/init.d/apache restart

Configuration
The configuration options are kept in /etc/php.d/eacceletator.ini

Eaccelerator is switched on and configuration is fine by default (i.e. no editing of the file). If you modify this file, you probably need to to restart too.

Statistics
To check that eaccelerator is actually used, point your browser to the check_php.php script. eaccelerator should be mentionned next to the Powered by Zend logo. The interface is definitely snappier so you'd notice if it's not there.

To see what is actually cached by eaccelerator, point your browser to the check_eaccelerator.php script. Note that eaccelerator should cache Mediawiki and WebSVN scripts.