Difference between revisions of "How to update this wiki"

From Gender and Tech Resources

(Import database)
(Visual Editor)
 
(3 intermediate revisions by the same user not shown)
Line 24: Line 24:
  
 
=== Install  needed softwares ===
 
=== Install  needed softwares ===
  apt-get install php5 phpmyadmin mysql-server php5-intl php-patchwork-utf8 imagemagick git curl php5-curl php-pear libav-tools ffmpeg2theora oggvideotools
+
  apt-get install php5 phpmyadmin mysql-server php5-intl php-patchwork-utf8 imagemagick git curl php5-curl php-pear libav-tools ffmpeg2theora oggvideotools  
 
  pear install mail
 
  pear install mail
 
  pear install Net_SMTP
 
  pear install Net_SMTP
Line 71: Line 71:
 
php maintenance/update.php
 
php maintenance/update.php
 
ls -al extensions/
 
ls -al extensions/
composer require mediawiki/maps "*"
 
 
composer require mediawiki/maps "*" --update-no-dev
 
composer require mediawiki/maps "*" --update-no-dev
composer require mediawiki/semantic-maps "*"
 
 
composer require mediawiki/semantic-maps "*" --update-no-dev
 
composer require mediawiki/semantic-maps "*" --update-no-dev
 
ls -al extensions/
 
ls -al extensions/
 
php maintenance/update.php
 
php maintenance/update.php
 +
cd extensions
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
 
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
 
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
Line 124: Line 123:
 
cd extensions/
 
cd extensions/
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConfirmAccount.git
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConfirmAccount.git
cat /var/log/apache2/error.log
 
ls
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LookupUser.git
 
 
cat /var/log/apache2/error.log  
 
cat /var/log/apache2/error.log  
 
cd ..
 
cd ..
Line 132: Line 128:
 
cd extensions/
 
cd extensions/
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LookupUser.git
 
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LookupUser.git
 +
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/TimedMediaHandler.git
 +
git clone https://github.com/DaSchTour/piwik-mediawiki-extension.git piwik
 
cat /var/log/apache2/error.log  
 
cat /var/log/apache2/error.log  
 
cd ..
 
cd ..
php maintenance/update.php
 
php maintenance/update.php
 
php maintenance/update.php
 
php maintenance/update.php
 
php maintenance/update.php
 
 
php maintenance/update.php
 
php maintenance/update.php
 
cat /var/log/apache2/error.log  
 
cat /var/log/apache2/error.log  
Line 144: Line 137:
 
cat /var/log/mysql.log  
 
cat /var/log/mysql.log  
 
cat /var/log/mysql/error.log  
 
cat /var/log/mysql/error.log  
reboot
 
apt-get update
 
apt-get upgrade
 
ps ax
 
ping x.org
 
ifconfig
 
route
 
ping x.org
 
ifconfig
 
sudo ifconfig
 
ifconfig
 
nano /etc/network/interfaces
 
/etc/init.d/networking restart
 
ifconfig
 
nano /etc/network/interfaces
 
/etc/init.d/networking restart
 
ifconfig
 
 
cd /var/www/html/wiki/
 
cd /var/www/html/wiki/
 
updatedb
 
updatedb
locate bash_
 
cat /root/.bash_history
 
 
nano dbsettings.php  
 
nano dbsettings.php  
 
mysqldump  --password gtwiki > /home/b01/import/backupDBgtwikiVM-2-23032016.sql
 
mysqldump  --password gtwiki > /home/b01/import/backupDBgtwikiVM-2-23032016.sql
mysql --password gtwiki < /home/b01/import/gtwiki-07032016.sql
 
mysql --password -u root
 
 
mysql --password gtwiki < /home/b01/import/gtwiki-07032016.sql  
 
mysql --password gtwiki < /home/b01/import/gtwiki-07032016.sql  
 
ls images/
 
ls images/
ifconfig
 
mv -R /home/b01/import/images/ images/
 
mv --help
 
cp -R /home/b01/import/images/ images/
 
ls images/
 
cd images/
 
ls
 
cd images/
 
ls
 
cd ..
 
ls
 
rmdir -r images/
 
rm -r images/
 
ls
 
cd ..
 
cp -R /home/b01/import/images/ .
 
ls
 
cd images/
 
ls
 
cd ..
 
 
cd skins/
 
cd skins/
 
rm -r foreground/
 
rm -r foreground/
cp /home/b01/import/foreground/ .
 
 
cp -R /home/b01/import/foreground/ .
 
cp -R /home/b01/import/foreground/ .
ls
 
ls -al
 
 
cd ..
 
cd ..
ls
 
 
cp /home/b01/import/Logogti135.png skins/Vector/images/
 
cp /home/b01/import/Logogti135.png skins/Vector/images/
 
cat /var/log/apache2/error.log
 
cat /var/log/apache2/error.log
Line 219: Line 167:
 
parsoidConfig.setMwApi({ prefix: 'localhost', uri: 'http://localhost/wiki/api.php' });
 
parsoidConfig.setMwApi({ prefix: 'localhost', uri: 'http://localhost/wiki/api.php' });
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
And in /var/www/html/wiki/LocalSettings.php
 
And in /var/www/html/wiki/LocalSettings.php
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 245: Line 194:
 
$wgVisualEditorSupportedSkins = array( 'vector', 'monobook', 'foreground' );
 
$wgVisualEditorSupportedSkins = array( 'vector', 'monobook', 'foreground' );
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
Restart Parsoid
 
  service parsoid restart
 
  service parsoid restart
 +
 +
==== Troubleshooting ====
 +
* "Error loading data from server: HTTP 200. Would you like to retry?" see if php5-curl is installed
 +
* check if port, prefix and domain are the same in parsoid/settings.js and LocalSettings.php
 +
cat /var/log/parsoid/parsoid.log
 +
 +
=== Datepicker jquery ===
 +
To solve : "style module should define its position explicitly" when used with MW 1.26 : https://www.mediawiki.org/wiki/Topic:Sprswqpt682hyjki
 +
. nano /var/www/html/wiki/resources/Resources.php
 +
add 'position' line :
 +
'jquery.ui.datepicker' => array(
 +
    'position' => 'top',
 +
    'scripts' => 'resources/lib/jquery.ui/jquery.ui.datepicker.js',
  
 
= Configuration of the updated server =
 
= Configuration of the updated server =

Latest revision as of 00:17, 20 April 2016

Update process

This page document the update of this wiki from version 1.24.2 to version 1.26.2 including all its plug-in, based on :

Virtual Machine

Update on a new VM based on debian stable 64 bits 8.3

Install Mediawkiki 1.26.2

while installing threw web interface, add those plug-ins :

  • Cite
  • Gadgets
  • ImageMap
  • InputBox
  • Nuke
  • ParserFunctions
  • Renameuser
  • SpamBlacklist
  • SyntaxHighlight_GeSHi
  • TitleBlacklist
  • PDF Handler
  • wikieditor
  • LocalisationUpdate

Install needed softwares

apt-get install php5 phpmyadmin mysql-server php5-intl php-patchwork-utf8 imagemagick git curl php5-curl php-pear libav-tools ffmpeg2theora oggvideotools 
pear install mail
pear install Net_SMTP
dpkg-reconfigure exim4-config

add plug-ins as submodules

cd /var/www/html/gtwiki/
chmod -R 755 images
chown -R www-data:www-data
chown -R www-data:www-data
chown -R www-data:www-data images/
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MsUpload.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AdminLinks.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ReplaceText.git
git submodule add https://github.com/Alexia/mediawiki-embedvideo.git EmbedVideo
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/intersection.git intersection
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SelectCategory.git
git submodule add https://git.wikimedia.org/git/mediawiki/extensions/SemanticDrilldown.git
git submodule add https://git.wikimedia.org/git/mediawiki/extensions/SemanticForms.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticFormsInputs.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticCompoundQueries.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTransfer.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Babel.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/cldr.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/CleanChanges.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LocalisationUpdate.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Translate.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/UniversalLanguageSelector.git
mkdir NiceCategoryList2
cd NiceCategoryList2/
nano NiceCategoryList.php
cd ..
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
cd ..
cd ..
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
ls
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer
cd wiki/
ls
composer require mediawiki/semantic-media-wiki "~2.3.1" --update-no-dev
php maintenance/update.php
ls -al extensions/
composer require mediawiki/maps "*" --update-no-dev
composer require mediawiki/semantic-maps "*" --update-no-dev
ls -al extensions/
php maintenance/update.php
cd extensions
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
git submodule add -b REL1_26 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VisualEditor.git
git submodule update --init
cd VisualEditor/
git submodule update --init
cd ..
cd ..
apt-key advanced --keyserver keyserver.ubuntu.com --recv-keys 664C383A3566A3481B942F007A322AC6E84AFDD2
echo "deb https://releases.wikimedia.org/debian jessie-mediawiki main" > /etc/apt/sources.list.d/parsoid.list
sudo apt-get update && sudo apt-get install parsoid
apt-get update && apt-get install parsoid
apt-get update
apt-get install apt-transport-https
apt-get update && apt-get install parsoid
nano /etc/mediawiki/parsoid/settings.js
cp /etc/mediawiki/parsoid/settings.js /etc/mediawiki/parsoid/localsettings.js
nano /etc/mediawiki/parsoid/settings.js
nano /etc/mediawiki/parsoid/localsettings.js 
service parsoid restart
apt-get install nodejs
npm test
nano /etc/mediawiki/parsoid/localsettings.js 
cd extensions/
git clone https://github.com/kaltura/mwEmbed.git
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MwEmbedSupport.git
cd ../skins/
git clone https://github.com/thingles/foreground.git
rm -r foreground/
git submodule add git://github.com/thingles/foreground.git
nano /root/.bashrc 
apt-get install locate
updatedb
locate .bash_
cat ~/.bash_history
nano /etc/bash.bashrc
locate bash_history
nano /root/.bashrc 
nano /root/.bashrc 
cat ~/.bash_history
cd ..
ls
nano LocalSettings.php 
cat /var/log/apache2/error.log 
ls extensions/
cd extensions/
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConfirmAccount.git
cat /var/log/apache2/error.log 
cd ..
cp /home/b01/import/dbsettings.php dbsettings.php
cd extensions/
git submodule add https://gerrit.wikimedia.org/r/p/mediawiki/extensions/LookupUser.git
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/TimedMediaHandler.git
git clone https://github.com/DaSchTour/piwik-mediawiki-extension.git piwik
cat /var/log/apache2/error.log 
cd ..
php maintenance/update.php
cat /var/log/apache2/error.log 
cat /var/log/mysql.err 
cat /var/log/mysql.log 
cat /var/log/mysql/error.log 
cd /var/www/html/wiki/
updatedb
nano dbsettings.php 
mysqldump  --password gtwiki > /home/b01/import/backupDBgtwikiVM-2-23032016.sql
mysql --password gtwiki < /home/b01/import/gtwiki-07032016.sql 
ls images/
cd skins/
rm -r foreground/
cp -R /home/b01/import/foreground/ .
cd ..
cp /home/b01/import/Logogti135.png skins/Vector/images/
cat /var/log/apache2/error.log
rm -r skins/foreground/
cd extensions/
cd ../skins/
git clone git://github.com/thingles/foreground.git
cp -r /home/b01/import/foreground/assets/fonts/asap/ foreground/assets/fonts/
ls foreground/assets/fonts/
nano foreground/assets/stylesheets/foreground.css

Import database

mysql --password gtwiki < /media/usb0/gtwiki-07032016.sql

Additionnal configurations

Visual Editor

Some changes in the config of /etc/mediawiki/parsoid/settings.js :

parsoidConfig.setMwApi({ prefix: 'localhost', uri: 'http://localhost/wiki/api.php' });

And in /var/www/html/wiki/LocalSettings.php

# VisualEditor http://www.mediawiki.org/wiki/Extension:VisualEditor
 require_once "$IP/extensions/VisualEditor/VisualEditor.php";
 // Enable by default for everybody
 $wgDefaultUserOptions['visualeditor-enable'] = 1;
 // Don't allow users to disable it
 $wgHiddenPrefs[] = 'visualeditor-enable';
 // OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
 // URL to the Parsoid instance
 // MUST NOT end in a slash due to Parsoid bug
 // Use port 8142 if you use the Debian package
$wgVisualEditorParsoidURL = 'http://localhost:8142';
$wgVirtualRestConfig['modules']['parsoid'] = array(
  // URL to the Parsoid instance
  // Use port 8142 if you use the Debian package
  'url' => 'http://localhost:8142',
  // Parsoid "domain", see below (optional)
  'domain' => 'localhost',
  // Parsoid "prefix", see below (optional)
  'prefix' => 'localhost'
);
#to make it work width foreground
$wgVisualEditorSupportedSkins = array( 'vector', 'monobook', 'foreground' );

Restart Parsoid

service parsoid restart

Troubleshooting

  • "Error loading data from server: HTTP 200. Would you like to retry?" see if php5-curl is installed
  • check if port, prefix and domain are the same in parsoid/settings.js and LocalSettings.php
cat /var/log/parsoid/parsoid.log

Datepicker jquery

To solve : "style module should define its position explicitly" when used with MW 1.26 : https://www.mediawiki.org/wiki/Topic:Sprswqpt682hyjki . nano /var/www/html/wiki/resources/Resources.php add 'position' line :

'jquery.ui.datepicker' => array(
   'position' => 'top',
   'scripts' => 'resources/lib/jquery.ui/jquery.ui.datepicker.js',

Configuration of the updated server

Linux version

~$ uname -a
Linux debiangt 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux

Installed software

  • MediaWiki 1.26.2
  • PHP 5.6.17-0+deb8u1 (apache2handler)
  • MySQL 5.5.47-0+deb8u1
  • ICU 52.1

Installed skins

Skin Version

  • Cologne Blue –
  • Foreground – 1.2-alpha
  • Modern –
  • MonoBook –
  • Vector –

Installed extensions

Semantic extensions

Extension Version

  • Semantic Compound Queries 0.4 (40571f0) 21:30, 24 March 2015
  • Semantic Drilldown 2.0 (345f1b5) 19:56, 12 April 2015
  • Semantic Forms 3.2 (ab27659) 23:40, 26 March 2015
  • Semantic Forms Inputs 0.9.0 alpha (27a270c) 20:23, 17 April 2015
  • Semantic Maps 3.1.3
  • Semantic MediaWiki 2.1.3

Special pages

Extension Version

  • Admin Links 0.2.1 (e0bfb0e) 19:37, 6 April 2015
  • Collection 1.7.0
  • Confirm User Accounts – (3dc7bd1) 20:12, 20 April 2015
  • Data Transfer 0.6 (c1ab372) 19:29, 8 April 2015
  • Lookup User 1.3.1 (ec091e2) 20:17, 7 April 2015
  • Nuke 1.2.0
  • Renameuser –
  • Replace Text 1.0.2 (0da1656) 14:21, 22 April 2015
  • Translate 2015-03-30 (62fdea1) 20:15, 21 April 2015

Parser hooks

Extension Version

  • Babel 1.9.1 (bd46ded) 08:42, 22 April 2015
  • Cite
  • DynamicPageList 1.7.0 (504e2bc) 20:16, 7 April 2015
  • EmbedVideo 2.2.5 (feff399) 21:03, 16 March 2015
  • ImageMap –
  • InputBox 0.2.0
  • Maps 3.2.3
  • MsUpload 10.0
  • ParserFunctions 1.6.0
  • SyntaxHighlight 1.0.8.11-wmf1

Media handlers

Extension Version

  • PDF Handler – (2594ae3) 15:11, 21 April 2015
  • TimedMediaHandler 0.4.0 (2483627) 19:19, 20 April 2015

Spam prevention

Extension Version

  • SpamBlacklist –
  • Title Blacklist 1.5.0

DataValues

Extension Version

  • DataValues 1.0
  • DataValues Common 0.2.3
  • DataValues Geo 1.1.4
  • DataValues Interfaces 0.1.5
  • DataValues Validators 0.1.2

Other

Extension Version

  • Clean Changes 2014-12-29 (9e6a4c7) 19:41, 6 April 2015
  • Gadgets
  • Language Names 4.1.0 (CLDR 26) (fb90835) 07:42, 7 April 2015
  • LocalisationUpdate 1.3.0
  • MwEmbedSupport 0.3.0 (4c5bd38) 21:00, 23 March 2015
  • Piwik Integration 2.4.2
  • UniversalLanguageSelector 2015-03-30 (feefea4) 18:01, 22 April 2015
  • Validator 2.0.4
  • VisualEditor 0.1.0
  • WikiEditor 0.4.0