Install MediaWiki
From KevinWiki
(Difference between revisions)
m (→MySQL Databse Setup) |
|||
Line 4: | Line 4: | ||
<source lang="sql"> | <source lang="sql"> | ||
CREATE DATABASE my_wiki; | CREATE DATABASE my_wiki; | ||
- | GRANT CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON my_wiki.* TO | + | GRANT CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON `my_wiki`.* TO `wikiuser`@`localhost` identified by 'password'; |
FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
</source> | </source> | ||
- | |||
==Configure <code>LocalSettings.php</code>== | ==Configure <code>LocalSettings.php</code>== |
Revision as of 07:15, 4 March 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 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).