Full Installation Instructions: Difference between revisions

From SemanticOrganization
Jump to: navigation, search
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 8: Line 8:
</translate>
</translate>


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


<translate>
<translate>
<!--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-->
=== Download MediaWiki === <!--T:4-->
</translate>
</translate>


  wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.6.tar.gz
  wget https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.8.tar.gz
  tar xvzf mediawiki-1.35.6.tar.gz  
  tar xvzf mediawiki-1.39.8.tar.gz  
  mv mediawiki-1.35.6 w
  mv mediawiki-1.39.8 w
  rm mediawiki-1.35.6.tar.gz
  rm mediawiki-1.39.8.tar.gz


<translate>
<translate>
Line 37: Line 39:
  git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageForms.git
  git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageForms.git
  cd PageForms
  cd PageForms
  git checkout 731d226
  git checkout a171657
  cd ..
  cd ..
  git clone https://github.com/thaider/SemanticOrganization
  git clone https://github.com/thaider/SemanticOrganization
Line 48: Line 50:
If you don't already have it, install [https://getcomposer.org/ Composer] first.
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:
Create a <code>composer.local.json</code> file and require the extensions:


Line 53: Line 56:
  cd ..
  cd ..
  cp composer.local.json-sample composer.local.json
  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-media-wiki:~4.1
  COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats:~3.2
  COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats:~4.1
  composer update --no-dev
  composer update --no-dev
<translate>
<translate>
Line 69: Line 72:
<translate>
<translate>
<!--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>/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-->
<!--T:12-->
Line 82: Line 85:


<translate>
<translate>
<!--T:23-->
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.
<!--T:15-->
<!--T:15-->
add the following to <code>LocalSettings.php</code>:
add the following to <code>LocalSettings.php</code>:
Line 89: Line 95:
  wfLoadExtension('PageForms');
  wfLoadExtension('PageForms');
  wfLoadExtension('SemanticOrganization');
  wfLoadExtension('SemanticOrganization');
wfLoadExtension( 'SemanticResultFormats' );
   
   
  # Make Wiki private
  # Make Wiki private
Line 117: Line 124:


<translate>
<translate>
=== Apache Setup ===
=== 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:
In order for Visual Editor to work in forms you might have to add this line to your vhost's definition:
</translate>
</translate>


  AllowEncodedSlashes NoDecode
  AllowEncodedSlashes NoDecode

Latest revision as of 19:42, 2 July 2024

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.39/mediawiki-1.39.8.tar.gz
tar xvzf mediawiki-1.39.8.tar.gz 
mv mediawiki-1.39.8 w
rm mediawiki-1.39.8.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 a171657
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:~4.1
COMPOSER=composer.local.json composer require --no-update mediawiki/semantic-result-formats:~4.1
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;

# 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;

# 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