MediaWiki: Difference between revisions

From Alpine Linux
(php-session missing as well)
(included/edited info about installing version 1.35.)
Line 11: Line 11:
== Installing and configuring  MediaWiki ==
== Installing and configuring  MediaWiki ==


Create a folder named {{Path|webapps}}
Create a folder named {{Path|mediawiki}}


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


Download  
Download the [http://www.mediawiki.org/wiki/MediaWiki latest version]. At the time of writing it is 1.35.1


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


Unpack the archive and delete the tarball afterwards
Unpack the archive, rename the folder and delete the tarball afterwards


{{Cmd| tar zxvf mw.tar.gz
{{Cmd|tar zxvf mw.tar.gz
mv mediawiki-1.35.1 mediawiki
rm mw.tar.gz}}
rm mw.tar.gz}}
   
   
Line 32: Line 33:


{{Cmd|ln -s /usr/share/webapps/mediawiki/ /var/www/localhost/htdocs/mediawiki}}
{{Cmd|ln -s /usr/share/webapps/mediawiki/ /var/www/localhost/htdocs/mediawiki}}
Edit lighttpd.conf and uncomment '''include "mod_fastcgi.conf"'''
{{Cmd|vi /etc/lighttpd/lighttpd.conf}}
Restart lighttpd service
{{Cmd|rc-service lighttpd restart}}


== Starting ==
== Starting ==
Line 41: Line 50:
== Config your wiki ==
== Config your wiki ==


Browse
Install the wiki accessing
 
http://WEBSERVER_IP_ADDRESS/config/index.php
 
* Site config
You need to set:


  Wiki name:
http://WEBSERVER_IP_ADDRESS/mediawiki/mw-config/index.php
  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. :)
When you finish, press "Install MediaWiki" button, and that's all. :)
You have MediaWiki working, to access go to http://WEBSERVER_IP_ADDRESS/mediawiki and enjoy!
You have MediaWiki working. To access go to http://WEBSERVER_IP_ADDRESS/mediawiki and enjoy!


=See Also=
=See Also=

Revision as of 15:17, 21 March 2021

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-cgi php-mbstring php-xml php-ctype php-fileinfo php-iconv php-zlib php-gd php-session imagemagick diffutils

Install extra packages

apk add postgresql postgresql-client openrc

Installing and configuring MediaWiki

Create a folder named mediawiki

mkdir -p /usr/share/webapps/

Download the latest version. At the time of writing it is 1.35.1

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

Unpack the archive, rename the folder and delete the tarball afterwards

tar zxvf mw.tar.gz mv mediawiki-1.35.1 mediawiki 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

Edit lighttpd.conf and uncomment include "mod_fastcgi.conf"

vi /etc/lighttpd/lighttpd.conf

Restart lighttpd service

rc-service lighttpd restart

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

Install the wiki accessing

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

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

See Also