MediaWiki: Difference between revisions
No edit summary |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Subpage Table of Contents''' | |||
{{Special:PrefixIndex/{{PAGENAME}}/}} | |||
<br/> | |||
== MediaWiki == | == MediaWiki == | ||
Line 5: | Line 11: | ||
"MediaWiki is a popular free web-based wiki software application developed by and used on all projects of the Wikimedia Foundation, as well as on many other wiki websites worldwide. It is written in the PHP programming language with a backend database." [http://en.wikipedia.org/wiki/Mediawiki] | "MediaWiki is a popular free web-based wiki software application developed by and used on all projects of the Wikimedia Foundation, as well as on many other wiki websites worldwide. It is written in the PHP programming language with a backend database." [http://en.wikipedia.org/wiki/Mediawiki] | ||
== Dependencies == | == Dependencies == | ||
Line 14: | Line 17: | ||
sudo apt install apache2 php mysql-server mysql-client | sudo apt install apache2 php mysql-server mysql-client | ||
For | PHP Extensions: | ||
* mbstring | |||
* xml | |||
* intl | |||
* (database driver) | |||
** php-mysql | |||
sudo apt install php-mbstring php-xml php-intl php-mysql | |||
sudo service apache2 restart | |||
Object Caching (optional) | |||
* [https://www.php.net/apcu APCu] or | |||
* [https://www.php.net/apcu WinCache] | |||
sudo apt install php-apcu | |||
GD library or ImageMagick (optional for thumbnailing) | |||
sudo apt install php-gd | |||
sudo apt install imagemagick | |||
/usr/bin/convert | |||
* Git (optional for Special:Version) | |||
sudo apt install git | |||
/usr/bin/git | |||
--- | |||
Warning: Requests for images in your uploads directory should answer with the HTTP header X-Content-Type-Options: nosniff to protect browsers from potentially unsafe files. | |||
It is highly recommended to configure appropriate response headers on your webserver before enabling uploads. | |||
Upload security | |||
Upload security - Manual:Security - MediaWiki | |||
https://www.mediawiki.org/wiki/Manual:Security#Upload_security | |||
<Directory "/..."> | |||
# Tell browsers to not sniff files | |||
Header set X-Content-Type-Options nosniff | |||
</Directory> | |||
== Dependency Check == | |||
For convenience: | |||
sudo ln -s /var/www/html /www | sudo ln -s /var/www/html /www | ||
Test php: | Test php: | ||
echo "<?php phpinfo(); ?>" > /www/phptest.php | echo "<?php phpinfo(); ?>" > /www/phptest.php | ||
http://x.x.x.x/phpinfo.php | |||
Look for MySQL and obviously the processed php page. | |||
== Installation & Upgrading == | == Installation & Upgrading == | ||
Line 25: | Line 72: | ||
Basics: | Basics: | ||
cd /www | |||
wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz | wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz | ||
tar -zvxf mediawiki-1.41.0.tar.gz | tar -zvxf mediawiki-1.41.0.tar.gz | ||
mv mediawiki-1. | mv mediawiki-1.41.0 wiki | ||
cd wiki | cd wiki | ||
Give write permission (not required, but then you will have to manually write the config files at the end): | |||
# sudo chown apache mw-config | |||
sudo chown www-data mw-config | |||
Run through the configuration: | |||
http://example.com/wiki/mw-config/index.php | http://example.com/wiki/mw-config/index.php | ||
Guide: | |||
https://www.mediawiki.org/wiki/Manual:Installation_guide | https://www.mediawiki.org/wiki/Manual:Installation_guide | ||
Download: | |||
https://www.mediawiki.org/wiki/Download | https://www.mediawiki.org/wiki/Download | ||
Latest revision as of 15:19, 4 January 2024
Subpage Table of Contents
MediaWiki
MediaWiki - http://www.mediawiki.org
"MediaWiki is a popular free web-based wiki software application developed by and used on all projects of the Wikimedia Foundation, as well as on many other wiki websites worldwide. It is written in the PHP programming language with a backend database." [1]
Dependencies
Apache and PHP: (for Ubuntu 22)
sudo apt install apache2 php mysql-server mysql-client
PHP Extensions:
- mbstring
- xml
- intl
- (database driver)
- php-mysql
sudo apt install php-mbstring php-xml php-intl php-mysql sudo service apache2 restart
Object Caching (optional)
sudo apt install php-apcu
GD library or ImageMagick (optional for thumbnailing)
sudo apt install php-gd sudo apt install imagemagick /usr/bin/convert
- Git (optional for Special:Version)
sudo apt install git /usr/bin/git
---
Warning: Requests for images in your uploads directory should answer with the HTTP header X-Content-Type-Options: nosniff to protect browsers from potentially unsafe files. It is highly recommended to configure appropriate response headers on your webserver before enabling uploads.
Upload security
Upload security - Manual:Security - MediaWiki https://www.mediawiki.org/wiki/Manual:Security#Upload_security
<Directory "/..."> # Tell browsers to not sniff files Header set X-Content-Type-Options nosniff </Directory>
Dependency Check
For convenience:
sudo ln -s /var/www/html /www
Test php:
echo "<?php phpinfo(); ?>" > /www/phptest.php
http://x.x.x.x/phpinfo.php
Look for MySQL and obviously the processed php page.
Installation & Upgrading
For Installation and Upgrading procedures, see MediaWiki/Installation article.
Basics:
cd /www wget https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.0.tar.gz tar -zvxf mediawiki-1.41.0.tar.gz mv mediawiki-1.41.0 wiki cd wiki
Give write permission (not required, but then you will have to manually write the config files at the end):
# sudo chown apache mw-config sudo chown www-data mw-config
Run through the configuration:
http://example.com/wiki/mw-config/index.php
Guide:
https://www.mediawiki.org/wiki/Manual:Installation_guide
Download:
https://www.mediawiki.org/wiki/Download
Old 1.24.1 Reference
wget releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.1.tar.gz tar -zvxf mediawiki-1.24.1.tar.gz mv mediawiki-1.24.1 wiki cd wiki sudo chown apache mw-config
Clear History
cd maintenance php deleteOldRevisions.php --delete
ref: https://www.mediawiki.org/wiki/Manual:DeleteOldRevisions.php
MediaWiki Namespace
- MediaWiki:Aboutsite
- MediaWiki:Common.css
- MediaWiki:Common.js
- MediaWiki:Mainpage
- MediaWiki:Opensearch-desc
- MediaWiki:Pagetitle
- MediaWiki:Pagetitle-view-mainpage
- MediaWiki:Sidebar
- MediaWiki:Tagline
- MediaWiki:Tooltip-search