Difference between revisions of "WikiServer - Install EVEN NEWER"

From The TinkerNet Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
*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)
 
*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|Getting MySQL onto SparkyLinux]]
 
**[[Getting MySQL onto SparkyLinux|Getting MySQL onto SparkyLinux]]
 +
*Proven on LMDE 4 ... (You'll have to [https://linuxize.com/post/how-to-install-mysql-on-debian-10/ fix the missing MySQL] thing & install vim first)
  
 
===Install the LAMP Stack===
 
===Install the LAMP Stack===
Line 15: Line 16:
 
===Install MediaWiki===
 
===Install MediaWiki===
  
*<code>wget <nowiki>https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0-rc.0.tar.gz</nowiki></code>
+
*<code>wget <nowiki>https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0-rc.1.tar.gz</nowiki></code>
*<code>tar -xvzf mediawiki-1.35.0-rc.0.tar.gz</code>
+
**(Check the '''[[mediawikiwiki:Download|download page]]''' for latest version)
 +
*<code>tar -xvzf mediawiki-1.35.0-rc.1.tar.gz</code>
 +
**(adjust for version...)
 
*<code>sudo mkdir /var/www/wiki</code>
 
*<code>sudo mkdir /var/www/wiki</code>
 
*<code>sudo mkdir /var/www/labnotes</code>
 
*<code>sudo mkdir /var/www/labnotes</code>
*<code>sudo cp -r mediawiki-1.35.0-rc.0/* /var/www/wiki</code>
+
*<code>sudo cp -r mediawiki-1.35.0-rc.1/* /var/www/wiki</code>
*<code>sudo cp -r mediawiki-1.35.0-rc.0/* /var/www/labnotes</code>
+
*<code>sudo cp -r mediawiki-1.35.0-rc.1/* /var/www/labnotes</code>
 
*<code>sudo mysql -u root -p</code>
 
*<code>sudo mysql -u root -p</code>
  
Line 34: Line 37:
 
**(this may be in a slightly different location depending on version of php installed...)
 
**(this may be in a slightly different location depending on version of php installed...)
 
**increase <code>upload_max_filesize</code> to 200M
 
**increase <code>upload_max_filesize</code> to 200M
 +
**increase <code>post_max_size</code> to 200M
 
*Fix upload directories:
 
*Fix upload directories:
 
**<code>sudo chmod -R ugo+rwX /var/www/wiki/images</code>
 
**<code>sudo chmod -R ugo+rwX /var/www/wiki/images</code>

Latest revision as of 02:30, 30 May 2021

NEW Version!

Now with more VirtualHosts...

And an attempt at running a Development release

Install the LAMP Stack

Basic LAMP Stack Install

Install MediaWiki

  • wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0-rc.1.tar.gz
  • tar -xvzf mediawiki-1.35.0-rc.1.tar.gz
    • (adjust for version...)
  • sudo mkdir /var/www/wiki
  • sudo mkdir /var/www/labnotes
  • sudo cp -r mediawiki-1.35.0-rc.1/* /var/www/wiki
  • sudo cp -r mediawiki-1.35.0-rc.1/* /var/www/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
    • increase post_max_size to 200M
  • Fix upload directories:
    • sudo chmod -R ugo+rwX /var/www/wiki/images
    • sudo chmod -R ugo+rwX /var/www/labnotes/images

Configure your webserver with VirtualHosts for the Wiki & LabNotes

  • Wiki
    • ServerName WikiServer.Domain.TLD
    • DocumentRoot "/var/www/wiki"
  • LabNotes
    • ServerName LabNotesServer.Domain.TLD
    • DocumentRoot "/var/www/labnotes"

Browse to http://WikiServer.Domain.TLD/ & follow the steps presented.

Set it as Authorised editors only.

Browse to http://LabNotesServer.Domain.TLD/ & follow the steps presented.

Set as Private Wiki

Adding another Wiki to an existing Wiki Server

  • sudo mkdir /var/www/anudderwiki
  • sudo cp -r mediawiki-*/* /var/www/anudderwiki
  • sudo mysql -u root -p
    • CREATE DATABASE anudder_wiki;
    • GRANT ALL PRIVILEGES ON anudder_wiki.* TO 'someone'@'localhost';
    • FLUSH PRIVILEGES;
    • EXIT;
  • sudo chmod -R ugo+rwX /var/www/anudderwiki/images

Configure your webserver with VirtualHosts for the new Wiki

  • ServerName AnudderWikiServer.Domain.TLD
  • DocumentRoot "/var/www/anudderwiki"

Browse to http://AnudderWikiServer.Domain.TLD/ & follow the steps presented.

Set as Authorised editors only or 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';