Manual talk:Running MediaWiki on Debian or Ubuntu
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
This board is for discussions about running MediaWiki on Debian or Ubuntu.
Older discussion can be found at Manual talk:Running MediaWiki on Ubuntu
Bad MySQL advice?
[edit]The mysqladmin statement suggested wasn't enough for me to pass the first database configuration stage - I kept getting a misleading bad server/user/password error. Only when I defined a database myself from within MySQL with
GRANT ALL PRIVILEGES ON wikidb.* TO 'wikidbadmin'@'localhost' IDENTIFIED BY 'strong-password';
as suggested in https://www.mediawiki.org/wiki/Manual:Maintenance_scripts MW could finally talk to MySQL. This tested with MariaDB 10.0.29 and localhost on Linux Mint.
I'm not experienced enough with Linux to tell for sure if adding this to the page would make the document much better so I won't, but maybe someone else finds this useful. Tactica (talk) 08:46, 3 April 2017 (UTC)
pi_wiki should not be my_wiki
[edit]Not being an expert runnig configuration script has not worked until i have change pi_wiki by my_wiki 189.146.78.196 (talk) 04:49, 8 April 2018 (UTC)
Configure MediaWiki
[edit]How to proceed with the section "Configure MediaWiki" in command line only Unix systems where there is no browser access? 76.30.246.206 (talk) 20:54, 5 June 2018 (UTC)
- I could not locate LocalSettings.php in my Mediawiki folder. Is there a way to install Mediawiki from command line instead of we based installation? 76.30.246.206 (talk) 21:41, 5 June 2018 (UTC)
- You should use the
maintenance/install.phpscript. Legoktm (talk) 07:30, 10 June 2018 (UTC) - Thanks for your reply. I have used port forwarding to use web installer from my laptop and installed it.
- Now I am getting 301 moved permanently error and 500 internal server error.
- From my laptop I logged in with the node in which I want to install Mediawiki as below:
- ssh -C -L 9999:localhost:80 s7
- Then I opened the browser from my laptop as http://s7:9999/mediawiki and installed the mediawiki.
- After I tried to ssh with s7 as usual and if I try to access with wget I got the following error:
- HTTP request sent, awaiting response... 301 Moved Permanently
- Location: http://s7:9999/mediawiki/index.php/Main_Page [following]
- --2018-06-14 16:57:31-- http://s7:9999/mediawiki/index.php/Main_Page
- Resolving s7 (s7)... 10.10.2.8
- Connecting to s7 (s7)|10.10.2.8|:9999... failed: Connection refused.
- Then I changed
- $wgServer = "http://s7:9999"; to
- $wgServer = "http://localhost";
- in LocalSettings.php. But still I am getting the same error.
- wget http://localhost/mediawiki
- --2018-06-14 17:01:33-- http://localhost/mediawiki
- Resolving localhost (localhost)... 127.0.0.1
- Connecting to localhost (localhost)|127.0.0.1|:80... connected.
- HTTP request sent, awaiting response... 301 Moved Permanently
- Location: http://localhost/mediawiki/ [following]
- --2018-06-14 17:01:33-- http://localhost/mediawiki/
- Reusing existing connection to localhost:80.
- HTTP request sent, awaiting response... 301 Moved Permanently
- Location: http://localhost/mediawiki/index.php/Main_Page [following]
- --2018-06-14 17:01:33-- http://localhost/mediawiki/index.php/Main_Page
- Reusing existing connection to localhost:80.
- HTTP request sent, awaiting response... 500 Internal Server Error
- I would like to know how to solve this error. I would like to appreciate any help. 76.30.246.206 (talk) 21:06, 14 June 2018 (UTC)
- I am messed up with apache2 configuration I guess. Can any one please tell me how to configure apache2.conf and 000-deafult.conf and what should be given to $wgScriptPath in LocalSettings.php? 76.30.246.206 (talk) 15:09, 15 June 2018 (UTC)
Why use super user account
[edit]1, The installation says we must use debian-sys-maint, Why must? The installation guide give us the not choice, it seems 'not must'.
2, I am using 'mysql-community-server', 5.7.24-1ubuntu18.04 . which doesn't have debian-sys-maint reserved user.
3, Is 'mysql-community-server', 5.7.24-1ubuntu18.04 mysql.sys is equvilent to debian-sys-maint ?
4. where is the password of debian-sys-maint or mysql.sys ? In my case, it is not the same as root 35.235.65.76 (talk) 16:40, 16 December 2018 (UTC)
how to restart wiki?
[edit]Assuming we followed the instructions, should the wiki installation be available any time apache2 is running? or is there some other process we need to start? Spineflu (talk) 17:56, 14 November 2019 (UTC)
Update MySQL guide.
[edit]On a fresh Ubuntu 19.10, running mysql ver 8.0.18 and php 7.3.11 I followed this guide to install MW 1.34 and I kept getting the error that the mw couldn't find the login/password in the database (i.e. 'the server requested authentication method unknown to the client' etc).
What solved my problem is this article
and specifically, I had to run the 'Command to create the new user with the old authentication'
Please review the guide and update whatever is needed, I saw some other users had similar problems e.g. Project:Support desk/Flow/2019/07#h-Cannot_access_the_database:_:real_connect():_(HY000/2054):_The_server_requested-2019-07-09T21:31:00.000Z MavropaliasG (talk) 10:55, 23 January 2020 (UTC)
Mediawiki 1.34 doesn't find Localsettings.php on Windows -Ubuntu
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I'm trying to install Mediawiki 1.34 via tarball on Windows10 -Linux Ubuntu - apparently all the modules are working fine: phpmyadmin, sql database, apache2. http://localhost/mediawiki/Mw-config ran successfully and produced a valid Localsettings.php: Upgrade complete. You can now start using your wiki. But then MediaWiki 1.34.0 LocalSettings.php not found. Please complete the installation and download LocalSettings.php.
I tried to put the mediawiki directory in /var/www/html/ and alternatively in /var/lib/ with a symbolic link to /var/www/html/ but http://localhost/mediawiki keeps telling me : LocalSettings.php not found.
I've put LocalSettings.php in all the directories one can imagine without success. There are lots of suggestions on several sites but nothing works.
I have tried to debug index.php: wfEntryPointCheck() fails EFFemeer (talk) 10:08, 24 March 2020 (UTC)
Upgrading the OS (and PHP) of an existing MW-Installation
[edit]Well, this is a silly question (sorry) but what happens if I make an upgrade from one Ubuntu LTS to another (in my case 18.04 to 20.04) plus a PHP upgrade?
I made a backup of my database and the MediaWiki folder and secured it, but how will the software react to this changes? Do I need a reconfiguration after that? Does I get an error due to the changed OS/PHP version? Or will nothing at all happen?
It is a very silly question, but hey, better asking it now than after having a problem with the upgrade. 80.128.153.139 (talk) 18:55, 12 October 2020 (UTC)
- You should review Compatibility#Server software to make sure the versions you're upgrading to are compatible with your targeted MediaWiki version. In general I recommend upgrading your operating system (and PHP and MySQL, etc.) and then updating MediaWiki if necessary.
- In general you shouldn't need to change any MediaWiki configuration. I would recommend ensuring any caches like memcached or redis are reset though. Legoktm (talk) 04:29, 14 October 2020 (UTC)
- The Ubuntu and PHP upgrade (from 7.2.x to 7.3.x) is more or less the preparation for an upcoming MediaWiki upgrade, so this was the plan all along. Thanks for your help. 87.157.185.35 (talk) 10:01, 14 October 2020 (UTC)
mediawiki 1.35.1 plus visualeditor, public or private: Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK
[edit]hello mediawiki experts,
thanks for all the work, a lot of things had been done since I set up a mediawiki last time (about 8 years ago).
I now did a fresh installation on a recent debian 10 installation using the official 1.35.1-tarball following the manual Running MediaWiki on Debian or Ubuntu
The only extension I added was VisualEditor.
The only thing I changed in LocaleSettings.php was to set $wgServer with my servers address.
and optionally the additional line: $wgGroupPermissions['user']['writeapi'] = true;
To my understanding this way I should end up with a public wiki ready for use incl VisualEditor. (correct?)
I tried both without logging in and as a registered user (I will need some privacy later on, but for now I'd be happy to see VisualEditor working one way or another).
Actually I run such installations quite some times, always starting from scratch, following various other descriptions suggesting to add parsoid and rest server stuff separately.
But whenever I finally start using that editor by clicking on bearbeiten I get the pop up message (using firefox from remote or locally): Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK
In contrast Quelltest bearbeiten seems to work fine :)
My questions:
- can I take it for granted the documented procedure should work including VisualEditor without any extra steps ?
- If any additional procedure is needed: which one ?
thanks for any advise or explanation Smartdaddy1879 (talk) 06:39, 21 January 2021 (UTC)
- ==additional info:==
- turning on all debug stuff I found I got these lines:
[http] GET: https://<my-server-ip>/mediawiki/rest.php/<my-server-ip>/v3/page/html/Hauptseite/1?redirect=false&stash=true</code></code> [http] Error fetching URL "https://<my-server-ip>/mediawiki/rest.php/<my-server-ip>/v3/page/html/Hauptseite/1?redirect=false&stash=true": (curl error: 60) SSL peer certificate or SSH remote key was not OK- Maybe somebody could tell the structure of that https request where the original request from outside was
https://<my-server-ip>/mediawiki/index.php/Hauptseite?action=edit&veswitched=1Smartdaddy1879 (talk) 03:19, 22 January 2021 (UTC)- Hey there - I had this issue this morning myself. It's trying to request https but I don't have SSL running yet on this server. Are you running SSL? Try changing
- https://<my-server-ip>/
- to
- http://<my-server-ip>/
Tderouin (talk) 15:01, 27 January 2021 (UTC)
Short URL/Apache for Ubuntu 20.10
[edit]Because I am an *absolute* noob when it comes to both apache and Ubuntu, it took me a while to get Short/Pretty URLs working in Apache on Ubuntu 20.10. The settings below are an expansion to Manual:Running MediaWiki on Debian or Ubuntu#Pretty URLs
Update LocalSettings.php
$wgScriptPath = "/mediawiki";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
Add URL Rewrites to Apache
The Debian (Ubuntu) Apache package splits all the configuration files into various folders. Rather than adding the rewrite rules directly into the default Virtual Hosts .conf file, I created a separate .conf and linked the two with an Include. I'm not sure this is *exactly* how Debian intends this to be configured, but it did work.
- Enable apache's url rewrite module
sudo a2enmod rewrite
- Create a configuration file to include the URL rewrite rules
- Create
/etc/apache2/conf-available/mediawiki.conf
- Add the following contents:
RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
- Enable that configuration file
- Command
sudo a2enconf /etc/apache2/conf-available/mediawiki.conf
- Set my default VirtualHosts configuration file to import the
mediawiki.conf contents
- Edit
/etc/apache2/sites-available/000-default.conf
- Add 1 line just before </VirtualHost>:
Include conf-enabled/mediawiki.conf
- Restart apache
systemctl restart apache2 Gstratt (talk) 02:22, 21 February 2021 (UTC)
Page Errors
[edit]Dear All.
TLDR
In the see also section of this page there is a link :
Mediawiki Setup Guide at ofswiki.org
That doesn't take me to the page that is linked to, it auto redirects to a page where the site can be registered.
I haven't yet found a good alternative to this link, so I've left it on the page. I have put an HTML comment before the bullet point line that contains the link. I have signed this page with my 'SBS' tag.