Skip to content
jdpond edited this page Dec 31, 2014 · 4 revisions

Table of Contents

About WikiConfig

This extension (and utility) helps do a MediaWiki Setup that includes NameSpace based protections for Pages and Attachments/Files.

Following these instructions, you can set up your own templated MediaWiki platform that includes these features and many other niceties.

For information about NameSpace Protection, see [MediaWiki](http://www.mediawiki.org/wiki/Extension:NSFileRepo)

Useful Links

http://rogerdudler.github.io/git-guide/ http://www.mediawiki.org/wiki/Git

Get MediaWiki

This assumes you want to get a specific version of the mediawiki.

First, download the core objects:

git clone -n https://gerrit.wikimedia.org/r/p/mediawiki/core.git <Your Directory>
# or if you want to get a development version:
git clone -n ssh://[your github id]@gerrit.wikimedia.org:29418/mediawiki/core.git <YourDirectory>
Now checkout the mediawiki:
cd <YourDirectory>
git checkout -b REL1_24 origin/REL1_24
git clone -b master https://github.com/[your github id]/WikiConfig.git "extensions/WikiConfig"
git submodule add -f https://github.com/[your github id]/WikiConfig.git "extensions/WikiConfig"
chmod +x "extensions/WikiConfig/gitallextensions.sh"
"extensions/WikiConfig/gitallextensions.sh" -b REL1_24

Note: Use "HEAD" for the current development version.

Special Extensions

OpenID

pushd "extensions/OpenID"
git clone git://github.com/openid/php-openid.git
cp -Rp php-openid/Auth/ Auth
rm -rf php-openid
popd

Validator (required for all the SMW stuff)

rm -rf extensions/Validator
vim .gitmodules
#
# [submodule "extensions/Validator"]
#        path = extensions/Validator
#        url = https://github.com/wikimedia/mediawiki-extensions-Validator.git
git clone https://github.com/wikimedia/mediawiki-extensions-Validator.git extensions/Validator
pushd extensions/Validator
curl -sS https://getcomposer.org/installer | php
php composer.phar install
popd

Captcha

If you're using recaptcha, you need to go out and get from [

]Setup Local Settings

pushd extensions cp WikiConfig/CleanLocal.php [$wgScriptPath]LocalSettings.php popd

Copy and Change Standard Local Settings

pushd extensions
cp WikiConfig/CleanLocal.php &#91;$wgScriptPath&#93;LocalSettings.php
popd
Then change the local settings in the [$wgScriptPath]
$wgCacheEpoch &#61; max( $wgCacheEpoch, gmdate( &#39;YmdHis&#39;, @filemtime( &#95;&#95;FILE&#95;&#95; ) ) )&#59;
require_once( &quot;$IP/extensions&quot;.$wgScriptPath.&quot;LocalSettings.php&quot; )&#59;

You may want to change the logo and the favicon in extensions/[$wgScriptPath]LocalSettings.php

For Individual Modules

&quot;extensions\WikiConfig\gitallextensions&quot; &#45;b REL1_21

For an individual extension, add to the .conf file in WikiConfig or:

git submodule add  &#91;&#45;b REL&lt;1_21&gt;&#93;  &#45;&#45;force &#45;&#45; &quot;ssh&#58;//&#91;your github id&#93;@gerrit.wikimedia.org&#58;29418/mediawiki/extensions/NSFileRepo.git&quot;  &quot;extensions/NSFileRepo&quot;

Remove a submodule

To remove a submodule, you need to:

  1. Delete the relevant section from the .gitmodules file.
  2. Stage the .gitmodules changes git add .gitmodules
  3. Delete the relevant section from .git/config.
  4. Run git rm --cached path_to_submodule (no trailing slash).
  5. Run rm -rf .git/modules/submodule_name
  6. Commit
  7. Delete the now untracked submodule files
    1. rm -rf path_to_submodule

Refresh Everything

git pull &#45;&#45;recurse&#45;submodules
git fetch

Additional Requirements (for Ubuntu)

sudo apt&#45;get install php5&#45;json
sudo apt&#45;get install php5&#45;MySQL
sudo apt&#45;get install php5&#45;intl
sudo apt&#45;get install php&#45;apc
sudo service apache2 restart

Install VisualEditor

Visual Editor requires the installation of Parsoid - which is a server and varies by platform.

For Ubuntu

Followed the instructions here.

Install nodes

sudo apt&#45;get update
sudo apt&#45;get install &#45;y python&#45;software&#45;properties python g++ make
sudo add&#45;apt&#45;repository ppa&#58;chris&#45;lea/node.js
sudo apt&#45;get update
sudo apt&#45;get install nodejs
nodejs &#45;&#45;version &#35; should now print v0.10.x

Install Parsoid



RHEL 6

You're going to have compile your own git, so, check here for the latest

I recommend you use

git clone git&#58;//git.kernel.org/pub/scm/git/git.git 
cd git
make prefix&#61;/usr/local all
sudo make prefix&#61;/usr/local install