Difference between revisions of "Full Installation Instructions"

From SemanticOrganization
Jump to: navigation, search
Line 49: Line 49:
 
=== Run Installation Procedure === <!--T:9-->
 
=== Run Installation Procedure === <!--T:9-->
  
==== - Using the Installer ==== <!--T:10-->
+
<ul class="nav nav-tabs" role="tablist">
 +
<li class="nav-item"><btn data-toggle="tab" class="nav-link active" role="tab" id="installer-label" aria-controls="installer" aria-selected="true">#installer|Using the Installer</btn></li>
 +
<li class="nav-item"><btn data-toggle="tab" class="nav-link" role="tab" id="cli-label" aria-controls="cli" aria-selected="false">#cli|CLI installation</btn></li>
 +
</ul>
  
 +
<div class="tab-content">
 +
<div id="installer" class="tab-pane fade active show" role="tabpanel" aria-labelledby="installer-label">
 
<!--T:11-->
 
<!--T:11-->
 
Open <code>mydomain.tld/w</code> and follow the instructions, chose Tweeki as a standard skin, activate ParserFunctions, Page Forms, and Semantic Organization extensions. It is recommended to use semorg only with private wikis (only registered users are allowed to read and edit the wiki).
 
Open <code>mydomain.tld/w</code> and follow the instructions, chose Tweeki as a standard skin, activate ParserFunctions, Page Forms, and Semantic Organization extensions. It is recommended to use semorg only with private wikis (only registered users are allowed to read and edit the wiki).
Line 60: Line 65:
  
 
<translate>
 
<translate>
==== - CLI installation ==== <!--T:13-->
+
</div>
 +
<div id="cli" class="tab-pane fade" role="tabpanel" aria-labelledby="cli-label">
 
</translate>
 
</translate>
  
Line 87: Line 93:
 
{{LocalSettings.php-Tweaks}}
 
{{LocalSettings.php-Tweaks}}
 
<translate>
 
<translate>
 +
 
=== Import Semorg Pages === <!--T:16-->
 
=== Import Semorg Pages === <!--T:16-->
  

Revision as of 14:26, 20 September 2020

Full Installation

Create database

mysql> create database sandbox;
mysql> grant all on sandbox.* to sandbox@localhost identified by '***';

Download MediaWiki

wget https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz
tar xvzf mediawiki-1.31.0.tar.gz 
mv mediawiki-1.31.0 w
rm mediawiki-1.31.0.tar.gz

Download Tweeki Skin

cd w/skins/
git clone https://github.com/thaider/Tweeki

Download extensions

cd ../extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PageForms.git
git clone https://github.com/oteloegen/SemanticOrganization

Install Semantic MediaWiki and Semantic Result Formats

Install Composer

cd ..
composer require mediawiki/semantic-media-wiki "~2.5" --update-no-dev
composer require mediawiki/semantic-result-formats "~2.5" --update-no-dev

Run Installation Procedure

Open mydomain.tld/w and follow the instructions, chose Tweeki as a standard skin, activate ParserFunctions, Page Forms, and Semantic Organization extensions. It is recommended to use semorg only with private wikis (only registered users are allowed to read and edit the wiki).

add the following to LocalSettings.php:

# Use Tweeki as default skin
$wgDefaultSkin = 'tweeki';

# Show Tweeki's advanced features by default
$wgDefaultUserOptions['tweeki-advanced'] = 1;

# Use Bootstrap Tooltips
$wgTweekiSkinUseTooltips = true;

# Enable String Functions
$wgPFEnableStringFunctions = true;

# Enable Semantic MediaWiki
enableSemantics('YOURDOMAIN.TLD');
$smwgEnabledEditPageHelp = false;
$smwgLinksInValues = true;
$smwgPageSpecialProperties[] = '_CDAT';

# Settings for Page Forms
$wgPageFormsAutocompleteOnAllChars = true;

# Allow display titles for automatically created page names
$wgRestrictDisplayTitle = false;

# Encode section IDs with modern html5 style so Scrollspy works with special chars
# becomes obsolete with MW 1.37
$wgFragmentMode = [ 'html5', 'legacy' ];

# Use full screen width when no sidebar is shown
$wgTweekiSkinGridNone = [ 
  "mainoffset" => 0, 
  "mainwidth" => 12
];
php maintenance/install.php --dbname=DBNAME --dbuser=DBUSER --dbpass=DBPASS --scriptpath=/w --lang=en --pass=USERPASS "WIKINAME" "USERNAME"
php maintenance/update.php --skip-external-dependencies

change the following in LocalSettings.php:

  • $wgLanguageCode to your language
  • $wgDefaultSkin to 'tweeki'

add the following to LocalSettings.php:

# Loading extensions
wfLoadExtension('ParserFunctions');
wfLoadExtension('PageForms');
wfLoadExtension('SemanticOrganization');

# Make Wiki private
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['edit'] = false;

# Use Tweeki as default skin
$wgDefaultSkin = 'tweeki';

# Show Tweeki's advanced features by default
$wgDefaultUserOptions['tweeki-advanced'] = 1;

# Use Bootstrap Tooltips
$wgTweekiSkinUseTooltips = true;

# Enable String Functions
$wgPFEnableStringFunctions = true;

# Enable Semantic MediaWiki
enableSemantics('YOURDOMAIN.TLD');
$smwgEnabledEditPageHelp = false;
$smwgLinksInValues = true;
$smwgPageSpecialProperties[] = '_CDAT';

# Settings for Page Forms
$wgPageFormsAutocompleteOnAllChars = true;

# Allow display titles for automatically created page names
$wgRestrictDisplayTitle = false;

# Encode section IDs with modern html5 style so Scrollspy works with special chars
# becomes obsolete with MW 1.37
$wgFragmentMode = [ 'html5', 'legacy' ];

# Use full screen width when no sidebar is shown
$wgTweekiSkinGridNone = [ 
  "mainoffset" => 0, 
  "mainwidth" => 12
];

Import Semorg Pages

Import the default templates, forms and categories:

php maintenance/importDump.php < extensions/SemanticOrganization/import/semorg_pages.xml

Cleanup after import:

php maintenance/rebuildrecentchanges.php
php maintenance/runJobs.php