Difference between revisions of "Installation"

From Jesse's Wiki
Jump to navigation Jump to search
m
 
(3 intermediate revisions by 2 users not shown)
Line 18: Line 18:


<pre>
<pre>
$wgGroupPermissions['approved']['editmain'] = true;
#for short URLs (don't forget to edit .htaccess)
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "/w/$1";
 
$wgGroupPermissions['approved']['editmain'] = true;  
$wgNamespaceProtection[NS_MAIN] = array( 'editmain' );
$wgNamespaceProtection[NS_MAIN] = array( 'editmain' );
$wgCapitalLinks = false; #this stops URLs from capitalizing the first letter
</pre>
</pre>
* remember to use Special:UserRights to add 'approved' users
* remember to use Special:UserRights to add 'approved' users
Line 28: Line 35:
** Do not use root, choose a sub directory (like /w). Using root breaks api requests including visualeditor  
** Do not use root, choose a sub directory (like /w). Using root breaks api requests including visualeditor  
** copy .htaccess to directory with mediawiki and modify LocalSettings.php to include the article path
** copy .htaccess to directory with mediawiki and modify LocalSettings.php to include the article path
* Set <code>$wgCapitalLinks = false;</code> for URLs to not automatically cap the first letter.
 
 
Installing Flow
 
* Download the extension (currently being renamed to StructuredDiscussions) https://www.mediawiki.org/wiki/Extension:StructuredDiscussions
* Update LocalSettings.php to load Flow
* Update the database tables using mw-config
* Install Echo too https://www.mediawiki.org/wiki/Extension:Echo
 
=== Syntax Highlighting ===
Will not work on synology without Python3 being installed and the following. Instructions from [https://medium.com/mischievousboss/mediawiki-installation-a6ce37566e0e here]
 
Install Pip
sudo -i
python3 -m ensurepip
python3 -m pip install --upgrade pip
Install [https://pygments.org/ Pygments] on synology (ignore warnings where not on PATH)
/var/packages/py3k/target/usr/local/bin/pip3 install Pygments
Add to LocalSettings.php
$wgPygmentizePath = "/var/packages/py3k/target/usr/local/bin/pygmentize";

Latest revision as of 01:24, 28 October 2021

  • Synology NAS
  • MariaDB10 installed
  • MediaWiki
    • Download latest version and extract to get .tar file, upload and extract to web folder
    • Configure reverse proxy or Web station to use subdomain and Apache server with latest PHP
    • test connection to subdomain (configure DNS if necessary)
    • acquire/register subdomain to HTTPS certificate
  • Download GoogleLogin Extension

To set so that only 'approved' users can edit and create pages, but all other users can use the Discussion feature, add this to LocalSettings.php

#for short URLs (don't forget to edit .htaccess)
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "/w/$1";

$wgGroupPermissions['approved']['editmain'] = true; 
$wgNamespaceProtection[NS_MAIN] = array( 'editmain' );

$wgCapitalLinks = false; #this stops URLs from capitalizing the first letter
  • remember to use Special:UserRights to add 'approved' users
  • In order to get VisualEditor working with the built in parsoid, it's incredibly important to make sure you can successfully CURL in the ssh shell. If it times out you will see CURL 28 error when editing pages. This was fixed by setting the local DNS settings.
  • Configuring short urls
    • use https://shorturls.redwerks.org to help
    • Choose Apache and all default settings
    • Do not use root, choose a sub directory (like /w). Using root breaks api requests including visualeditor
    • copy .htaccess to directory with mediawiki and modify LocalSettings.php to include the article path


Installing Flow

Syntax Highlighting

Will not work on synology without Python3 being installed and the following. Instructions from here

Install Pip

sudo -i
python3 -m ensurepip
python3 -m pip install --upgrade pip

Install Pygments on synology (ignore warnings where not on PATH)

/var/packages/py3k/target/usr/local/bin/pip3 install Pygments

Add to LocalSettings.php

$wgPygmentizePath = "/var/packages/py3k/target/usr/local/bin/pygmentize";