אתר קואופ דיור

מתוך שקוף באוהל
(הבדלים בין גרסאות)
קפיצה אל: ניווט, חיפוש
מ (שדרוג ל mediawili 1.25 stable 06-2015)
מ (External links)
 
(2 גרסאות ביניים של משתמש אחד אינן מוצגות)
שורה 294: שורה 294:
 
==גיבוי==
 
==גיבוי==
 
מדריך הגיבוי לויקי: https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
 
מדריך הגיבוי לויקי: https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
 +
===מסד נתונים Database backup===
 +
מתוך המדריך של מדיה ויקי, באמצעות תוכנת phpMyAdmin על השרת:
 +
 +
"phpMyAdmin
 +
 +
Turn your wiki to read only by adding $wgReadOnly = 'Site Maintenance'; to LocalSettings.php.
 +
 +
Open the browser to your phpadmin link, login, choose the wiki database. (Check LocalSettings.php if you're not sure). Select Export. Make sure all items under Export are highlighted, and make sure Structure is highlighted (it's important to maintain the table structure). Optionally check Add DROP TABLE to delete existing references when importing. Make sure Data is checked. Select zipped. Then click on GO and save the backup file.[1]
 +
 +
Remove $wgReadOnly = 'Site Maintenance'; from LocalSettings.php
 +
 +
Remember to also backup the file system components of the wiki that might be required, eg. images, logo, and extensions."
 +
====External links====
 +
*For a tutorial, see Siteground: [http://www.siteground.com/tutorials/php-mysql/mysql_export.htm MySQL Export: How to backup a MySQL database using phpMyAdmin]
 +
*[http://web.archive.org/web/20090302015625/http://mambo-manual.org/display/conf/Backing+up+the+Database Backing up the Database]

גרסה אחרונה מתאריך 13:31, 21 ביוני 2015

תוכן עניינים

[עריכה] חובזה * קהילה בונה עיר - אתר מדיה ויקי - תוכנית עבודה

[עריכה] התקנת מדיה ויקי על השרת

[עריכה] בדיקת דרישות מקדימות

מה שיש פה: https://packages.debian.org/wheezy/php5 These PHP packages:

 aptitude search php5 | grep ^i
 i   libapache2-mod-php5             - server-side, HTML-embedded scripting langu
 i   php5                            - server-side, HTML-embedded scripting langu
 i   php5-cli                        - command-line interpreter for the php5 scri
 i   php5-common                     - Common files for packages built from the p
 i   php5-curl                       - CURL module for php5
 i   php5-dev                        - Files for PHP5 module development
 i   php5-gd                         - GD module for php5
 i   php5-intl                       - internationalisation module for php5
 i   php5-mcrypt                     - MCrypt module for php5
 i   php5-mysql                      - MySQL module for php5
 i   php5-xmlrpc                     - XML-RPC module for php5

You cn check the versions here:

- https://www.debian.org/distrib/packages#search_packages "

Dear hubeza

Your password is ************ You can access your webspace here

http://hubeza.host2.webarch.net

You can manage your databases and change your password at

https://host2.webarch.net/phpmyadmin

You can upload files using sftp to sftp://hubeza@host2.webarch.net

Regards,

- -- webarch.net "

[עריכה] תהליך ההתקנה

https://docs.webarch.net/wiki/MediaWiki " Install

Install the MediaWiki code in ~/sites/default/w/ (you will need to create this directory) and then set these variables in LocalSettings.php:

$wgScriptPath = "/w"; $wgArticlePath = "/wiki/$1";

Edit your ~/sites/default/.htaccess file:

    1. http://www.mediawiki.org/wiki/Manual:Short_URL/Apache

<IfModule mod_rewrite.c>

  1. Enable the rewrite engine

RewriteEngine On

  1. Short url for wiki pages

RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]

  1. Redirect / to Main Page

RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L] </IfModule>

The above will result in URL's like this: https://docs.webarch.net/wiki/Main_Page and this is the recomended way to set it up.

If however you want to have http://example.org/Main_Page (please note that this not recomended), then install the MediaWiki code in ~/sites/default/ and then set these variables in LocalSettings.php:

$wgScriptPath = ""; $wgArticlePath = "/$1";

Edit your ~/sites/default/.htaccess file:

  1. https://www.mediawiki.org/wiki/Manual:Short_URL/Page_title_--_Windows_%26_Apache_without_403_on_Special_Pages

<IfModule mod_rewrite.c>

  1. Enable the rewrite engine

RewriteEngine On

  1. If the request isn't for a file

RewriteCond %{REQUEST_FILENAME} !-f

  1. If the request isn't for a directory

RewriteCond %{REQUEST_FILENAME} !-d

  1. Then send the request to index.php with the PATH_INFO

RewriteRule ^(.*) index.php?title=$1 [L,QSA] </IfModule>

HTTPS

If you have a HTTPS certificate you can add this to LocalSettings.php:

  1. https://www.mediawiki.org/wiki/Extension:HttpsLogin

$wgSecureLogin = true;

Also make sure you don't have a protocol set for the $wgServer, for example:

    1. The protocol and server name to use in fully-qualified URLs

$wgServer = "//wiki.example.org";

And add this to your ~/sites/default/.htaccess file:

  1. STS Header
  2. https://stackoverflow.com/questions/24144552/how-to-set-hsts-header-from-htaccess-only-on-https

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS "


[עריכה] עורך ויזואלי visual editor

[עריכה] דרישות התקנה

[עריכה] תהליך התקנת תוסף העורך הויזואלי

Installation

   Download and place the file(s) in a directory called UniversalLanguageSelector in your extensions/ folder.
   Add the following code at the bottom of your LocalSettings.php:

require_once "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";

   Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

"

Basic configuration for MediaWiki-VisualEditor

For the initial setup, before you have installed the Parsoid node.js service you can experiment with loading MediaWiki-VisualEditor on your own wiki.

Add the following lines to your wiki's LocalSettings.php after you have downloaded the extension:

require_once "$IP/extensions/VisualEditor/VisualEditor.php";

// Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1;

// Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features

  1. $wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

Other extensions which load plugins for VE (e.g. Math) should be loaded after VE for those plugins to work "

[עריכה] שרת parsoid

Linking with Parsoid

To get VisualEditor to talk to the parser, add the following code to your LocalSettings.php to specify your Parsoid instance:

// URL to the Parsoid instance // MUST NOT end in a slash due to Parsoid bug // Use port 8142 if you use the Debian package $wgVisualEditorParsoidURL = 'http://localhost:8000';

Additionally, the prefix needs to be set to the unique name you gave to the wiki in your localsettings.js parsoid configuration file. If you only run a single wiki then you will most likely have left it's unique ID as "localhost" and therefore will not need to set the prefix here. But if you are running multiple wikis on the same host then each will need to have a different unique ID (see Parsoid/Setup#Configuration for more detail), and you specify which one you're referring to here:

// Interwiki prefix to pass to the Parsoid instance // Parsoid will be called as $url/$prefix/$pagename $wgVisualEditorParsoidPrefix = 'localhost';


"

We have set up a Parsoid server and documented it here:

- https://docs.webarch.net/wiki/MediaWiki#VisualEditor

I have added your site to the list of MediaWiki sites:

 parsoidConfig.setInterwiki( 'hubeza.host2.webarch.net', 'http://hubeza.host2.webarch.net/w/api.php' );

If you install MediaWiki in a different directory from the suggested ~/sites/default/w/ then let me know so I can edit the setting above.

Also if you find anything that could be improved in the notes here:

- https://docs.webarch.net/wiki/MediaWiki

Please let us know. "

https://docs.webarch.net/wiki/MediaWiki#VisualEditor :  "

VisualEditor

We have a Parsiod server available for use by client sites, you will need to contact us to ask for this to be made available for your site. Following are the steps you will need to follow to use it.

Install the VisualEditor extension and add these settings to your LocalSettings.php, note that you will need to change wiki.example.org to the domain name of your MediaWiki site:

// https://www.mediawiki.org/wiki/Extension:VisualEditor require_once "$IP/extensions/VisualEditor/VisualEditor.php";

// Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1;

// Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features

  1. $wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

// URL to the Parsoid instance // MUST NOT end in a slash due to Parsoid bug // Use port 8142 if you use the Debian package $wgVisualEditorParsoidURL = 'http://parsoid.webarch.net:8142';

// Interwiki prefix to pass to the Parsoid instance // Parsoid will be called as $url/$prefix/$pagename $wgVisualEditorParsoidPrefix = 'wiki.example.org';

If you are running MediaWiki 23.x or older you will need to install the Parsoid extension and add the following to LocalSettings.php:

// https://www.mediawiki.org/wiki/Extension:Parsoid require_once "$IP/extensions/Parsoid/Parsoid.php";

Parsoid Server Settings

Before the VisualEditor will work your domain will need adding to /etc/mediawiki/parsoid/settings.js on the Parsoid server, please contact us at info@webarch.net to ask for this to be done, for example:

parsoidConfig.setInterwiki( 'wiki.example.org', 'http://wiki.example.org/w/api.php' );

parsoidConfig.allowCORS = 'wiki.example.org';

And the service will need restarting, service parsiod restart, in addition the IP address of the server might need adding to /etc/iptables/rules.v4, for example:

-A INPUT -p tcp --dport 8142 -s 81.95.52.6 -j ACCEPT

"

[עריכה] תוספים נוספים

[עריכה] מניעת ספאם : וידוא עריכת בני אנוש ConfirmEdit (כבר מגיע עם 1.24.1)

http://www.mediawiki.org/wiki/Extension:ConfirmEdit : " Installation

   Download and place the file(s) in a directory called ConfirmEdit in your extensions/ folder.
   Add the following code at the bottom of your LocalSettings.php:

require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";

   Enable the CAPTCHA type which should be used
   Configure as needed
   Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Note Note: ConfirmEdit may not work if used with a MediaWiki version different from the one specified when downloading via the "Extension distributor". "

[עריכה] סוגי CAPTCHA types

There are numerous different CAPTCHA types included with ConfirmEdit.

[עריכה] QuestyCaptcha

" This module presents a question and the user supplies the answer. You provide the questions in the configuration. This module has proven to offer a strong mechanism against spam bots; it also should have the advantage of a better accessibility, as textual questions can be read by text-to-speech software allowing visually impaired users (but not bots) to answer correctly.

Add the following to LocalSettings.php to enable this CAPTCHA, editing the Q&A:

require_once "$IP/extensions/ConfirmEdit/QuestyCaptcha.php"; $wgCaptchaQuestions = array (

       'A question?' => 'An answer!',
       "What is this wiki's name?" => "$wgSitename",
       'Please write the magic secret, "passion", here:' => 'passion',
       'Type the code word, "567", here:' => '567',
       'Which animal? <img src="http://www.example.com/path/to/filename_not_including_dog.jpg" />' => 'dog',
       'Fill in the blank: Blue is a ...' => array( 'colour', 'color' ),

);

It will randomly choose a question from those supplied. The minimum is one.

   The answer must be easy to guess for a human interested in your wiki, but not by an automatic program. Ideally, it should not be contained in the text of the question; you can try and edit the captcha help messages[2] and provide the solution to the captcha response there.
   Just change the questions when/if they start proving ineffective; this may never happen if your wiki is not specifically targeted.
   Don't ever reuse questions already used by you or others in the past: spambots are known to remember a question and its answer forever once they broke it.
   You can get even smarter, with questions like «What is the output of "date -u +%V`uname`|sha256sum|sed 's/\W//g'"?».
   And other dynamic questy captchas. DO NOT use an exact copy of the dynamic questions from the link -- they've been cracked by spammers. However other dynamic questions in the style of the questions presented are highly effective.

"

[עריכה] שדרוג ל mediawili 1.25 stable 06-2015

[עריכה] רקע ותאימות

[עריכה] גיבוי

מדריך הגיבוי לויקי: https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki

[עריכה] מסד נתונים Database backup

מתוך המדריך של מדיה ויקי, באמצעות תוכנת phpMyAdmin על השרת:

"phpMyAdmin

Turn your wiki to read only by adding $wgReadOnly = 'Site Maintenance'; to LocalSettings.php.

Open the browser to your phpadmin link, login, choose the wiki database. (Check LocalSettings.php if you're not sure). Select Export. Make sure all items under Export are highlighted, and make sure Structure is highlighted (it's important to maintain the table structure). Optionally check Add DROP TABLE to delete existing references when importing. Make sure Data is checked. Select zipped. Then click on GO and save the backup file.[1]

Remove $wgReadOnly = 'Site Maintenance'; from LocalSettings.php

Remember to also backup the file system components of the wiki that might be required, eg. images, logo, and extensions."

[עריכה] External links

כלים אישיים
גרסאות שפה
מרחבי שם
פעולות
ניווט
תיבת כלים