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...')
 
(replace /etc/init.d with rc-service)
 
(33 intermediate revisions by 13 users not shown)
Line 1: Line 1:
== Set up MediaWiki on Alpine Linux ==
[https://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 ==
 
{{Cmd|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}}


* Lighttpd with PHP
Install extra packages
* Postgresql
* MediaWiki


== Install lighttpd, PHP,  and postgresql ==
{{Cmd|apk add postgresql postgresql-client openrc}}


  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
== Installing and configuring MediaWiki ==


== Configuring Lighttpd==
Create a folder named {{Path|mediawiki}}


'''Edit lighttpd.conf'''
{{Cmd|mkdir -p /usr/share/webapps/}}


nano +46 /etc/lighttpd/lighttpd.conf
Download the [https://www.mediawiki.org/wiki/MediaWiki latest version]. At the time of writing it is 1.35.1


Uncomment lines:
{{Cmd|cd /usr/share/webapps/
uncoment    include "mod_fastcgi.conf", save and exit
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


== Installing and configuring MediaWiki ==
{{Cmd|tar zxvf mw.tar.gz
mv mediawiki-1.35.1 mediawiki
rm mw.tar.gz}}
   
Change the folder permissions


'''Install MediaWiki'''
{{Cmd|chown -R lighttpd /usr/share/webapps/}}


Download
Crate a symlink to the {{Path|mediawiki}} folder


  cd /var/www/localhost/htdocs/
{{Cmd|ln -s /usr/share/webapps/mediawiki/ /var/www/localhost/htdocs/mediawiki}}
  wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.4.tar.gz


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


  gunzip mediawiki-1.15.4.tar.gz
{{Cmd|vi /etc/lighttpd/lighttpd.conf}}
  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|rc-service postgresql setup
 
rc-service postgresql start && rc-update add postgresql default
/etc/init.d/postgresql setup
rc-service 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 ==


Browse
Install the wiki accessing


http://WEBSERVER_IP_ADDRESS/mediawiki/config/index.php
<nowiki>http://WEBSERVER_IP_ADDRESS/mediawiki/mw-config/index.php</nowiki>


* Site config
When you finish, press "Install MediaWiki" button, and that's all. :)
You need to set:
You have MediaWiki working. To access go to <nowiki>http://WEBSERVER_IP_ADDRESS/mediawiki</nowiki> and enjoy!


  Wiki name:
=See Also=
  Contact e-mail:
*[[Converting mediawiki database from postgresql to mysql/mariadb]]
  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. :)
[[Category:SQL]]
You have MediaWiki working, to access go to http://WEBSERVER_IP_ADDRESS/mediawiki

Latest revision as of 09:46, 17 November 2023

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 mediawiki 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

Starting

rc-service postgresql setup rc-service postgresql start && rc-update add postgresql default rc-service 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