Could someone explain how to install Mediawiki with Nginx (Default) on it?

Hello:
On Fedora 34

  1. Installing & starting nginx default using /dnf is OK everything as docunmented.
  2. Installing MediaWiki on it, using dnf seems very difficult ! Could you provide a procedure ?

Note: Ideally the dnf install of MediaWiki will create a valid working default file.
Thanks in advance !
A.G

1 Like

1.- Discuss before:

2.- Please check that:

https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Fedora
https://www.mediawiki.org/wiki/Topic:Vlx6hb4ymnhcj7ey

After installation, open the file /usr/share/doc/mediawiki/README and follow the instructions there. Also, the file /usr/share/mediawiki/INSTALL .


The esiest and Fastest Way

However you can use podman (container) as describe in the fisrt post from the site, or:

https://hub.docker.com/_/mediawiki/

sudo dnf install podman-compose
podman-compose up -d

For Example:

# MediaWiki with MariaDB
version: '3'
services:
  mediawiki:
    image: mediawiki
    restart: always
    ports:
      - "9090:80"
    links:
      - database
    volumes:
      - /var/www/html/images
      # After initial setup, download LocalSettings.php to the same directory as
      # this yaml and uncomment the following line and use compose to restart
      # the mediawiki service
      # - ./LocalSettings.php:/var/www/html/LocalSettings.php
  database:
    image: mariadb
    restart: always
    environment:
      # @see https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/DefaultSettings.php
      MYSQL_DATABASE: my_wiki
      MYSQL_USER: wikiuser
      MYSQL_PASSWORD: example
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'

Use your web browser http://localhost:9090 , here is the work done:

Captura de pantalla de 2021-06-01 20-36-58

Here is the password used by this container, to config intitla config of mediawiki:

      MYSQL_DATABASE: my_wiki
      MYSQL_USER: wikiuser
      MYSQL_PASSWORD: example
      MYSQL_RANDOM_ROOT_PASSWORD: 'yes'

MORE DEEPER

you can use Volumes to store your container volatile data in your Bare Metal/Host, here is How?,

A. Deploy Your Own MediaWiki Wiki | Programster's Blog

also include in the Howto before, How to acomplish this task?, after the FIRST SETUP, comment in the Dockerfile:

  # After initial setup, download LocalSettings.php to the same directory as
  # this yaml and uncomment the following line and use compose to restart
  # the mediawiki service
  # - ./LocalSettings.php:/var/www/html/LocalSettings.php

STEPS

LocalSettings File

When you finish, you will automatically download a LocalSettings.php file. Copy the contents of this file. Then open up the editor to where the file needs to be and paste it:

sudo vim $HOME/volumes/mediawiki/LocalSettings.php
sudo chmod 755 $HOME/volumes/mediawiki/LocalSettings.php

Then uncomment the LocalSettings.php volume line in the docker-compose.yml file.

- $HOME/volumes/mediawiki/LocalSettings.php:/var/www/html/LocalSettings.php

Regards., HTH

2 Likes

What is exactly “For Example:” a config file or what ?
Thanks

Yes the config file, save It as docker-compose.yml

Regards.,

Thanks a lot !
A.G

1 Like