User:WikiMaster/Wiki - Installation & Upgrading: Difference between revisions

From PortlandWiki
Jump to navigation Jump to search
(→‎MediaWiki: Upgrading: /usr/local/php53/bin/php update.php)
(→‎Interface: Changed "Interface" section to "Logo & Favicon Settings." + Added Read-Only Mode section.)
 
(3 intermediate revisions by the same user not shown)
Line 15: Line 15:
* [[mediawikiwiki:Manual:FAQ#Upgrading|Manual:FAQ#Upgrading]]
* [[mediawikiwiki:Manual:FAQ#Upgrading|Manual:FAQ#Upgrading]]


=== Interface ===
=== Read-Only Mode ===
* [[mediawikiwiki:Manual:FAQ#Changing_the_interface|Changing the interface]]
The following two examples show the <tt>$wgReadOnly</tt> setting to add to your [[mediawikiwiki:Manual:LocalSettings.php|LocalSettings.php]] file to lock the database while you upgrade.
* [[mediawikiwiki:Manual:$wgReadOnly|Manual:$wgReadOnly]]
: <code>$wgReadOnly = 'This wiki is currently being upgraded to a newer software version.';</code>
* [[mediawikiwiki:Manual:Lock the database|Manual:Lock the database]]
: <code>$wgReadOnly = "We are upgrading MediaWiki, please be patient. This wiki will be back in a few hours.";</code>
 
=== Logo &amp; Favicon Settings ===
* [[mediawikiwiki:Manual:FAQ#How_do_I_change_the_logo.3F|How do I change the logo?]]
* [[mediawikiwiki:Manual:FAQ#How_do_I_change_the_icon_in_the_browser.27s_address_line_.28favicon.29.3F|How do I change the icon in the browser's address line (favicon)?]]


== Using Git ==
== Using Git ==
Line 46: Line 54:
  git version 1.7.1.1
  git version 1.7.1.1
  [ps11244]$
  [ps11244]$
== Using Subversion ==
; Cheat with the sheet -- [http://www.abbeyworkshop.com/howto/misc/svn01/ Subversion Cheat Sheet]
; Read the book -- ''[http://svnbook.red-bean.com/ Version Control with Subversion: The Standard in Open Source Version Control]'' (Online version of the O'Reilly book.)
* [[mediawikiwiki:Subversion|Subversion]]
: This page shows how to download, update and revert MediaWiki and MW extensions using [[wikipedia:Subversion (software)|Subversion]].
* [[mediawikiwiki:Download from SVN|Download from SVN]]
: '''[[wikipedia:Subversion (software)|Subversion]]''' (SVN) is a version control software that allows users to download the very latest version of a branch, without having to wait for someone to get around to packaging it. Advantages to using Subversion include the latest version, vastly simplified updating, the ability to roll back an upgrade, the ability to create and [[mediazilla:|submit patches]].
* [[mediawikiwiki:Download from SVN#Upgrading_and_downgrading|Upgrading / Downgrading MediaWiki Using Subversion]]
: Upgrading between releases with SVN is simple. If you have direct access to the command-line on the server, you can enter the commands directly; alternatively, you can maintain a copy on a local machine and upload updated versions to the server.
=== Apache Project Page & SVN Clients ===
* Apache Subversion Project Page: [http://subversion.apache.org/ Apache™ Subversion®]
: MediaWiki [[mediawikiwiki:Download from SVN#Prerequisites|recommends]] downloading an "[http://subversion.apache.org/packages.html official client]" from Apache's [http://subversion.apache.org/ Subversion Project Page], or using a GUI like [http://tortoisesvn.tigris.org/ TortoiseSVN].
=== SVN: Web Development, Deployment & Maintenance Procedures ===
* [http://www.sitepoint.com/using-svn-for-web-development/ Using SVN for Web Development]
: How to use the Subversion system architecture for web development.
* [http://stackoverflow.com/questions/394662/best-way-to-use-svn-for-web-development Best way to use svn for web development]
: Features useful details on how to use SVN in a web development environment.
* [http://stackoverflow.com/questions/4950235/whats-a-good-way-to-version-control-a-website-development-project-that-includes What's a good way to version control a website development project that includes MediaWiki and WordPress installation?]
: The answer from [http://stackoverflow.com/ Stack Overflow] contributor [http://stackoverflow.com/users/602242/barduck barduck] is actually the worthwhile component to the above question.
=== Subversion: File Permissions | .htaccess | [[wikipedia:Httpd.conf|httpd.conf]] | svn:ignore ===
* [http://stackoverflow.com/questions/1215689/how-does-subversion-handle-file-permissions-and-a-htaccess-file How does Subversion handle file permissions and a .htaccess file?]
* [http://blog.bogojoker.com/2008/07/command-line-svnignore-a-file/ Command Line svn:ignore a file]
* [http://stackoverflow.com/questions/398008/deny-access-to-svn-folders-on-apache Deny access to .svn folders on Apache]
* [https://wiki.archlinux.org/index.php/Subversion_Setup#Miscellaneous_Configuration_Specifics Miscellaneous Configuration Specifics]
=== DreamHost Related ===
; SVN & DreamHost
* [http://wiki.dreamhost.com/Subversion DreamHost Wiki - Subversion]
* [http://wiki.dreamhost.com/Subversion#Subversion_on_DreamHost Using Subversion on DreamHost]
; DreamHost -- [http://wiki.dreamhost.com/Subversion#Using_Subversion_for_Web_development Using Subversion for Web development]
; Getting Root on DreamHost
* [http://mariolurig.com/coding/dreamhost-vps-root-access-system-monitoring/ Dreamhost VPS Root Access and System Monitoring]
* [http://wiki.dreamhost.com/DreamHost_PS#httpd.conf DreamHost PS#httpd.conf]
=== [[mediawikiwiki:Subversion#Check out|SVN Check Out Example]] ===
Use the following syntax format:
<nowiki>svn checkout http://svn.wikimedia.org/svnroot/mediawiki/folders_to_download</nowiki> sub_folder_name
To check out MediaWiki development trunk into the folder "wiki":
<nowiki>svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3 wiki</nowiki>
To check out the latest version of [[mediawikiwiki:Extension:Validator|Extension:Validator]] and set into the folder "Validator":
<nowiki>svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Validator Validator</nowiki>
== Additional SVN Reading Material ==
* [http://svnbook.red-bean.com/en/1.7/svn.serverconfig.choosing.html#svn.serverconfig.choosing.svn-ssh svnserve over SSH]
; Why you might want to use it
:- The network protocol is stateful and noticeably faster than WebDAV.
:- You can take advantage of existing SSH accounts and user infrastructure.
:-  All network traffic is encrypted.
; Why you might want to avoid it
:- Only one choice of authentication method is available.
:- No advanced logging facilities.
:- It requires users to be in the same system group, or use a shared SSH key.
:- If used improperly, it can lead to file permission problems.
* [http://blog.bodhizazen.net/linux/svnssh/ svn+ssh]
: This is a (brief) tutorial walking through svn+ssh.
==== [http://sleepyhead.de/howto/?href=svn Simple How-Tos: SVN] ====
'''Note to [[User:WikiMaster|Self]]:''' Refer to [http://sleepyhead.de/howto/?href=svn entire documentation] before doing anything.
; [http://sleepyhead.de/howto/?href=svn#svnsetup Server setup]
: The initiation of the repository is fairly simple (here for example /home/svn/ must exist):
<code># svnadmin create --fs-type fsfs /home/svn/project1</code>
; [http://sleepyhead.de/howto/?href=svn#svnssh Remote access with ssh]
: No special setup is required to access the repository via ssh, simply replace file:// with svn+ssh/hostname. For example:
<code># svn checkout svn+ssh://hostname/home/svn/project1</code>
* [http://csoft.net/docs/svn.html.en Subversion access with svn+ssh]
: The most basic method to access a Subversion repository is the '''svn+ssh protocol'''. As its name indicates, this protocol speaks to the SVN server via [http://csoft.net/docs/ssh.html SSH]. Your SVN client must be provided an URL of the form:
:: <code>svn+ssh://user@ssh.yourdomain.com/path</code>
:: <code>svn+ssh://user@server.csoft.net/path</code>
: Unlike the [http://csoft.net/docs/svnserve.html svnserve] and [http://csoft.net/docs/svndav.html http DAV] protocols, '''svn+ssh''' requires the use of real Unix accounts and Unix file permissions. Extra Unix accounts with a restrict svn+ssh shell can be configured from the [http://www.csoft.net/docs/cadm/index.html.en shell interface] or web interface. You will generally want to configure SSH public keys for passwordless authentication as well. Additional Unix groups are configurable in the same manner. Users can be granted read-only or read-write access on whole repositories with [http://resin.csoft.net/cgi-bin/man.cgi?sektion=1&topic=chmod chmod] and [http://resin.csoft.net/cgi-bin/man.cgi?sektion=1&topic=chgrp chgrp].
* [https://wincent.com/wiki/Upgrading_from_MediaWiki_1.6.8_to_1.6.9_using_Subversion Upgrading from MediaWiki 1.6.8 to 1.6.9 using Subversion]
; [http://svn.haxx.se/dev/archive-2004-03/0253.shtml svn+ssh Setup Mini-tutorial]
: Introduction: This Guide will explain in easy steps how to setup your Linux server working for Subversion repository access through SSH client access.


=== [http://www.linuxreaders.com/2011/02/04/how-to-patch-mediawiki-to-latest-version/ How to Patch MediaWiki to latest version] ===
=== [http://www.linuxreaders.com/2011/02/04/how-to-patch-mediawiki-to-latest-version/ How to Patch MediaWiki to latest version] ===
: Example -- Patch update [http://lists.wikimedia.org/pipermail/mediawiki-announce/2011-November/000103.html MediaWiki Release Candidate 1.18.0rc 1] to [http://lists.wikimedia.org/pipermail/mediawiki-announce/2011-November/000105.html MediaWiki 1.18.0]:
: Example -- Patch update [http://lists.wikimedia.org/pipermail/mediawiki-l/2013-December/042243.html MediaWiki 1.22.0] to [http://www.mediawiki.org/wiki/Release_notes/1.22#MediaWiki_1.22.3 MediaWiki 1.22.3]:
# Download Patch Into Main Directory: <code>wget http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.0.patch.gz</code>
# Download Patch Into Main Directory: <code>wget http://releases.wikimedia.org/mediawiki/1.22/mediawiki-1.22.3.patch.gz</code>
# Uncompress File: <code>gunzip mediawiki-1.18.0.patch.gz</code>
# Uncompress File: <code>gunzip mediawiki-1.22.3.patch.gz</code>
# Move Patch To Wiki Directory: <code>mv mediawiki-1.18.0.patch /home/(ssh-user-name)/portlandwiki.org</code>
# Move Patch To Wiki Directory: <code>mv mediawiki-1.22.3.patch /path/to/your/wiki</code>
# Apply Patch: <code>patch -i mediawiki-1.18.0.patch -p 1</code>
# Do a Dry Run First: <code>patch -p1 --dry-run < mediawiki-1.22.3.patch</code>
# Remove Patch File: <code>rm -rf mediawiki-1.18.0.patch</code>
# Apply Patch: <code>patch -i mediawiki-1.22.3.patch -p 1</code>
# Remove Patch File: <code>rm -rf mediawiki-1.22.3.patch</code>
;Source<nowiki>:</nowiki> [[mediawikiwiki:Manual:Upgrading#Using_patch|Manual:Upgrading#Using_patch]]


; Unix / Linux / Bash
; Unix / Linux / Bash

Latest revision as of 12:58, 2 March 2014

MediaWiki: Upgrading

BACKUP FIRST! Manual:Backing up a wiki
You can easily create a dump file(export/backup) of a database using the phpMyAdmin tool.
  • Consider making the Wiki read-only before creating the backup - see Manual:$wgReadOnly. This makes sure all parts of your backup are consistent (some of your installed extensions may write data nonetheless).
Developer hub
Sysadmin hub
From the command line, or an SSH shell or similar, change to the maintenance directory and execute the update script: $ php update.php Use this command instead: /usr/local/php53/bin/php update.php
Full report here: User:WikiMaster/The_Dingo_Ate_My_Wiki

Read-Only Mode

The following two examples show the $wgReadOnly setting to add to your LocalSettings.php file to lock the database while you upgrade.

$wgReadOnly = 'This wiki is currently being upgraded to a newer software version.';
$wgReadOnly = "We are upgrading MediaWiki, please be patient. This wiki will be back in a few hours.";

Logo & Favicon Settings

Using Git

Git downloads

You can download code directly via Git from the MediaWiki source code repository (browse code) or download a snapshot. To get the latest version of an extension, for instance, just clone the git master.

For example, if you have shell access to your server, you may do this to download the Validator extension:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Validator.git
Wikimedia Projects on Git
  • Projects - Big list of MediaWiki extensions and other Wikimedia project available for download from Git repository.
Help Resources
An example of downloading Validator using Git.
Using Git to download MediaWiki
Git Check DreamHost VPS
Instructions here: Pre-installed git
Last login: Sat Jun 16 07:47:42 2012 from 97.115.118.134
[ps11244]$ which git
/usr/bin/git
[ps11244]$ git --version
git version 1.7.1.1
[ps11244]$

How to Patch MediaWiki to latest version

Example -- Patch update MediaWiki 1.22.0 to MediaWiki 1.22.3:
  1. Download Patch Into Main Directory: wget http://releases.wikimedia.org/mediawiki/1.22/mediawiki-1.22.3.patch.gz
  2. Uncompress File: gunzip mediawiki-1.22.3.patch.gz
  3. Move Patch To Wiki Directory: mv mediawiki-1.22.3.patch /path/to/your/wiki
  4. Do a Dry Run First: patch -p1 --dry-run < mediawiki-1.22.3.patch
  5. Apply Patch: patch -i mediawiki-1.22.3.patch -p 1
  6. Remove Patch File: rm -rf mediawiki-1.22.3.patch
Source: Manual:Upgrading#Using_patch
Unix / Linux / Bash

Performance Tuning

Long-winded tutorial showing how to set up memcached on DH VPS and use it for domains hosted on DH shared servers.

References