Installing MediaWiki on Pollen v2.0
May 13, 05:29 AM
This article continues Installing Ubuntu Server on Pollen v2.0.
Random Config Settings In Preparation For Wiki Install
See here: http://www-acs.ucsd.edu/info/vi_tutorial.shtml
sudo vi /etc/php5/apache2/php.ini
About one-half way down is the File Uploads section. Change:
upload_max_filesize = 2M
to
upload_max_filesize = 8M
You may have to adjust this again in the future.
Check that memory_limit is more than 12MB. It was 16MB by default (and it looks like the MediaWiki install bumps it to 20MB anyway…)
Save and exit vi
MediaWiki Install
Create a folder /var/www/wiki (via Samba is easiest).
Copy the un-tared MediaWiki to “wiki”.
sudo chmod a+w /var/www/wiki/config
http://pollen.botany.otago.ac.nz/wiki
Admin Username: [NOT POSTED]
Pass: [NOT POSTED]
DB Username: wikiuser
DB Pass: [NOT POSTED]
MediaWiki Install Complete
Moved LocalSettings.php to /var/www/wiki (via Samba is easiest)
Making Wiki Private
sudo chmod 777 /var/www/wiki/LocalSettings.php
Edit /var/www/wiki/LocalSettings.php (via Samba is easist)
Add this to the end:
# This snippet prevents new registrations from anonymous users
# (Sysops can still create user accounts)
$wgGroupPermissions['*']['createaccount'] = false;
#Disable reading line, for anonymous (not-logged-in => * ) :
$wgGroupPermissions['*']['read'] = false;
# ... and enable anonymous to read the followings pages :
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-",
"MediaWiki:Monobook.css" );
sudo chmod 664 /var/www/wiki/LocalSettings.php
Making Wiki Private Complete
Enabling Uploads
Open LocalSettings.php for editing (via Samba is easist)
$wgEnableUploads true.
$wgFileExtensions = array(‘pdf’,‘png’,‘jpg’,‘jpeg’,‘doc’,‘xls’,‘ppt’);
The images directory must be writeable:
sudo chmod a+w /var/www/wiki/images
The |thumb option added to an image: tag will automatically generate a thumbnail version of a picture – if support has been enabled, as follows
For thumbnails the ImageMagick package must be installed:
sudo apt-get install imagemagick
In LocalSettings.php:
$wgUseImageResize = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = “/usr/bin/convert”;
Save LocalSettings.php
Tested Uploads: Works Fine
Enabling Uploads Complete
