About this wiki: Difference between revisions
(→Log) |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
More: | More: | ||
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'vsd' ); | $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'vsd', 'ico' ); | ||
$wgGroupPermissions['*']['edit'] = false; | $wgGroupPermissions['*']['edit'] = false; | ||
$wgNamespacesWithSubpages = array_fill(0, 200, true); | $wgNamespacesWithSubpages = array_fill(0, 200, true); | ||
=Todo= | $wgAutoSitemap["freq"] = "daily"; | ||
require_once "$IP/extensions/googleAnalytics/googleAnalytics.php"; | |||
// Replace xxxxxxx-x with YOUR GoogleAnalytics UA number | |||
// $wgGoogleAnalyticsAccount = 'UA-xxxxxxx-x'; | |||
// Add HTML code for any additional web analytics (can be used alone or with $wgGoogleAnalyticsAccount) | |||
$wgGoogleAnalyticsOtherCode = '<script type="text/javascript" src="https://analytics.example.com/tracking.js"></script>'; | |||
$wgFavicon = "/images/8/83/Favico.ico"; | |||
=== Upload config === | |||
image dir security: | |||
<pre> | |||
<Directory /var/www/html/images> | |||
Options -Indexes | |||
</Directory> | |||
</pre> | |||
as per https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads | |||
/etc/apache2/php.ini | |||
from ( thedefault ): | |||
<pre> | |||
post_max_size = 8M | |||
upload_max_filesize = 2M | |||
max_file_uploads = 20 | |||
</pre> | |||
to: | |||
<pre> | |||
post_max_size = 20M | |||
upload_max_filesize = 20M | |||
max_file_uploads = 10 | |||
</pre> | |||
==Todo== | |||
* read up on http://www.mediawiki.org/wiki/Manual:FAQ#How_can_I_create_Interwiki_Links_in_my_Wiki.3F (want to play nice with other wikis, no familiar wheels here. | * read up on http://www.mediawiki.org/wiki/Manual:FAQ#How_can_I_create_Interwiki_Links_in_my_Wiki.3F (want to play nice with other wikis, no familiar wheels here. | ||
* install semantic wiki http://en.wikipedia.org/wiki/Semantic_MediaWiki and do some inline queries. | |||
* Clean up old extentsions. | |||
* Install https://www.mediawiki.org/wiki/Extension:RottenLinks | |||
== Log == | |||
=== June 2018 === | |||
* extention updates | |||
* add words install | |||
* AMP extentions setup | |||
* structured data ( as per G webmster tools recommend) | |||
* | === October 2019 update === | ||
certbot cert expired on amazon2 instance. | |||
I could not for the life of me get the new cerbot client to work on amazon 2 . A bit of googling showed me that I was not alone and that others are having similar problems. | |||
so in a classic IAC style , I _just_ swapped my OS to ubuntu 18 and it worked. | |||
note that there are some thing s that still needs work , for example i just learn that google PageSpeed service is no longer, the software ( apache module ) still exists. | |||
and I need to install it https://www.modpagespeed.com/doc/download | |||
=== April 2020 === | |||
certbot autorenewal | |||
12 23 * * * /usr/bin/certbot renew | |||
=== October 2022 === | |||
Ubuntu 18 -> 22 | |||
media wiki 1.35 -> 1.38 | |||
==== Extension intall ==== | |||
* https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration | |||
* version 3.0.1 (2017-10-29) | |||
* https://extdist.wmflabs.org/dist/extensions/googleAnalytics-REL1_38-253c5cb.tar.gz | |||
steps: | |||
== How to Backup == | == How to Backup == | ||
Line 29: | Line 113: | ||
tar zcf /data/backup/athena/athena.wiki.file.backup.$NOW.tgz wiki && echo wiki file backup done || echo wiki file backup failed | tar zcf /data/backup/athena/athena.wiki.file.backup.$NOW.tgz wiki && echo wiki file backup done || echo wiki file backup failed | ||
mysqldump --host=localhost --user=wikiuser --password= | mysqldump --host=localhost --user=wikiuser --password=XXX wikidb2 > /data/backup/athena/athena.wiki.sql.backup.$NOW.sql && echo wiki db backup done || echo wiki db backup failed | ||
gzip -f /data/backup/athena/athena.wiki.sql.backup.$NOW.sql | gzip -f /data/backup/athena/athena.wiki.sql.backup.$NOW.sql | ||
</pre> | </pre> | ||
crontab -l | crontab -l | ||
12 23 * * * /root/backupwiki.sh | 12 23 * * * /root/backupwiki.sh | ||
== further reading == | |||
* https://www.mediawiki.org/wiki/MediaWiki_architecture_document/How_and_why | |||
* http://highscalability.com/wikimedia-architecture | |||
* [[quadratic.net history]] |
Latest revision as of 19:02, 7 October 2022
Config
Default install plus:
- Anonymou edit disabled.
- ConfirmAccount added.
- Extension:GraphViz added
- http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
More:
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt', 'vsd', 'ico' ); $wgGroupPermissions['*']['edit'] = false; $wgNamespacesWithSubpages = array_fill(0, 200, true);
$wgAutoSitemap["freq"] = "daily";
require_once "$IP/extensions/googleAnalytics/googleAnalytics.php"; // Replace xxxxxxx-x with YOUR GoogleAnalytics UA number // $wgGoogleAnalyticsAccount = 'UA-xxxxxxx-x'; // Add HTML code for any additional web analytics (can be used alone or with $wgGoogleAnalyticsAccount) $wgGoogleAnalyticsOtherCode = '<script type="text/javascript" src="https://analytics.example.com/tracking.js"></script>';
$wgFavicon = "/images/8/83/Favico.ico";
Upload config
image dir security:
<Directory /var/www/html/images> Options -Indexes </Directory>
as per https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
/etc/apache2/php.ini
from ( thedefault ):
post_max_size = 8M upload_max_filesize = 2M max_file_uploads = 20
to:
post_max_size = 20M upload_max_filesize = 20M max_file_uploads = 10
Todo
- read up on http://www.mediawiki.org/wiki/Manual:FAQ#How_can_I_create_Interwiki_Links_in_my_Wiki.3F (want to play nice with other wikis, no familiar wheels here.
- install semantic wiki http://en.wikipedia.org/wiki/Semantic_MediaWiki and do some inline queries.
- Clean up old extentsions.
- Install https://www.mediawiki.org/wiki/Extension:RottenLinks
Log
June 2018
- extention updates
- add words install
- AMP extentions setup
- structured data ( as per G webmster tools recommend)
October 2019 update
certbot cert expired on amazon2 instance.
I could not for the life of me get the new cerbot client to work on amazon 2 . A bit of googling showed me that I was not alone and that others are having similar problems. so in a classic IAC style , I _just_ swapped my OS to ubuntu 18 and it worked.
note that there are some thing s that still needs work , for example i just learn that google PageSpeed service is no longer, the software ( apache module ) still exists.
and I need to install it https://www.modpagespeed.com/doc/download
April 2020
certbot autorenewal
12 23 * * * /usr/bin/certbot renew
October 2022
Ubuntu 18 -> 22
media wiki 1.35 -> 1.38
Extension intall
- https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
- version 3.0.1 (2017-10-29)
- https://extdist.wmflabs.org/dist/extensions/googleAnalytics-REL1_38-253c5cb.tar.gz
steps:
How to Backup
Two parts: files and DB
/root/backupwiki.sh
#!/bin/sh cd /var/www/www.quadratic.net/secure NOW=`date +%a.%d.%b.%Y` tar zcf /data/backup/athena/athena.wiki.file.backup.$NOW.tgz wiki && echo wiki file backup done || echo wiki file backup failed mysqldump --host=localhost --user=wikiuser --password=XXX wikidb2 > /data/backup/athena/athena.wiki.sql.backup.$NOW.sql && echo wiki db backup done || echo wiki db backup failed gzip -f /data/backup/athena/athena.wiki.sql.backup.$NOW.sql
crontab -l
12 23 * * * /root/backupwiki.sh