MediaWiki in Depth/Setup
Click to jump back to MediaWiki in Depth
Interlude: The Real Requirements for Installing Mediawiki
Now with that background in place, it should be of no surprise that there are essential skills to be able to successfully install MediaWiki. It is an industrial-strength piece of software that does very little to hold your hands; and it is the opinion of many that if you are installing any software that is open to the entire web (including malicious users and bots), you should without exception know what you are doing.
Naturally, these topics are all outside the scope of this course, but if we have time left over for question-and-answer, we could explore these more.
Do note that for a local install for your own personal use, none of the above need apply!
Prerequisites
- Linux/UNIX experience
- System installation, configuration (Debian, Ubuntu, etc.)
- PHP configuration experience: the more, the less trouble
- PHP is rough. It's riddled with inconsistencies and gotchas that you must be aware of to keep your installation afloat
- If you know how to create a php.ini from scratch, you're in a good spot
- Stay away from PHP > 5.4
- Basic MySQL experience
- For a professional installation, security concerns also come to play--again: the more, the less trouble
- SQLite is also an option
- Apache configuration
- There are lots of tutorials for this, but to get certain features to work (url rewriting, etc), a fundamental understanding is necessary
Setup (Debian Linux)
This setup will be specific to Debian Linux, but the concepts and basic procedures I will go over differ little between distributions. If you sysadmin a different distribution at your workplace, you will know where to make the according changes.
Using aptitude to install what we need
- We need php <= 5.4, mysql database server/client, apache2 webserver and its php module (so it can run php software such as MediaWiki)
- sudo aptitude update
- sudo aptitude install apache2 libapache2-mod-php5 php5-mysql mysql-server mysql-client
Downloading the latest version of MediaWiki
- Note: your company's policy may vary-- it might be wise to create your own deb repository for easier maintenance
- Get MediaWiki
- cp mediawiki-1.23.3.tar.gz /var/www
- tar xzvf mediawiki-1.23.3.tar.gz
- mv mediawiki-1.23.3.tar.gz mw
- Basic sysadmin practice: always read the release notes
- Marking the images/ directory as writable by the apache user (www-data)
Configuring Apache
- This will be very specific to your install
- More Resources
Configuring MySQL
- Creating our database and user for MediaWiki
- mysql -u root -p
- CREATE DATABASE wikidb;
- GRANT ALL ON wikidb.* to 'wikiuser'@'localhost' identified by 'samplePassword';
Installing MediaWiki
- Getting your LocalSettings.php