Topic on User talk:Mainframe98/Flow archive

deleted pages: https://www.mediawiki.org/wiki/How_to_install_Mediawiki_1.30_on_Raspberry_Pi and https://www.mediawiki.org/wiki/How_to_install_Mediawiki_1.30_on_Ubuntu_16.04_LTS

3
JefAdams (talkcontribs)
Mainframe98 (talkcontribs)

Then why not update Manual:Running MediaWiki on Debian or Ubuntu instead? This way the wiki ends up having way to many pages all covering the same subject. Content of both pages has been included below:

This documents provides you detailed information how to install step by step a Mediawiki 1.30 server on a Raspberry Pi.  This document will not cover the initial install of the Raspberry Pi.

[[File:RaspberryPi Mediawiki2.jpg|My Raspberry Pi MediaWiki server|center|640x640px|frameless]]

== Upgrade Raspberry Pi ==

First of all you will need to be sure your Raspberry Pi has the latest updates installed. You can install the latest updates with below cli:

 ''# sudo apt-get update''
 ''# sudo apt-get upgrade''

Most of the time, you will need to reboot your Raspberry Pi after the upgrade:

 ''# sudo shutdown -r now''

or

 ''# sudo reboot''

== Installation additional software packages ==


After the reboot you can start to install the following separate software packages needed to be able to run a MediaWiki server.  These additional software packages are: '''apache2, mysql-server, php php-mysql, libapache2-mod-php, php-xml, php-mbstring'''.

 ''# sudo apt-get install apache2 mysql-server php php-mysql libapache2-mod-php php-xml php-mbstring''

== Enable mysql ==

After the installation of these packages you will first need to enable and start mysql and set a root password for mysql:

 ''# sudo systemctl enable mysql''
 ''# sudo systemctl start mysql''
 ''# sudo systemctl status mysql''

 mariadb.service - MariaDB database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-03-15 12:54:50 UTC; 6min ago
  Process: 712 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, 
  Process: 692 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
  Process: 410 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/gale
  Process: 387 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, s
  Process: 356 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, st
 Main PID: 519 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─519 /usr/sbin/mysqld
 Mar 15 12:54:39 systemd[1]: Starting MariaDB database server...
 Mar 15 12:54:45 mysqld[519]: 2018-03-15 12:54:45 3069222096 [Note] /usr/sbin/mysqld (mysql
 Mar 15 12:54:50 systemd[1]: Started MariaDB database server.

 ''# sudo mysqladmin -u root password''


== Enable Apache Server ==

After configuring mysql you can enable, start and test your Apache server:

 ''# sudo systemctl enable apache2''
 ''# sudo systemctl start apache2''
 ''# sudo systemctl status apache2''

 apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-03-15 12:54:47 UTC; 3min 42s ago
  Process: 354 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 632 (apache2)
   CGroup: /system.slice/apache2.service
           ├─632 /usr/sbin/apache2 -k start
           ├─702 /usr/sbin/apache2 -k start
           ├─703 /usr/sbin/apache2 -k start
           ├─704 /usr/sbin/apache2 -k start
           ├─707 /usr/sbin/apache2 -k start
           └─709 /usr/sbin/apache2 -k start
 Mar 15 12:54:39 systemd[1]: Starting The Apache HTTP Server...
 Mar 15 12:54:46 apachectl[354]: AH00557: apache2: apr_sockaddr_info_get() failed for media
 Mar 15 12:54:46 apachectl[354]: AH00558: apache2: Could not reliably determine the server'
 Mar 15 12:54:47 systemd[1]: Started The Apache HTTP Server.

If you now open a browser and go to <localhost> or <ip address Raspberry Pi>, you will be able to see detailed information about the Apache webserver running on your Raspberry Pi.  

[[File:Apache2 test.png|Raspberry Pi test page|center|640x640px|frameless]]

Before starting the initial install of the Mediawiki server, please stop the apache2 service again:

 ''# sudo systemctl stop apache2''
 ''# sudo systemctl status apache2''


== Download latest MediaWiki software ==

Now you can start to download the MediaWiki resources at the MediaWiki website: https://www.mediawiki.org/wiki/Download. The mediawiki-1.30.0.tar.gz file can then be unpacked and copied into /var/www/html (default DocumentRoot Apache server):

 ''# scp <download folder>/mediawiki-1.30.0.tar.gz pi@<ip address raspberry pi>:/var/tmp''

 ''# cd /var/tmp''
 ''# gunzip mediawiki-1.30.0.tar.gz''
 ''# mv mediawiki-1.30.0.tar /var/www/mediawiki-1.30.0.tar''
 ''# cd /var/www''
 ''# tar xvf mediawiki-1.30.0.tar''
 ''# mv html html_apache''
 ''# mv mediawiki-1.30.0 html''

After the unpacking you can start the Apache webserver again:

 ''# sudo systemctl start apache2''

If you now open your browser and fill in the ip address of your Raspberry Pi, you will see the MediaWiki server first page.

== Configuration mysql ==

But before proceeding with the initial MediaWiki installation, there are certain steps you need to do first!  

You will have to:

* create a NEW mysql user (new_mysql_user):

 ''# mysql -u root -p'' and enter password of mysql root user

 MariaDB [(none)]> use mysql
 MariaDB [mysql]> CREATE USER 'new_mysql_user'@'localhost' IDENTIFIED BY 'passwd new_mysql_user';
 MariaDB [mysql]> \q

* create a NEW mysql database pi_wiki:

 ''# mysql -u root''
 MariaDB [(none)]> CREATE DATABASE pi_wiki;
 MariaDB [(none)]> use pi_wiki
 Database changed

* GRANT the NEW mysql user access to the NEW created mysql database pi_wiki:

 MariaDB [pi_wiki]> GRANT ALL ON pi_wiki.* TO new_mysql_user@localhost;
 Query OK, 0 rows affected (0.01 sec)
 MariaDB [pi_wiki]>\q

Now you can stop and start your mysql server again:

 ''# sudo systemctl stop mysql''
 ''# sudo systemctl start mysql''

== Initial MediaWiki server installation ==

After these mysql configuration settings, you can start the initial installation by clicking set up the wiki in your browser:

[[File:Install_screen_mediawiki.png|center|438x438px|install screen mediawiki|frameless]]

Please follow the on screen installation steps and fill in the mysql database '''pi_wiki''', '''new_mysql_user''' and '''new_msql_user password''' when prompted. After the configuration of the Mediawiki server a LocalSettings.php file is created. You will be prompted to download this file and copy it to the DocumentRoot (default /var/www/html) of the Apache server:

 ''# scp <path download folder>/LocalSettings.php pi@<ip address raspberry pi>:/var/tmp''
 ''# mv /var/tmp/LocalSettings.php /var/www/html''

If you now refresh your browser, you will get the main page of the Mediawiki server:


[[File:Main page Mediawiki.png|Main page Mediawiki|center|900x900px|frameless]]



[[User:JefAdams|JefAdams]] ([[User talk:JefAdams|talk]]) 13:36, 15 March 2018 (UTC)

This documents provides you information how to install a Mediawiki 1.30 server on a Ubuntu 16.04 system.  This document does not cover the installation of Ubuntu 16.04 LTS.

== Update Ubuntu 16.04 LTS ==

First of all you will need to be sure your Ubuntu host has the latest updates installed.  You can install the latest updates with below cli:

 ''# sudo apt-get upgrade''

Most of the time, you will need to reboot your Ubuntu 16.04 host after the upgrade:

 ''# sudo shutdown -i6 -g0 -y''


== Install additional software packages ==

After the reboot you can start to install these separate software packages needed to be able to run a Mediawiki server: '''apache2, mysql-server, php php-mysql, libapache2-mod-php, php-xml, php-mbstring''':

 ''# sudo apt-get install apache2 mysql-server php php-mysql libapache2-mod-php php-xml php-mbstring''

During the package installation of mysql-server the system will request you to provide a root password for the mysql server.  Please remember this mysql root password as you will need it during the initial installation of the Mediawiki server later on.

== Enable Apache server ==

After the necessary packages have been successfully installed, you can start and verify/test your Apache server:

 ''# sudo systemctl start apache2''
 ''# sudo systemctl status apache2''

 apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since Die 2018-03-13 15:42:47 CET; 13min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1236 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           ├─1269 /usr/sbin/apache2 -k start
           ├─1272 /usr/sbin/apache2 -k start
           ├─1273 /usr/sbin/apache2 -k start
           ├─1274 /usr/sbin/apache2 -k start
           ├─1275 /usr/sbin/apache2 -k start
           ├─1276 /usr/sbin/apache2 -k start
           ├─2012 /usr/sbin/apache2 -k start
           ├─2038 /usr/sbin/apache2 -k start
           ├─2039 /usr/sbin/apache2 -k start
           └─2040 /usr/sbin/apache2 -k start
 Mär 13 15:42:46 Ubuntu-MediaWiki systemd[1]: Starting LSB: Apache2 web server...
 Mär 13 15:42:46 Ubuntu-MediaWiki apache2[1236]:  * Starting Apache httpd web server apache2
 Mär 13 15:42:46 Ubuntu-MediaWiki apache2[1236]: AH00558: apache2: Could not reliably determine the server's fu
 Mär 13 15:42:47 Ubuntu-MediaWiki apache2[1236]:  *
 Mär 13 15:42:47 Ubuntu-MediaWiki systemd[1]: Started LSB: Apache2 web server.

If you now open a browser and go to <localhost> or <ip address Apache webserver>, you will be able to see detailed information about the Apache webserver running on your host.  Before starting the initial install of the Mediawiki server, please stop the apache2 service again:

 ''# sudo systemctl stop apache2''
 ''# sudo systemctl status apache2''

 apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: inactive (dead) since Die 2018-03-13 16:03:49 CET; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2688 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 1236 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
 Mär 13 15:42:46 Ubuntu-MediaWiki systemd[1]: Starting LSB: Apache2 web server...
 Mär 13 15:42:46 Ubuntu-MediaWiki apache2[1236]:  * Starting Apache httpd web server apache2
 Mär 13 15:42:46 Ubuntu-MediaWiki apache2[1236]: AH00558: apache2: Could not reliably determine the server's fu
 Mär 13 15:42:47 Ubuntu-MediaWiki apache2[1236]:  *
 Mär 13 15:42:47 Ubuntu-MediaWiki systemd[1]: Started LSB: Apache2 web server.
 Mär 13 16:03:47 Ubuntu-MediaWiki systemd[1]: Stopping LSB: Apache2 web server...
 Mär 13 16:03:47 Ubuntu-MediaWiki apache2[2688]:  * Stopping Apache httpd web server apache2
 Mär 13 16:03:49 Ubuntu-MediaWiki apache2[2688]:  *
 Mär 13 16:03:49 Ubuntu-MediaWiki systemd[1]: Stopped LSB: Apache2 web server.


== Download MediaWiki software ==

Now you can start the download of the MediaWiki resources at the download page of the MediaWiki website: https://www.mediawiki.org/wiki/Download.  The mediawiki-1.30.0.tar.gz file can then be unpacked and copied into /var/www/html (default DocumentRoot Apache server):

 ''# cd <download folder>''
 ''# gunzip mediawiki-1.30.0.tar.gz''
 ''# cp mediawiki-1.30.0.tar /var/www''
 ''# cd /var/www''
 ''# tar xvf mediawiki-1.30.0.tar''
 ''# mv html html_orig''
 ''# mv mediawiki-1.30.0 html''


== Initial Mediawiki installation ==

After the unpacking you can start the Apache webserver again:
 
 ''# sudo systemctl start apache2''

If you now open your browser and fill in the ip address of your Ubuntu server or localhost, you will see the MediaWiki server first page and you can start the initial installation by clicking set up the wiki: 

[[File:Install_screen_mediawiki.png|center|438x438px|install screen mediawiki|frameless]]

Please follow the on screen installation steps and fill in the mysql root password when prompted.  You will also need to add a Mediawiki user and password.  After the configuration of the Mediawiki server a LocalSettings.php file is created.  You will be prompted to download this file and copy it to the DocumentRoot (default /var/www/html) of the Apache server:

 ''# cp <path download folder/LocalSettings.php /var/www/html''

If you now refresh your browser, you will get the main page of the Mediawiki server:

[[File:Main page Mediawiki.png|Main page Mediawiki|center|900x900px|frameless]]




[[User:JefAdams|JefAdams]] ([[User talk:JefAdams|talk]]) 15:12, 13 March 2018 (UTC)

JefAdams (talkcontribs)

Dear Mainframe98

I will do this in the near future. But as I am a newbie to wikipedia I was trying to create pages first.

Kind regards

Jef