Installing wiki on a2hosting with latex support on A2Hosting
January 20th, 2008
Installing MediaWiki
Getting MediaWiki up and running is pretty simple. Here is the installation script which will download mediawiki 1-11.0 and do the necessary preconfiguration (see more here on that)
Setting up database for Wiki
Go to CPanel->MySQL Databases and add new database(e.g wikidb - I’m not sure but to be on the safe side I recommend to select name which isn’t the same as one of subdomains on your website). Then Add User(e.g wikiuse) and Add User to database with all privileges.
Configuring
You can try to do the first part automatically by running the script in the intended wiki directory - bash installwiki.sh
If everything went ok, then just point your browser to the config directory. Follow the direction on-screen - you should enter the data you used when creating the database in the Database config section - don’t forget to add your a2hosting username to db name and db username.
Now some postinstallation stuff
rm -rf ./config
It will just delete ./config directory and move localsettings.php to its intended place
Enabling TeX
To enable tex you need to have texvc compiled in your wiki/math subdirectory. Unfortunately, a2hosting doesn’t have ocaml installed so you won’t be able to compile it on-site. But I managed to find the precompiled binary for CentOS 5 for x86_64 platform which is what a2hosting runs. You can grab it here. You’ll need to put it into your wiki/math subdirectory and maybe do chmod 777 ./texvc on it.
Then you’ll have to add the following lines(or change the value if they exist already) to your LocalSettings.php file
$wgTmpDirectory = "/home/your_username/www/your_wiki_directory/images/tmp";
$wgMathDirectory = "/home/your_username/www/your_wiki_directory/images/math";
You’ll also have to actually create the directories in question by ssh’ing to your server and executing
mkdir tmp
chmod 777 tmp
mkdir math
chmod 777 math




