MediaWiki Install 2022-09-01: Difference between revisions

From Traxel Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
* Previous Version: https://wiki.traxel.com/index.php/MediaWiki_Install_2022-01-22
* Previous Version: https://wiki.traxel.com/index.php/MediaWiki_Install_2022-01-22
= Notes =
== Additional Modules ==
* Survey Extension, should work well for HeatSync
** https://www.mediawiki.org/wiki/Extension:Survey


= Create a Host =
= Create a Host =

Revision as of 19:42, 3 September 2022

Notes

Additional Modules

Create a Host

I'm not going to document this part. Pick your favorite hosting service and create a Debian 10 host. Get the IP address.

IP: 54.202.176.144

System Update and Core Software

Following is based, in part, on MediaWiki Installation Requirements.

Log in to your host.

Script:

sudo apt update -y
sudo apt upgrade -y
# the one true editor
sudo apt install -y emacs-nox
# Apache with TLS support
sudo apt install -y apache2 certbot python3-certbot-apache
# DB, PHP, and Apache Modules
sudo apt install -y mariadb-server php php-mysql libapache2-mod-php
# PHP Support for MediaWiki Features:
sudo apt install -y php-xml php-mbstring php-apcu php-intl php-cli php-curl
# other mediawiki feature support:
sudo apt install -y git imagemagick texlive

Retry: On my first pass through, just pasting this to a CLI, it stopped after the second line (upgrade). I then pasted the whole thing into a file and called it with "sh init.sh", and it ran the whole way through. When I nuke this box and come back through I want to try again using the shell script file on the first pass. Worst case you just keep re-calling the script until it makes it through.

MediaWiki Tarball

I am installing from the tarball instead of using the Debian package because other package tools, like RPM or Snap, or other distros than Debian, might put directories in different places. This should be close to universal.

$ mkdir tmp
$ cd tmp
$ wget https://releases.wikimedia.org/mediawiki/1.38/mediawiki-1.38.2.tar.gz

One difference on other distros may be the location of /var/www/html. Adjust the following commands to match your distro's structure if you're not using Deb 10.

$ cd /var/www
$ sudo tar -xvzf ~/tmp/mediawiki-1.38.2.tar.gz
$ sudo mv html html.old
$ sudo ln -s mediawiki-1.38.2 html

Configure MariaDB

Pick a username for MediaWiki to use (I'm using wiki_wiki as an example).

Pick a database name (I'm using hsl_wiki as an example).

Pick a password other than "CHANGE THIS PASSWORD".

$ sudo mariadb -u root
MariaDB> create database hsl_wiki;
MariaDB> grant all on hsl_wiki.* to 'wiki_wiki'@'localhost' identified by 'CHANGE THIS PASSWORD';
MariaDB> flush privileges;

Then you can verify it worked if you like. (there won't be any tables, but it shouldn't give you an auth error)

$ mariadb -u wiki_wiki -p
MariaDB> show tables in hsl_wiki;
MariaDB> exit