Installation Mediawiki: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (19 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 | 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 | |||
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 | aptitude install php-apc php5-curl imagemagick | ||
apache2ctl restart | apache2ctl restart | ||
</pre> | </pre> | ||
Anschließend noch ein wenig aufräumen: | |||
<pre> | |||
cd htdocs | |||
rm README RELEASE-NOTES* CREDITS UPGRADE COPYING INSTALL FAQ HISTORY | |||
chmod 777 images | |||
</pre> | |||
=== Meine LocalSettings.php Änderungen === | |||
<syntaxhighlight lang=php> | |||
# Short URLs | |||
$wgScriptPath = ""; | |||
$wgScriptExtension = ".php"; | |||
$wgArticlePath = "/wiki/$1"; | |||
#$wgGenerateThumbnailOnParse = false; | |||
# End of automatically generated settings. | |||
# Add more configuration options below. | |||
# Aenderungen by ALA | |||
# erlaubte Dateien | |||
$wgFileExtensions = array('txt','gz','tar','zip','pdf','png','jpg','jpeg','ogg','doc','xls','ppt','mp3','sxc','nse','ico'); | |||
$wgStrictFileExtensions = false; | |||
$wgVerifyMimeType = false; | |||
# erlaubt das Bild verkleinern und veroessern | |||
$wgUseImageResize = true; | |||
# E-Mail Adressvalidierung | |||
$wgEmailConfirmToEdit = true; | |||
# Prevent new user registrations except by sysops | |||
$wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1 ); | |||
# Disable anonymous talk | |||
$wgDisableAnonTalk = true; | |||
# Anonymous users can't create pages | |||
$wgGroupPermissions['*']['createpage'] = false; | |||
# Disable IP shown on header | |||
$wgShowIPinHeader = false; | |||
# Enable WikiEditor | |||
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" ); | |||
$wgDefaultUserOptions['usebetatoolbar'] = 1; | |||
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1; | |||
$wgDefaultUserOptions['wikieditor-preview'] = 1; | |||
# Enable FCKEditor | |||
require_once("$IP/extensions/FCKeditor/FCKeditor.php"); | |||
$wgUseAjax = true; | |||
$wgFCKEditorToolbarSet = "Wiki"; | |||
# Enable PdfExport | |||
require_once("$IP/extensions/PdfExport/PdfExport.php"); | |||
# Enable SyntaxHighlight_GeSHi | |||
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php"); | |||
# Enable Lockdown | |||
#require_once( "$IP/extensions/Lockdown/Lockdown.php"); | |||
#$wgSpecialPageLockdown['Version'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgSpecialPageLockdown['Export'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgSpecialPageLockdown['Listfiles'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgSpecialPageLockdown['Listusers'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgSpecialPageLockdown['Statistics'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgSpecialPageLockdown['Version'] = array('sysop'); | |||
#$wgSpecialPageLockdown['Booksources'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgSpecialPageLockdown['Protectedpages'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgActionLockdown['history'] = array('user', 'bureaucrat', 'sysop'); | |||
#$wgActionLockdown['edit'] = array('user', 'bureaucrat', 'sysop'); | |||
# Enable SimpleSecurity | |||
#$wgSecurityUseDBHook = true; | |||
$wgSecurityUseDBHook = false; | |||
include_once("$IP/extensions/SimpleSecurity/SimpleSecurity.php"); | |||
$wgSecurityRenderInfo = true; | |||
$wgSecurityAllowUnreadableLinks = false; | |||
$wgSecurityExtraGroups = array( | |||
'warehouse' => 'Warehouse Security Group' | |||
); | |||
# Enable Vector Extension | |||
require_once( "$IP/extensions/Vector/Vector.php" ); | |||
$wgVectorUseSimpleSearch = true;</syntaxhighlight> | |||
==Quellen== | ==Quellen== | ||
* http://www.mediawiki.org/wiki/Installation | * http://www.mediawiki.org/wiki/Installation | ||
[[Kategorie:Apache]] | |||
[[Kategorie:Linux]] | |||
[[Kategorie:Debian]] | |||
[[Kategorie:Ubuntu]] | |||
[[Kategorie:MediaWiki]] | |||