Install MediaWiki

From KevinWiki

(Difference between revisions)
Jump to: navigation, search
m (MySQL Databse Setup)
 
(One intermediate revision not shown)
Line 1: Line 1:
-
[[Category:MediaWikiRelated]]
+
[[Category:MediaWiki Related]]
==MySQL Databse Setup==
==MySQL Databse Setup==
Line 18: Line 18:
-and the following lines as well.
-and the following lines as well.
<source lang="php">
<source lang="php">
-
## This is added by Kevin. {
+
## This is added by Kevin. {
-
# to restrict anonymous users from editing any page: set it false.
+
# to restrict anonymous users from editing any page: set it false.
-
$wgGroupPermissions['*']['edit'] = false;
+
$wgGroupPermissions['*']['edit'] = false;
-
+
 
-
# to restrict anonymous users from reading any page: set it false.
+
# to restrict anonymous users from reading any page: set it false.
-
# $wgGroupPermissions['*']['read'] = false;
+
# $wgGroupPermissions['*']['read'] = false;
-
+
 
-
# to I restrict account creation: set it false.
+
# to restrict account creation: set it false.
-
$wgGroupPermissions['*']['createaccount'] = false;
+
$wgGroupPermissions['*']['createaccount'] = false;
-
+
 
-
$wgGroupPermissions['*']['createpage']      = false;
+
$wgGroupPermissions['*']['createpage']      = false;
-
$wgGroupPermissions['*']['createtalk']      = false;
+
$wgGroupPermissions['*']['createtalk']      = false;
-
$wgGroupPermissions['*']['writeapi']        = false;
+
$wgGroupPermissions['*']['writeapi']        = false;
-
+
 
-
$wgAllowUserJs  = true;
+
$wgAllowUserJs  = true;
-
$wgAllowUserCss  = true;
+
$wgAllowUserCss  = true;
-
+
 
-
require_once("extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
+
require_once("extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
-
+
 
-
$wgAjaxSearch  =      true;
+
$wgAjaxSearch  =      true;
-
# $wgVariantArticlePath =      true;
+
# $wgVariantArticlePath =      true;
-
# $wgRedirectSources            =      true;
+
# $wgRedirectSources            =      true;
-
+
 
-
## This is added by Kevin. }
+
$wgLogo = "/w/skins/common/images/myWikiLogo.png";
 +
 
 +
# This is to enable ParserFunctions extension and it must be installed first.
 +
# the ParserFunctions extension is required to use templates.
 +
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
 +
 
 +
## This is added by Kevin. }
</source>
</source>

Latest revision as of 11:54, 6 April 2009


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 to /var/www/w/LocalSettings.php file. (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 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;

$wgLogo = "/w/skins/common/images/myWikiLogo.png";
 
# This is to enable ParserFunctions extension and it must be installed first.
# the ParserFunctions extension is required to use templates.
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
 
## 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).
Personal tools