MediaWiki: Difference between revisions

From Alpine Linux
(Created page with '== 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 * P...')
 
m (Added See Also: Converting mediawiki database from postgresql to mysql/mariadb)
(24 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== Set up MediaWiki on Alpine Linux ==
[http://www.mediawiki.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.


This document will be a quick c/p guide to setup MediaWiki on Alpine linux. What we will setup is the following:
== Install lighttpd, PHP,  and postgresql ==


* Lighttpd with PHP
{{Cmd|apk add curl lighttpd php php-dom php-json php-pgsql php-iconv php-zlib php-gd imagemagick diffutils}}
* Postgresql
* MediaWiki


== Install lighttpd, PHP,  and postgresql ==
Install extra packages


apk add lighttpd postgresql postgresql-client php php-iconv php-json php-gd php-curl php-xml php-pgsql php-imap php-pdo php-pdo_pgsql  php-soap php-xmlrpc php-posix php-mcrypt php-gettext
{{Cmd|apk add postgresql postgresql-client openrc}}


== Configuring Lighttpd==
== Installing and configuring  MediaWiki ==


'''Edit lighttpd.conf'''
Create a folder named {{Path|webapps}}


nano +46 /etc/lighttpd/lighttpd.conf
{{Cmd|mkdir -p /usr/share/webapps/}}


Uncomment lines:
Download
uncoment    include "mod_fastcgi.conf", save and exit


{{Cmd|cd /usr/share/webapps/
curl https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz >mw.tar.gz}}


== Installing and configuring  MediaWiki ==
Unpack the archive and delete the tarball afterwards


'''Install MediaWiki'''
{{Cmd| tar zxvf mw.tar.gz
rm mw.tar.gz}}
Change the folder permissions


Download
{{Cmd|chown -R lighttpd /usr/share/webapps/}}


  cd /var/www/localhost/htdocs/
Crate a symlink to the {{Path|wordpress}} folder
  wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.4.tar.gz


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


  gunzip mediawiki-1.15.4.tar.gz
  tar xvf mediawiki-1.15.4.tar
 
Change Folder Name
  mv mediawiki-1.15.4 mediawiki
 
== Starting ==
== Starting ==
   
   
'''Starting http and sql server and adding to boot'''
{{Cmd|/etc/init.d/postgresql setup
 
/etc/init.d/postgresql start && rc-update add postgresql default
/etc/init.d/postgresql setup
/etc/init.d/lighttpd start && rc-update add lighttpd default}}
/etc/init.d/postgresql start && rc-update add postgresql default
/etc/init.d/lighttpd start && rc-update add lighttpd default
   
   
== Config your wiki ==
== Config your wiki ==
Line 51: Line 43:
Browse
Browse


http://WEBSERVER_IP_ADDRESS/mediawiki/config/index.php
http://WEBSERVER_IP_ADDRESS/config/index.php


* Site config
* Site config
Line 84: Line 76:


When you finish, press "Install MediaWiki" button, and thats all. :)
When you finish, press "Install MediaWiki" button, and thats all. :)
You have MediaWiki working, to access go to http://WEBSERVER_IP_ADDRESS/mediawiki
You have MediaWiki working, to access go to http://WEBSERVER_IP_ADDRESS/mediawiki and enjoy!
 
=See Also=
*[[Converting mediawiki database from postgresql to mysql/mariadb]]
 
[[Category:SQL]]

Revision as of 04:30, 16 September 2017

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

apk add curl lighttpd php php-dom php-json php-pgsql php-iconv php-zlib php-gd imagemagick diffutils

Install extra packages

apk add postgresql postgresql-client openrc

Installing and configuring MediaWiki

Create a folder named webapps

mkdir -p /usr/share/webapps/

Download

cd /usr/share/webapps/ curl https://releases.wikimedia.org/mediawiki/1.26/mediawiki-1.26.2.tar.gz >mw.tar.gz

Unpack the archive and delete the tarball afterwards

tar zxvf mw.tar.gz rm mw.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!

See Also