Skip to content
jdpond edited this page Dec 31, 2014 · 4 revisions
  1. 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)

Table of Contents

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://[email protected]:29418/mediawiki/core.git <YourDirectory>

Now checkout the mediawiki:

cd <YourDirectory>

git checkout -b REL1_22 origin/REL1_22

git clone -b master https://github.com/jdpond/WikiConfig.git "extensions/WikiConfig"

git submodule add -f https://github.com/jdpond/WikiConfig.git "extensions/WikiConfig"

chmod +x "extensions/WikiConfig/gitallextensions.sh"

"extensions/WikiConfig/gitallextensions.sh" -b REL1_22

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

cp WikiConfig/CleanLocal.php &#91;$wgScriptPath&#93;LocalSettings.php

popd

Then change the local settings in the [$wgScriptPath]

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






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







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 fetch

Additional Requirements (for Ubuntu)

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 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

sudo git clone https&#58;//gerrit.wikimedia.org/r/p/mediawiki/services/parsoid

cd parsoid/

sudo npm install

cd api

sudo cp localsettings.js.example localsettings.js

sudo vim localsettings.js

&#35; Modify 

&#35;         parsoidConfig.setInterwiki( &#39;localhost&#39;, &#39;http&#58;//localhost/mw/api.php&#39; )&#59;

&#35;




RHEL 6

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

I recommend you use

cd git

make prefix&#61;/usr/local all

sudo make prefix&#61;/usr/local install

Clone this wiki locally