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</tt>. Note that both files belong to the apache</tt> 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</tt>, create a new directory in /home/subversion</tt> with the right name and then use svnadmin</tt> to make this directory a subversion repository:

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

Managing users
The password file is <t>/etc/svn-users</tt> and belongs to the apache</tt> user. To create new users, log in as apache</t> and use the htpasswd</tt> 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</tt>. This file belongs to the apache</tt> user. The syntax is very simple and almost self-explanatory. Refer to the 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</tt>) has been saved in /root/RPMs/</tt> on source</tt>. 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 httpd</tt> though: /etc/rc.d/init.d/httpd restart

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

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 httpd</tt> too.

Statistics
To check that eaccelerator is actually used, point your browser to the check_php.php script. eaccelerator should be mentionned somewhere 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.