Tuesday, October 6, 2009

Installing MediaWiki

Required software:
Web Server such as Apache or IIS
PHP version 5.0 or Later, and
Database Server MySQL or PostgreSql
sudo apt-get install httpd
sudo apt-get install mysql-server
sudo apt get install php5
sudo apt-get install php5-mysql
sudo apt-get install php5-cli
If you want to use the GD library (instead of ImageMagick for image resizing)
sudo apt-get install libgd2-xpm
sudo apt-get install libgd2-xpm-dev
sudo apt-get install php5-gd
Configure MySQL
mysqladmin -u root password ""
history -c
Note: Remember this user (root) and password because you will need them when you configure
MediaWiki.
Configure PHP
Edit your php configuration file.
sudo nano /etc/php.ini
Maximum Upload Filesize
Assuming that various files are going to be uploaded to the Wiki as content, the limit on the
maximum size of an upload has to be adjusted. About one­half way down is the File Uploads
section. Change:
upload_max_filesize = 2M
to at least 8M. You may have to adjust this again in the future.
upload_max_filesize = 8M
Memory Limit
Some PHP scripts require a lot of memory to run. To increase the maximum amount of memory a
script can use, page down to about 21%, and change the following entry, if found, from
memory_limit = 8M
to
memory_limit = 12M
Extensions
PHP MySQL support has to be enabled. Page down a bit further (about 48%) and make sure the
following line is uncommented:
extension=mysql.so
If you use the GD graphics library to do image resizing (instead of ImageMagick), also uncomment:
extension=gd.so
Save and exit out of the editor and restart Apache:
sudo /etc/init.d/httpd restart
MediaWiki
Type the following commands (replace 1.13.3 with the version to download)...
cd /var/www/
we need to extract the files...
sudo tar vxfz mediawiki-1.13.3.tar.gz
rename the extracted directory name to wiki
sudo mv mediawiki-1.13.3 wiki
In order to configure the wiki you have to make the config subdirectory writable by the web server.
cd /var/www/wiki
sudo chmod a+w config
Configure MediaWiki
Navigate your browser to http://localhost/wiki and continue with the installation.
Fill out the configuration form and continue.

No comments:

Post a Comment