% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math} % this also loads fontspec
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
  % xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}
\hypersetup{
  pdftitle={mediawiki-admin-guide},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}

\title{mediawiki-admin-guide}
\author{}
\date{}

\begin{document}
\maketitle

\hypertarget{mediawiki-admin-guide}{%
\section{mediawiki-admin-guide}\label{mediawiki-admin-guide}}

mediawiki admin guide
\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#

This post will document some common procedures that an admin will need
to maintain a media wiki installation.

.. contents::

\hypertarget{what-version-of-mediawiki-are-we-running}{%
\section{What version of MediaWiki are we
running?}\label{what-version-of-mediawiki-are-we-running}}

View the source of any wiki page. Locate the generator meta tag inside
the head tag.

Example:

.. code-block:: html

\textless!DOCTYPE html PUBLIC ``-//W3C//DTD XHTML 1.0 Strict//EN''
``http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd''\textgreater{}

Main Page - mywiki

In the example above our generator is \emph{MediaWiki 1.16.2}.

\hypertarget{migrating-and-upgrading-a-mediawiki-install}{%
\section{Migrating and upgrading a MediaWiki
install}\label{migrating-and-upgrading-a-mediawiki-install}}

This documents the steps I took to migrate MediaWiki to a new server and
then upgrade to the latest version. RHEL4 to Ubuntu.

Install the webserver stack on new server:

.. code-block:: bash

sudo apt-get install apache2 php5 php5-mysql php5-cli php-apc graphviz
graphviz-dev

sudo cp -p /etc/apache2/sites-available/default
/etc/apache2/sites-available/001-wiki

sudo vim /etc/apache2/sites-available/001-wiki

Basic MediaWiki configuration:

.. code-block:: apache

\textless VirtualHost *:80\textgreater{} ServerAdmin webmaster@localhost
ServerName wiki.foxhop.net

LogLevel warn ErrorLog /var/log/apache2/error-wiki.log CustomLog
/var/log/apache2/access-wiki.log combined

DocumentRoot /www/wiki/mediawiki Options FollowSymLinks MultiViews
AllowOverride None Order allow,deny allow from all

Create directories and download sourcecode:

.. code-block:: bash

sudo mkdir /www sudo mkdir /www/wiki cd /www/wiki \# copy mediawiki
installation to new server and untar it sudo tar -zxvf
mediawiki-backup.tar.gz sudo chown -R root:www-data /www chmod 775
mediawiki/config/ -R

import MySQL dump into new server

.. code-block:: bash

mysql -u root -p wikidb \textless{} wikidb-dump-2012-11-26.sql

Enable Virtual Host and restart Apache

.. code-block:: bash

sudo a2ensite 001-wiki sudo a2dissite default sudo apache2 restart

Navigate to the new servers IP address or domain name and verify
migration.

\end{document}
