Install MediaWiki
From KevinWiki
MySQL Databse Setup
CREATE DATABASE my_wiki; GRANT CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON my_wiki.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
Configure LocalSettings.php
-Add (or change to) the following lines. (The wiki is installed in the directory w
)
$wgScriptPath = "/w"; # Path to the actual files (right part of first rewrite rule). Should already be there $wgArticlePath = "/wiki/$1"; # Virtual path (left part of first rewrite rule). MUST be DIFFERENT from the path above! $wgUsePathInfo = true;
-and the following lines as well.
## This is added by Kevin. { # to restrict anonymous users from editing any page: set it false. $wgGroupPermissions['*']['edit'] = false; # to restrict anonymous users from reading any page: set it false. # $wgGroupPermissions['*']['read'] = false; # to I restrict account creation: set it false. $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['createpage'] = false; $wgGroupPermissions['*']['createtalk'] = false; $wgGroupPermissions['*']['writeapi'] = false; $wgAllowUserJs = true; $wgAllowUserCss = true; require_once("extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"); $wgAjaxSearch = true; # $wgVariantArticlePath = true; # $wgRedirectSources = true; ## This is added by Kevin. }
-Then create wiki.conf
file in the /etc/apache2/conf.d
directory and add.
# /var/www/w should be the directory where the wiki is installed. Alias /wiki /var/www/w/index.php
-the following lines are optional
<Directory /var/www/w/> Options +FollowSymLinks AllowOverride All order allow,deny allow from all </Directory> # AllowOverride All is to use .htaccess file if the default setup of it is disabled (AllowOverride None).