User:WikiMaster/Wiki - Installation & Upgrading

From PortlandWiki
Revision as of 20:06, 16 January 2012 by WikiMaster (talk | contribs) (Move SVN info up.)
Jump to navigation Jump to search

MediaWiki: Upgrading

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).
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.
From the command line, or an SSH shell or similar, change to the maintenance directory and execute the update script: $ php update.php

Using Subversion

This page shows how to download, update and revert MediaWiki and MW extensions using Subversion.
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 submit patches.
Version Control with Subversion: The Standard in Open Source Version Control (Online version of the O'Reilly book.)
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.
This is a (brief) tutorial walking through svn+ssh.

Simple How-Tos: SVN

Note to Self: Refer to entire documentation before doing anything.

Server setup
The initiation of the repository is fairly simple (here for example /home/svn/ must exist):
# svnadmin create --fs-type fsfs /home/svn/project1
Remote access with ssh
No special setup is required to access the repository via ssh, simply replace file:// with svn+ssh/hostname. For example:
# svn checkout svn+ssh://hostname/home/svn/project1
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 SSH. Your SVN client must be provided an URL of the form:
svn+ssh://user@ssh.yourdomain.com/path
svn+ssh://user@server.csoft.net/path
Unlike the svnserve and 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 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 chmod and chgrp.
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 submit patches.
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.

How to Patch MediaWiki to latest version

Example -- Patch update MediaWiki Release Candidate 1.18.0rc 1 to MediaWiki 1.18.0:
  1. Download Patch Into Main Directory: wget http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.0.patch.gz
  2. Uncompress File: gunzip mediawiki-1.18.0.patch.gz
  3. Move Patch To Wiki Directory: mv mediawiki-1.18.0.patch /home/(ssh-user-name)/portlandwiki.org
  4. Apply Patch: patch -i mediawiki-1.18.0.patch -p 1
  5. Remove Patch File: rm -rf mediawiki-1.18.0.patch

DreamHost Related

Getting Root on DreamHost
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