Difference between revisions of "WikiServer - Install"

From The TinkerNet Wiki
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Install the LAMP Stack ===
+
<span style="font-size: 24pt; color: rgb(224, 62, 45); text-decoration: underline;">This is a Deprecated Version!</span>'''''</span>
 +
 
 +
*Proven on Mint 19.3 ... (Seems to get MySQL 5.7)
 +
*Proven on Mint 20 ... (Gets MySQL 8.0)
 +
*Proven on SparkyLinux 5.11 ... (You'll have to [https://tecadmin.net/install-mysql-server-on-debian9-stretch/ fix the missing MySQL] thing & install vim first)
 +
**[[Getting MySQL onto SparkyLinux]]
 +
 
 +
===Install the LAMP Stack===
  
 
[[WebServer - Basic LAMP Stack Install|Basic LAMP Stack Install]]
 
[[WebServer - Basic LAMP Stack Install|Basic LAMP Stack Install]]
  
=== Install MediaWiki ===
+
'''<big>NOTE:</big>'''  You will need php 7.3.19 or higher to run MediaWiki 1.35
  
* <code>wget <nowiki>https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.1.tar.gz</nowiki></code>
+
===Install MediaWiki===
* <code>tar -xvzf mediawiki-*.tar.gz</code>
+
 
* <code>sudo mkdir /var/www/html/wiki</code>
+
*<s><code>wget <nowiki>https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.1.tar.gz</nowiki></code></s>
* <code>sudo mkdir /var/www/html/labnotes</code>
+
*<code>wget <nowiki>https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0</nowiki><nowiki/>.tar.gz</code>
* <code>sudo cp -r mediawiki-*/* /var/www/html/wiki</code>
+
*<code>tar -xvzf mediawiki-*.tar.gz</code>
* <code>sudo cp -r mediawiki-*/* /var/www/html/labnotes</code>
+
*<code>sudo mkdir /var/www/html/wiki</code>
* <code>sudo mysql -u root -p</code>
+
*<code>sudo mkdir /var/www/html/labnotes</code>
 +
*<code>sudo cp -r mediawiki-*/* /var/www/html/wiki</code>
 +
*<code>sudo cp -r mediawiki-*/* /var/www/html/labnotes</code>
 +
*<code>sudo mysql -u root -p</code>
  
 
  CREATE DATABASE my_wiki;
 
  CREATE DATABASE my_wiki;
  GRANT ALL PRIVILEGES ON my_wiki.* TO 'someone'@'localhost' IDENTIFIED BY 'password';
+
  GRANT ALL PRIVILEGES ON my_wiki.* TO 'someone'@'localhost';
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;
 
  CREATE DATABASE my_notes;
 
  CREATE DATABASE my_notes;
  GRANT ALL PRIVILEGES ON my_notes.* TO 'someone'@'localhost' IDENTIFIED BY 'password';
+
  GRANT ALL PRIVILEGES ON my_notes.* TO 'someone'@'localhost';
 
  FLUSH PRIVILEGES;
 
  FLUSH PRIVILEGES;
 
  EXIT;
 
  EXIT;
  
* <code>sudo vim /etc/php/7.2/apache2/php.ini</code>
+
*<code>sudo vim /etc/php/7.4/apache2/php.ini</code>
** increase <code>upload_max_filesize</code> to 200M
+
**(this may be in a slightly different location depending on version of php installed...)
* Fix upload directories:
+
**increase <code>upload_max_filesize</code> to 200M
** <code>sudo chmod -R ugo+rwX /var/www/html/wiki/images</code>
+
*Fix upload directories:
** <code>sudo chmod -R ugo+rwX /var/www/html/labnotes/images</code>
+
**<code>sudo chmod -R ugo+rwX /var/www/html/wiki/images</code>
 +
**<code>sudo chmod -R ugo+rwX /var/www/html/labnotes/images</code>
  
 
Browse to http://ServerAddress/wiki & follow the steps presented.
 
Browse to http://ServerAddress/wiki & follow the steps presented.
Line 34: Line 45:
  
 
Set as Private Wiki
 
Set as Private Wiki
 +
 +
===Troubleshooting===
 +
'''Note:''' With MySQL 8, there is some possibility that it will default to the wrong authentication method.
 +
 +
*If Mediawiki has problems connecting & gives you "'''The server requested authentication method unknown to the client.'''" as part of the error message, sign back into MySQL & adjust the user being assigned in the wiki install:
 +
**<code>sudo mysql -u root -p</code>
 +
**<code>ALTER USER 'someone'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';</code>

Latest revision as of 17:20, 13 January 2022

This is a Deprecated Version!

Install the LAMP Stack

Basic LAMP Stack Install

NOTE: You will need php 7.3.19 or higher to run MediaWiki 1.35

Install MediaWiki

  • wget https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.1.tar.gz
  • wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0.tar.gz
  • tar -xvzf mediawiki-*.tar.gz
  • sudo mkdir /var/www/html/wiki
  • sudo mkdir /var/www/html/labnotes
  • sudo cp -r mediawiki-*/* /var/www/html/wiki
  • sudo cp -r mediawiki-*/* /var/www/html/labnotes
  • sudo mysql -u root -p
CREATE DATABASE my_wiki;
GRANT ALL PRIVILEGES ON my_wiki.* TO 'someone'@'localhost';
FLUSH PRIVILEGES;
CREATE DATABASE my_notes;
GRANT ALL PRIVILEGES ON my_notes.* TO 'someone'@'localhost';
FLUSH PRIVILEGES;
EXIT;
  • sudo vim /etc/php/7.4/apache2/php.ini
    • (this may be in a slightly different location depending on version of php installed...)
    • increase upload_max_filesize to 200M
  • Fix upload directories:
    • sudo chmod -R ugo+rwX /var/www/html/wiki/images
    • sudo chmod -R ugo+rwX /var/www/html/labnotes/images

Browse to http://ServerAddress/wiki & follow the steps presented.

Set it as Authorised editors only.

Browse to http://ServerAddress/labnotes & follow the steps presented.

Set as Private Wiki

Troubleshooting

Note: With MySQL 8, there is some possibility that it will default to the wrong authentication method.

  • If Mediawiki has problems connecting & gives you "The server requested authentication method unknown to the client." as part of the error message, sign back into MySQL & adjust the user being assigned in the wiki install:
    • sudo mysql -u root -p
    • ALTER USER 'someone'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';