You can install a MediaWiki either by downloading and unpacking the .tar.gz archive and setting it up manually or by using the Debian package mediawiki.
This blog posts describes how to install MediaWiki using the Debian package on Ubuntu:
sudo apt-get install mediawiki
Now uncomment the alias for mediawiki in the config file /etc/mediawiki/apache.conf and restart Apache afterwards:
sudo gedit /etc/mediawiki/apache.conf
sudo apache2ctl restart
Now navigate to http://localhost/mediawiki and configure your Wiki. When you finished the web configuration successfully, a configuration file is created and has to be moved to its correct location: