MediaWiki

From 24PinTech Wiki
Revision as of 17:49, 8 August 2022 by Lchristopherson (talk | contribs)
Jump to navigation Jump to search


About

MediaWiki-2020-logo.svg.png

Mediawiki is the software that our wiki runs on. Mediawiki is ran on our LEMP stack and allows for "wikipedia" type pages to be made securely. Installing a wiki is a very simple process, so pay attention...


Before you begin, make sure that you have a server block set up for the wiki.

Links

https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki

https://www.mediawiki.org/wiki/Manual:Config_script

Installation

To begin the installation for MediaWiki, you need to have a working webserver, in which we are running a LEMP stack. You will visit MediaWiki's Download website to download the newest version of MediaWiki in .tar.gz format. Once you have the .tar.gz file, you must PuTTY the file into the webserver. Now you have to unzip the file into the working wiki directory. Move the zip into the root of the server block by running, sudo mv ./mediawiki-install-zip /var/www/wiki-install-directory. Once you have moved the zip into the folder, you need to unzip it. Do so by running sudo tar -xzvf ./mediawiki-install-zip. The best practice is to use a folder named "w", for the wiki files, though we used the root directory. To change the directory's name, you will run sudo mv ./mediawiki-install ./new-name. If you are moving all of the contents into the root website directory you will run, sudo mv ./mediawiki-install/* ./.

Create a database for the wiki

The wiki needs specific parameters for the database to correctly function. Log into mysql by running sudo mysql -u root -p. Once you log in you will run the following commands with your settings.

CREATE DATABASE db_name;

CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'db_password';

GRANT ALL PRIVILEGES ON db_name.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;

This will successfully create the database and database user for your wiki.

Install the wiki

To run the installation script, you must visit your wiki domain/mw-config. For example: https://wiki.domain.com/mw-config or https://domain.com/wiki/mw-config. You will run through the installation with the settings that you have set up previously, such as the database user and database name. Once the setup is complete, you will receive a download for a file called LocalSettings.php. You must PuTTY this into the server, as you did with the install zip. Once completed, this will go directly to the wiki's root directory.

The wiki should now be setup. For Parsoid and VisualEditor setup, see: Parsoid and VisualEditor.

Special Usages

The wiki is now set up and may be used. There are two key things I'd like to iterate here. You can find most special settings, like creating accounts in the Special Pages tab.

The second thing is that the sidebar is editable. You may edit it by clicking this link. https://wiki.24pin.tech/edit/MediaWiki:Sidebar

-Luke Christopherson