WhyNotWiki / MediaWiki / Upgrades done

From WhyNotWiki

Jump to: navigation, search

[edit] Upgrade to MediaWiki-1.10.0

MediaWiki / Upgrade to 1.10.0 edit

> wget http://download.wikimedia.org/mediawiki/1.10/mediawiki-1.10.0.tar.gz
> tar -xzf mediawiki-1.10.0.tar.gz


> svn_load_dirs.pl -t '1.10.0' http://svn.tylerrick.com/wiki/vendor current ~/mediawiki-1.10.0/
Directory /home/tylerrick/mediawiki-1.10.0/ will be tagged as 1.10.0
Please examine identified tags.  Are they acceptable? (Y/n) y
Running /usr/bin/svn commit -m Load /home/tylerrick/mediawiki-1.10.0/ into vendor/current.
Running /usr/bin/svn update
Running /usr/bin/svn cp -m Tag vendor/current as vendor/1.10.0.
 http://svn.tylerrick.com/wiki/vendor/current http://svn.tylerrick.com/wiki/vendor/1.10.0
Checking out http://svn.tylerrick.com/wiki/vendor/1.10.0 into /tmp/svn_load_dirs_rmrLHMC38w/my_tag_wc_named_1.10.0
Running /usr/bin/svn checkout http://svn.tylerrick.com/wiki/vendor/1.10.0 my_tag_wc_named_1.10.0
Running diff -u -x .svn -r /home/tylerrick/mediawiki-1.10.0/ /tmp/svn_load_dirs_rmrLHMC38w/my_tag_wc_named_1.10.0
Cleaning up /tmp/svn_load_dirs_rmrLHMC38w


~/whynotwiki.com/script > ./wikidb_backup
~/whynotwiki.com/script> ll db_backups/
-rw-rw-r--  1 tylerrick pg817420 125172794 May 15 22:03 tyler_wiki_20070515T2203.sql


wiki/trunk > svn merge http://svn.tylerrick.com/wiki/vendor/1.9.0 \
                       http://svn.tylerrick.com/wiki/vendor/current

> svn st --no-color | grep "^C"
C      skins/monobook/main.css
C      skins/common/common.css
C      includes/Parser.php
C      includes/EditPage.php

> svn st --no-color | /bin/grep "^C" | sed 's/^C//' | vimopen

> cp skins/monobook/main.css.working skins/monobook/main.css.backup
> svn revert skins/monobook/main.css
> svn revert skins/common/common.css
# Oops, I did that the wrong way!

includes/Parser.php (due to my bug-fix patch)
<<<<<<< .working
                $openmatch = preg_match('/(<table|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
=======
                $openmatch = preg_match('/(?:<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
>>>>>>> .merge-right.r25
                $closematch = preg_match(
<<<<<<< .working
                    '/(<\\/table|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
=======
                    '/(?:<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
>>>>>>> .merge-right.r25

# Manually merged/resolved includes/Parser.php and includes/EditPage.php .

> svn ci -m 'Merging MediaWiki-1.10.0 into the trunk'

> svn merge http://svn.tylerrick.com/wiki/vendor/1.9.0/skins/monobook/main.css http://svn.tylerrick.com/wiki/vendor/current/skins/monobook/main.css ./skins/monobook/main.css
C    skins/monobook/main.css

> svn merge http://svn.tylerrick.com/wiki/vendor/1.9.0/skins/common/common.css http://svn.tylerrick.com/wiki/vendor/current/skins/common/common.css ./skins/common/common.css
C    skins/common/common.css

> cp skins/monobook/main.css.merge-right.r* skins/monobook/main.css && svn resolved $_
> cp skins/common/common.css.merge-right.r* skins/common/common.css && svn resolved $_
> svn ci -m 'Merging MediaWiki-1.10.0 into the trunk -- the 2 files that I missed'

Visiting the site now produces a database error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "Title::loadRestrictions". MySQL returned error "1146: Table 'tyler_wiki.page_restrictions' doesn't exist (mysql.tylerrick.com)".

... which isn't too surprising, since there were several schema changes in 1.10.0.

Following http://www.mediawiki.org/wiki/Manual:Upgrading_MediaWiki

> cd maintenance/
> /usr/local/php5/bin/php update.php
X-Powered-By: PHP/5.2.1
Content-type: text/html

MediaWiki 1.10.0 Updater

Going to run database updates for tyler_wiki
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds...0
...hitcounter table already exists.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...logging table already exists.
...user_newtalk table already exists.
...transcache table already exists.
...trackbacks table already exists.
...externallinks table already exists.
...job table already exists.
...langlinks table already exists.
...querycache_info table already exists.
...filearchive table already exists.
...querycachetwo table already exists.
...have ipb_id field in ipblocks table.
...have ipb_expiry field in ipblocks table.
...have rc_type field in recentchanges table.
...have rc_ip field in recentchanges table.
...have rc_id field in recentchanges table.
...have rc_patrolled field in recentchanges table.
...have rc_old_len field in recentchanges table.
...have user_real_name field in user table.
...have user_token field in user table.
...have user_email_token field in user table.
...have user_registration field in user table.
...have log_params field in logging table.
...have ar_rev_id field in archive table.
...have ar_text_id field in archive table.
...have page_len field in page table.
...have rev_deleted field in revision table.
...have img_width field in image table.
...have img_metadata field in image table.
...have img_media_type field in image table.
...have ss_total_pages field in site_stats table.
...have iw_trans field in interwiki table.
...have ipb_range_start field in ipblocks table.
...have ss_images field in site_stats table.
...have ipb_anon_only field in ipblocks table.
Adding ipb_enable_autoblock field to table ipblocks...ok
...have user_newpass_time field in user table.
...have user_editcount field in user table.
Adding rc_deleted field to table recentchanges...ok
Adding log_id field to table logging...ok
Adding log_deleted field to table logging...ok
Adding ar_deleted field to table archive...ok
Adding ipb_deleted field to table ipblocks...ok
Adding fa_deleted field to table filearchive...ok
Adding rev_len field to table revision...ok
Adding ar_len field to table archive...ok
Adding rev_parent_id field to table revision...ok
...page_restrictions table does not exist, skipping new field patch
...already have interwiki table
...indexes seem up to 20031107 standards
Already have pagelinks; skipping old links table updates.
...image primary key already set.
The watchlist table is already set up for email notification.
...watchlist talk page rows already present
...user table does not contain old email authentication field.
Logging table has correct title encoding.
...page table already exists.
revision timestamp indexes already up to 2005-03-13
...rev_text_id already in place.
...page_namespace is already a full int (int(11)).
...ar_namespace is already a full int (int(11)).
...rc_namespace is already a full int (int(11)).
...wl_namespace is already a full int (int(11)).
...qc_namespace is already a full int (int(11)).
...log_namespace is already a full int (int(11)).
...already have pagelinks table.
...templatelinks table already exists
No img_type field in image table; Good.
Already have unique user_name index.
...user_groups table already exists.
...user_groups is in current format.
...wl_notificationtimestamp is already nullable.
...timestamp key on logging already exists.
Setting page_random to a random value on rows where it equals 0...changed 0 rows
Checking for additional recent changes indices...
...index on ( rc_namespace, rc_user_text ) seems to be ok
...index on ( rc_user_text, rc_timestamp ) seems to be ok
...redirect table already exists.
Checking for backlinking indices...
Checking if pagelinks index pl_namespace includes field pl_from...
...index pl_namespace on table pagelinks seems to be ok
Checking if templatelinks index tl_namespace includes field tl_from...
...index tl_namespace on table templatelinks seems to be ok
Checking if imagelinks index il_to includes field il_from...
...index il_to on table imagelinks seems to be ok
Creating page_restrictions table...ok
Migrating old restrictions to new table...ok
Deleting old default messages (this may take a long time!)...Done
Checking site_stats row...ok.
Purging caches...done.
Done.
 


[edit] Installation of SemanticMediaWiki

MediaWiki / Installation of Semantic MediaWiki 0.7 edit

> cd ~/whynotwiki.com/wiki/trunk/extensions
> wget http://superb-east.dl.sourceforge.net/sourceforge/semediawiki/semediawiki-0.7.tar.gz
> tar -xzf semediawiki-0.7.tar.gz
> ls
SemanticMediaWiki/

LocalSettings.php:

#---------------------------------------------------------
# Semantic MediaWiki
# http://meta.wikimedia.org/wiki/Semantic_MediaWiki

include_once('extensions/SemanticMediaWiki/includes/SMW_Settings.php');
$smwgIQDefaultLinking = 'all';
enableSemantics('whynotwiki.com');
trunk > svn add extensions/SemanticMediaWiki
trunk > sc -m "Installed SemanticMediaWiki 0.7"

Visited Special:SMWAdmin to finalize the installation (create the necessary tables).

Verified installation by creating Semantic MediaWiki / Sandbox.

 
Personal tools