Difference between revisions of "Full Installation Instructions"

From SemanticOrganization
Jump to: navigation, search
(Marked this version for translation)
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<translate>
 
<translate>
== Full Installation ==
+
== Full Installation == <!--T:1-->
  
 +
<!--T:2-->
 
<!--There is also a [https://github.com/soudis/semorg-docker/ Docker Image] available for the full installation.-->
 
<!--There is also a [https://github.com/soudis/semorg-docker/ Docker Image] available for the full installation.-->
  
=== Create database ===
+
=== Create database === <!--T:3-->
 
</translate>
 
</translate>
  
  mysql> create database sandbox;
+
  mysql> create database DBNAME;
  mysql> grant all on sandbox.* to sandbox@localhost identified by '***';
+
mysql> create user DBUSER@localhost identified by 'DBPASS';
 +
  mysql> grant all on DBNAME.* to DBUSER@localhost;
  
 
<translate>
 
<translate>
=== Download MediaWiki ===
+
<!--T:21-->
 +
Replace <code>DBNAME</code> with the name of your database, <code>DBUSER</code> with the name of the database user and <code>DBPASS</code> with the password you've chosen.
 +
 
 +
=== Download MediaWiki === <!--T:4-->
 
</translate>
 
</translate>
  
  wget https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz
+
  wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.6.tar.gz
  tar xvzf mediawiki-1.31.0.tar.gz  
+
  tar xvzf mediawiki-1.35.6.tar.gz  
  mv mediawiki-1.31.0 w
+
  mv mediawiki-1.35.6 w
  rm mediawiki-1.31.0.tar.gz
+
  rm mediawiki-1.35.6.tar.gz
  
 
<translate>
 
<translate>
=== Download Tweeki Skin ===
+
 
 +
=== Download Tweeki Skin === <!--T:5-->
 
</translate>
 
</translate>
  
Line 27: Line 33:
  
 
<translate>
 
<translate>
=== Download extensions ===
+
=== Download extensions === <!--T:6-->
 
</translate>
 
</translate>
  
 
  cd ../extensions/
 
  cd ../extensions/
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PageForms.git
+
  git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageForms.git
  git clone https://github.com/oteloegen/SemanticOrganization
+
cd PageForms
 +
git checkout 731d226
 +
cd ..
 +
  git clone https://github.com/thaider/SemanticOrganization
  
 
<translate>
 
<translate>
=== Install Semantic MediaWiki and Semantic Result Formats ===
 
  
[https://getcomposer.org/ Composer] installieren
+
=== Install Semantic MediaWiki and Semantic Result Formats === <!--T:7-->
 +
 
 +
<!--T:8-->
 +
If you don't already have it, install [https://getcomposer.org/ Composer] first.
 +
 
 +
<!--T:22-->
 +
Create a <code>composer.local.json</code> file and require the extensions:
 +
 
 
</translate>
 
</translate>
 
 
  cd ..
 
  cd ..
  composer require mediawiki/semantic-media-wiki "~2.5" --update-no-dev
+
  cp composer.local.json-sample composer.local.json
composer require mediawiki/semantic-result-formats "~2.5" --update-no-dev
+
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-media-wiki:~3.2
 
+
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats:~3.2
 +
composer update --no-dev
 
<translate>
 
<translate>
=== Run Installation Procedure ===
 
  
==== - Using the Installer ====
+
=== Run Installation Procedure === <!--T:9-->
 +
</translate>
 +
<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|<translate><!--T:19--> Using the Installer</translate></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|<translate><!--T:20--> CLI installation</translate></btn></li>
 +
</ul>
  
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).
+
<div class="tab-content">
 +
<div id="installer" class="tab-pane fade active show" role="tabpanel" aria-labelledby="installer-label">
 +
<translate>
 +
<!--T:11-->
 +
Open <code>/w</code> in your Browser (i.e. <code>localhost/w</code> for a local installation) 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).
  
 +
<!--T:12-->
 
add the following to <code>LocalSettings.php</code>:
 
add the following to <code>LocalSettings.php</code>:
 
</translate>
 
</translate>
 
{{LocalSettings.php-Tweaks}}
 
{{LocalSettings.php-Tweaks}}
 
+
</div>
<translate>
+
<div id="cli" class="tab-pane fade" role="tabpanel" aria-labelledby="cli-label">
==== - CLI installation ====
 
</translate>
 
  
 
  php maintenance/install.php --dbname=DBNAME --dbuser=DBUSER --dbpass=DBPASS --scriptpath=/w --lang=en --pass=USERPASS "WIKINAME" "USERNAME"
 
  php maintenance/install.php --dbname=DBNAME --dbuser=DBUSER --dbpass=DBPASS --scriptpath=/w --lang=en --pass=USERPASS "WIKINAME" "USERNAME"
Line 63: Line 85:
  
 
<translate>
 
<translate>
change the following in <code>LocalSettings.php</code>:
+
<!--T:23-->
* <code>$wgLanguageCode</code> to your language
+
Replace <code>DBNAME</code>, <code>DBUSER</code> and <code>DBPASS</code> with the database credentials. <code>WIKINAME</code> is the name you chose for your wiki. <code>USERNAME</code>/<code>USERPASS</code> are for the admin user that will be automatically created so you can log in to the wiki.
* <code>$wgDefaultSkin</code> to 'tweeki'
 
  
 +
<!--T:15-->
 
add the following to <code>LocalSettings.php</code>:
 
add the following to <code>LocalSettings.php</code>:
 
</translate>
 
</translate>
Line 73: Line 95:
 
  wfLoadExtension('PageForms');
 
  wfLoadExtension('PageForms');
 
  wfLoadExtension('SemanticOrganization');
 
  wfLoadExtension('SemanticOrganization');
 +
wfLoadExtension( 'SemanticResultFormats' );
 
   
 
   
 
  # Make Wiki private
 
  # Make Wiki private
Line 80: Line 103:
 
   
 
   
 
{{LocalSettings.php-Tweaks}}
 
{{LocalSettings.php-Tweaks}}
 +
</div>
 +
</div>
 
<translate>
 
<translate>
=== Import Semorg Pages ===
 
  
 +
=== Import Semorg Pages === <!--T:16-->
 +
 +
<!--T:17-->
 
Import the default templates, forms and categories:
 
Import the default templates, forms and categories:
 
</translate>
 
</translate>
Line 89: Line 116:
  
 
<translate>
 
<translate>
 +
<!--T:18-->
 
Cleanup after import:
 
Cleanup after import:
 
</translate>
 
</translate>
Line 94: Line 122:
 
  php maintenance/rebuildrecentchanges.php
 
  php maintenance/rebuildrecentchanges.php
 
  php maintenance/runJobs.php
 
  php maintenance/runJobs.php
 +
 +
<translate>
 +
=== Apache Setup === <!--T:24-->
 +
 +
<!--T:25-->
 +
In order for Visual Editor to work in forms you might have to add this line to your vhost's definition:
 +
</translate>
 +
 +
AllowEncodedSlashes NoDecode

Latest revision as of 13:12, 24 June 2022

Full Installation

Create database

mysql> create database DBNAME;
mysql> create user DBUSER@localhost identified by 'DBPASS';
mysql> grant all on DBNAME.* to DBUSER@localhost;

Replace DBNAME with the name of your database, DBUSER with the name of the database user and DBPASS with the password you've chosen.

Download MediaWiki

wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.6.tar.gz
tar xvzf mediawiki-1.35.6.tar.gz 
mv mediawiki-1.35.6 w
rm mediawiki-1.35.6.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/mediawiki/extensions/PageForms.git
cd PageForms
git checkout 731d226
cd ..
git clone https://github.com/thaider/SemanticOrganization


Install Semantic MediaWiki and Semantic Result Formats

If you don't already have it, install Composer first.

Create a composer.local.json file and require the extensions:

cd ..
cp composer.local.json-sample composer.local.json
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-media-wiki:~3.2
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats:~3.2
composer update --no-dev

Run Installation Procedure

Open /w in your Browser (i.e. localhost/w for a local installation) 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

Replace DBNAME, DBUSER and DBPASS with the database credentials. WIKINAME is the name you chose for your wiki. USERNAME/USERPASS are for the admin user that will be automatically created so you can log in to the wiki.

add the following to LocalSettings.php:

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

# 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

Apache Setup

In order for Visual Editor to work in forms you might have to add this line to your vhost's definition:

AllowEncodedSlashes NoDecode