Installation Mediawiki: Unterschied zwischen den Versionen

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(14 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
Folgende Pakete müssen installiert werden:
<syntaxhighlight lang=bash>
aptitude install apache2 php5 mysql-server php5-mysql php5-intl diff
</syntaxhighlight>
Um Mediawiki zu installieren wird als erstes ein vhost Ordner angelegt und in diesen gewechselt:
Um Mediawiki zu installieren wird als erstes ein vhost Ordner angelegt und in diesen gewechselt:
<pre>
<pre>
Zeile 25: Zeile 29:
         ServerName wiki2.laub-home.de
         ServerName wiki2.laub-home.de
         DocumentRoot /srv/httpd/vhosts/wiki2.laub-home.de/htdocs/
         DocumentRoot /srv/httpd/vhosts/wiki2.laub-home.de/htdocs/
       
        php_admin_value safe_mode off


        <Location />
                <LimitExcept POST GET>
                        Deny from All
                </LimitExcept>
        </Location>
         <Directory /srv/httpd/vhosts/wiki2.laub-home.de/htdocs/>
         <Directory /srv/httpd/vhosts/wiki2.laub-home.de/htdocs/>
                 Options -Indexes FollowSymLinks -Includes -MultiViews
                 Options -Indexes FollowSymLinks -Includes -MultiViews
                 AllowOverride None
                 AllowOverride All
                 Order allow,deny
                 Order allow,deny
                 allow from all
                 allow from all
         </Directory>
         </Directory>
        <Directory "/srv/httpd/vhosts/wiki2.laub-home.de/htdocs/images">
                # Ignore .htaccess files
                AllowOverride None
                # Serve HTML as plaintext, don't execute SHTML
                AddType text/plain .html .htm .shtml .php
                # Don't run arbitrary PHP code.
                php_admin_flag engine off


                RewriteEngine On
                RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
                RewriteRule . - [forbidden]
                # If you've other scripting languages, disable them too.
        </Directory>
        <FilesMatch "(README|COPYING|CREDITS|FAQ|HISTORY|INSTALL|RELEASE-NOTES|UPGRADE|COPYING|OBSOLETE|TODO)">
                order allow,deny
                deny from all
        </FilesMatch>
         ErrorLog /var/log/apache2/wiki2.laub-home.de-error.log
         ErrorLog /var/log/apache2/wiki2.laub-home.de-error.log
         CustomLog /var/log/apache2/wiki2.laub-home.de-access.log combined
         CustomLog /var/log/apache2/wiki2.laub-home.de-access.log combined
Zeile 40: Zeile 70:
         LogLevel warn
         LogLevel warn


#        RewriteEngine on
        RewriteEngine on
#        RewriteRule ^/wiki/(.*)        /$1     [R=permanent]
        RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
 
         RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
        RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]


        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
        RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
</VirtualHost>
</VirtualHost>
</pre>
</pre>
Zeile 53: Zeile 90:
Ich habe noch folgendes nachinstalliert und aktiviert:
Ich habe noch folgendes nachinstalliert und aktiviert:
<pre>
<pre>
aptitude install php-apc imagemagick
aptitude install php-apc php5-curl imagemagick
apache2ctl restart
apache2ctl restart
</pre>
</pre>
Zeile 59: Zeile 96:
<pre>
<pre>
cd htdocs
cd htdocs
rm README RELEASE-NOTES CREDITS UPGRADE COPYING INSTALL
rm README RELEASE-NOTES* CREDITS UPGRADE COPYING INSTALL FAQ HISTORY
chmod 777 images
chmod 777 images
</pre>
</pre>
=== Meine LocalSettings.php Änderungen ===
=== Meine LocalSettings.php Änderungen ===
<pre>
<syntaxhighlight lang=php>
# Short URLs
$wgScriptPath      = "";
$wgScriptExtension  = ".php";
$wgArticlePath = "/wiki/$1";
 
#$wgGenerateThumbnailOnParse = false;
 
# End of automatically generated settings.
# End of automatically generated settings.
# Add more configuration options below.
# Add more configuration options below.
Zeile 132: Zeile 176:
# Enable Vector Extension
# Enable Vector Extension
require_once( "$IP/extensions/Vector/Vector.php" );
require_once( "$IP/extensions/Vector/Vector.php" );
$wgVectorUseSimpleSearch = true;
$wgVectorUseSimpleSearch = true;</syntaxhighlight>
</pre>


==Quellen==
==Quellen==
* http://www.mediawiki.org/wiki/Installation
* http://www.mediawiki.org/wiki/Installation
[[Kategorie:Apache]]
[[Kategorie:Linux]]
[[Kategorie:Debian]]
[[Kategorie:Ubuntu]]
[[Kategorie:MediaWiki]]