MediaWiki: Difference between revisions

From Alpine Linux
(Category:SQL)
mNo edit summary
Line 1: Line 1:
== What is 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.
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.
== Set up MediaWiki on Alpine Linux ==
This document will be a quick c/p guide to setup MediaWiki on Alpine linux. What we will setup is the following:
* Lighttpd with PHP
* Postgresql
* MediaWiki


== Install lighttpd, PHP,  and postgresql ==
== Install lighttpd, PHP,  and postgresql ==
Line 20: Line 10:
== Installing and configuring  MediaWiki ==
== Installing and configuring  MediaWiki ==


'''Install MediaWiki'''
Create a folder named {{Path|webapps}}
 
Make webapps folder


{{Cmd|mkdir /usr/share/webapps/ -p}}
{{Cmd|mkdir -p /usr/share/webapps/}}


Download  
Download  


{{Cmd|cd /usr/share/webapps/
{{Cmd|cd /usr/share/webapps/
wget http://dumps.wikimedia.org/mediawiki/1.17/mediawiki-1.17.0.tar.gz}}
wget http://dumps.wikimedia.org/mediawiki/1.20/mediawiki-1.20.2.tar.gz}}


Unpack  
Unpack the archive and delete the tarball afterwards


{{Cmd| tar zxvf mediawiki-1.17.0.tar.gz}}
{{Cmd| tar zxvf mediawiki-1.20.2.tar.gz
rm mediawiki-1.20.2.tar.gz}}
   
   
Make Symlink to the wiki
Change the folder permissions
 
{{Cmd|chown -R lighttpd /usr/share/webapps/}}
 
Crate a symlink to the {{Path|wordpress}} folder


{{Cmd|ln -s /usr/share/webapps/mediawiki-1.17.0/ /var/www/localhost/htdocs/mediawiki}}
{{Cmd|ln -s /usr/share/webapps/mediawiki/ /var/www/localhost/htdocs/mediawiki}}


== Starting ==
== Starting ==
   
   
'''Starting http and sql server and adding to boot'''
{{Cmd|/etc/init.d/postgresql setup
{{Cmd|/etc/init.d/postgresql setup
/etc/init.d/postgresql start && rc-update add postgresql default
/etc/init.d/postgresql start && rc-update add postgresql default

Revision as of 11:21, 22 January 2013

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.

Install lighttpd, PHP, and postgresql

Basic Installation

For installing the additional packages first activate community packages and update the package index

Install the required packages:

# apk add lighttpd php82 fcgi php82-cgi

Configure Lighttpd

Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:

Contents of /etc/lighttpd/lighttpd.conf

... include "mod_fastcgi.conf" ...

Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.

Contents of /etc/lighttpd/mod_fastcgi.conf

... "bin-path" => "/usr/bin/php-cgi82" # php-cgi ...

Start lighttpd service and add it to default runlevel

# rc-service lighttpd start # rc-update add lighttpd default

Install extra packages

apk add postgresql postgresql-client

Installing and configuring MediaWiki

Create a folder named webapps

mkdir -p /usr/share/webapps/

Download

cd /usr/share/webapps/ wget http://dumps.wikimedia.org/mediawiki/1.20/mediawiki-1.20.2.tar.gz

Unpack the archive and delete the tarball afterwards

tar zxvf mediawiki-1.20.2.tar.gz rm mediawiki-1.20.2.tar.gz

Change the folder permissions

chown -R lighttpd /usr/share/webapps/

Crate a symlink to the wordpress folder

ln -s /usr/share/webapps/mediawiki/ /var/www/localhost/htdocs/mediawiki

Starting

/etc/init.d/postgresql setup /etc/init.d/postgresql start && rc-update add postgresql default /etc/init.d/lighttpd start && rc-update add lighttpd default

Config your wiki

Browse

http://WEBSERVER_IP_ADDRESS/config/index.php

  • Site config

You need to set:

 Wiki name:
 Contact e-mail:
 Language:
 Copyright/license:
 Admin username:
 Password:
 Password confirm:
 Object caching:
 Memcached servers:
 E-mail features (global):
 User-to-user e-mail:
 E-mail notification about changes:
 E-mail address authentication:
 Database type:
 PostgreSQL
 Database host:
 Database name:
 DB username:
 DB password:
 DB password confirm:
 Superuser account:  
 Superuser name:
 Superuser password:
 Database port:
 Schema for mediawiki:
 Schema for tsearch2:

When you finish, press "Install MediaWiki" button, and thats all. :) You have MediaWiki working, to access go to http://WEBSERVER_IP_ADDRESS/mediawiki and enjoy!