X-Git-Url: https://iankelling.org/git/?p=mediawiki-setup;a=blobdiff_plain;f=Mediawiki_Setup_Guide;h=440beaffd1f50cd5372d2452456f61229eedb50b;hp=b410697bc76cfb83b43480228e918de4af9f7037;hb=44712fafcec81eae9e1908d004054e54b3b5b523;hpb=6bc8621a503a1372f2c534f2b99485e9d0ec9329
diff --git a/Mediawiki_Setup_Guide b/Mediawiki_Setup_Guide
index b410697..440beaf 100644
--- a/Mediawiki_Setup_Guide
+++ b/Mediawiki_Setup_Guide
@@ -1,8 +1,5 @@
== Introduction ==
-'''Currently undergoing revisions to upgrade from mediawiki version 1.23 to 1.27.
-Should be done on 5/30/2016'''
-
'''tldr''': Automated setup on gnu/linux after you set options in [[#Dependent Variables and Functions]], except email. Any code which is not ready to be run has bold text saying so immediately before it.
''' Goals / Why use this guide? '''
@@ -21,15 +18,15 @@ Should be done on 5/30/2016'''
* Self hosting, single Linux system with Bash shell
* Root shell is assumed throughout
-* Code blocks are [https://en.wikipedia.org/wiki/Idempotent idempotent] unless stated otherwise
+* Code blocks are [https://en.wikipedia.org/wiki/Idempotent idempotent]
'''Version Support'''
Very minor adjustments needed for other distros. Help expand this list.
-* Mediawiki 1.23
-* Fedora 20 (tested)
-* Ubuntu 14.04 (tested)
-* Debian 7
+* Mediawiki 1.27
+* Debian 8 (tested)
+
+Pre 5/2016 revisions ran Mediawiki 1.23, tested on Fedora 20 and Ubuntu 14.04.
== Production Server Prerequisites ==
@@ -98,8 +95,8 @@ export mw_branch=REL1_27
# customize these questions to something your contributors would know,
# is not super common / scriptable, and doesn't have the answer in the question
captchaArray() {
- if ! grep -Fx '$localSettingsQuestyQuestions = array (' $mwc
- tee -a $mwc <<'EOF'
+ if ! grep -Fx '$localSettingsQuestyQuestions = array (' $mwc; then
+ tee -a $mwc <<'EOF'
$localSettingsQuestyQuestions = array (
"What is the name of the wiki software this site (and wikipedia) uses?" => "Mediawiki",
"What does f in ofswiki.org stand for?" => "Free"
@@ -124,47 +121,47 @@ export mw=/var/www/$mwdomain/html/w
export mw_email="admin@$mwdomain"
-Here we define some small useful bash functions. This should be part of the same file.
+Here we define some small useful bash functions. This can be part of the same file.
== Install Mediawiki Dependencies ==
@@ -203,15 +207,46 @@ The best way to get core dependencies is to install the mediawiki package itself
[[mediawikiwiki:Manual:Installation_requirements|Manual:Installation_requirements]]: Overview of installation requirements.
+Note, this guide needs a little adjustment before it will work with php7.0: make sure settings are still valid, update ini path.
+
@@ -356,48 +396,39 @@ a2ensite $mwdomain.conf
Then, copy the input to apache-site below and insert it into the apache config.
-Here, I use my scripts to setup apache. It's behind nginx because the same server hosts other sites which are not convenient to use the same apache instance.
+Here, we use some scripts automate setting up the Let 's Encrypt cert and
+the apache config.
+
-
-
-Turn on the new configuration
-
Now mediawiki should load in your browser at $mwdomain .
-Allow proper search bots and internet archiver bots, via [[Mediawiki:Robots.txt]]
+Allow proper search bots and internet archiver bots, via [[Mediawiki:Robots.txt]],
+and install the default skin.
'''Skippable Notes'''
@@ -426,7 +458,6 @@ teeu $mwc<
Settings I recommend which are different than the defaults.
@@ -465,8 +496,7 @@ EOF
# Increase from default of 2M to 100M.
# This will at least allow high res pics etc.
php_ini=$(isdeb && echo /etc/php5/apache2/php.ini || echo /etc/php.ini)
-sed -i 's/^\(upload_max_filesize\)\b.*/\1 = 100M/'
-sed -i 's/^\(post_max_size\)\b.*/\1 = 100M/'
+sed -i 's/^\(upload_max_filesize\|post_max_size\)\b.*/\1 = 100M/' $php_ini
if isdeb; then
service apache2 restart
else
@@ -485,14 +515,15 @@ Style settings. Omit to use a different style.
== Install and Configure Mediawiki Extensions ==
@@ -502,54 +533,51 @@ When installing extensions on a wiki with important content, backup first as a p
''' Extensions with no configuration needed '''
{| class="wikitable"
-! Name
-! Description
-|-
-| [[mediawikiwiki:Extension:Cite|Extension:Cite]]
-| Have references in footnotes.
-|-
-| [[mediawikiwiki:Extension:CiteThisPage|Extension:CiteThisPage]]
-| Ability to generate citations to pages in a variety of styles.
-|-
-| [[mediawikiwiki:Extension:CSS|Extension:CSS]]
-| Allows CSS stylesheets to be included in specific articles
-|-
-| [[mediawikiwiki:Extension:DynamicPageList|Extension:DynamicPageList]]
-| Embed page lists from categories & combinations of categories
-|-
-| [[mediawikiwiki:Extension:Echo|Extension:Echo]]
-| Notification subsystem for usage by other extensions
-|-
-| [[mediawikiwiki:Extension:Gadgets|Extension:Gadgets]]
-| UI extension system for users
-|-
-| [[mediawikiwiki:Extension:ImageMap|Extension:ImageMap]]
-| Links for a region of an image
-|-
-| [[mediawikiwiki:Extension:Interwiki|Extension:Interwiki]]
-| Tool for nice links to other wikis
-|-
-| [[mediawikiwiki:Extension:News|Extension:News]]
-| Embed or rss recent changes
-|-
-| [[mediawikiwiki:Extension:Nuke|Extension:Nuke]]
-| Mass delete of pages, in the case of spam
-|-
-| [[mediawikiwiki:Extension:ParserFunctions|Extension:ParserFunctions]]
-| Useful for templates
-|-
-| [[mediawikiwiki:Extension:Poem|Extension:Poem]]
-| Useful for formatting things various ways
-|-
-| [[mediawikiwiki:Extension:SyntaxHighlight_GeSHi|Extension:SyntaxHighlight_GeSHi]]
-| Source code highlighting
-|-
-| [[mediawikiwiki:Extension:Variables|Extension:Variables]]
-| Define per-page variables
-|}
+ ! Name
+ ! Description
+ |-
+ | [[mediawikiwiki:Extension:Cite|Extension:Cite]]
+ | Have references in footnotes.
+ |-
+ | [[mediawikiwiki:Extension:CiteThisPage|Extension:CiteThisPage]]
+ | Ability to generate citations to pages in a variety of styles.
+ |-
+ | [[mediawikiwiki:Extension:CSS|Extension:CSS]]
+ | Allows CSS stylesheets to be included in specific articles
+ |-
+ | [[mediawikiwiki:Extension:Echo|Extension:Echo]]
+ | Notification subsystem for usage by other extensions
+ |-
+ | [[mediawikiwiki:Extension:Gadgets|Extension:Gadgets]]
+ | UI extension system for users
+ |-
+ | [[mediawikiwiki:Extension:ImageMap|Extension:ImageMap]]
+ | Links for a region of an image
+ |-
+ | [[mediawikiwiki:Extension:Interwiki|Extension:Interwiki]]
+ | Tool for nice links to other wikis
+ |-
+ | [[mediawikiwiki:Extension:News|Extension:News]]
+ | Embed or rss recent changes
+ |-
+ | [[mediawikiwiki:Extension:Nuke|Extension:Nuke]]
+ | Mass delete of pages, in the case of spam
+ |-
+ | [[mediawikiwiki:Extension:ParserFunctions|Extension:ParserFunctions]]
+ | Useful for templates
+ |-
+ | [[mediawikiwiki:Extension:Poem|Extension:Poem]]
+ | Useful for formatting things various ways
+ |-
+ | [[mediawikiwiki:Extension:SyntaxHighlight_GeSHi|Extension:SyntaxHighlight_GeSHi]]
+ | Source code highlighting
+ |-
+ | [[mediawikiwiki:Extension:Variables|Extension:Variables]]
+ | Define per-page variables
+ |}
@@ -593,7 +621,12 @@ fi
mw-ext Math
# php5-curl according to Math readme
if isdeb; then
- apt-get -y install latex-cjk-all texlive-latex-extra texlive-latex-base ghostscript imagemagick ocaml php5-curl
+ curl_pkg=php7.0-curl
+ if ! apt-get -s install $curl_pkg &>/dev/null; then
+ curl_pkg=php5-curl
+ fi
+ apt-get -y install latex-cjk-all texlive-latex-extra texlive-latex-base \
+ ghostscript imagemagick ocaml $curl_pkg make
else
# todo, php5-curl equivalent on fedora
yum -y install texlive-cjk ghostscript ImageMagick texlive ocaml
@@ -735,9 +768,11 @@ There are quite a few [[mediawikiwiki:Help:Namespaces|special pages]] which act