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




OK, wait a minute. You lost me on the A2 hosting username thing. Where does that go? When I’m configuring MediaWiki it has two separate sections for this, the “database username and password” AND the “superuser username and password.” Which one requires the A2 info?
I’m having problems with this because LocalSettings.php is supposed to have permissions set at 600 but if I don’t set it at 644 then I get error messages, yet it’s more hackable if I leave it at 644, am I right?
Any help you can give would be appreciated, thanks!
Comment by Dana — April 13, 2008 @ 6:27 pm
It’s about database name and username, not the superuser ones… So if you created database wikidb, then the name in wiki configuration will be a2hostingusername_wikidb.
I’m not sure about the permissions for LocalSettings.php, unfortunately
Comment by zedr0n — April 13, 2008 @ 6:34 pm
Oh, OK, then I was doing that right. Fume. The config instructions at the MediaWiki site say to set permissions for LocalSettings.php at 600, but when I do that the wiki doesn’t come up properly. On the other hand if I set it at 644, everything seems to work fine. So I’ve been Googling trying to figure out wtf I’m doing wrong. Ah well…
Comment by Dana — April 14, 2008 @ 4:53 pm
Thanks for the recap. Were you able to get file uploads to work? I’ve enabled the setting in LocalSettings.php but still can’t seem to upload files. Since A2 does not allow php.ini mods how would you recommend enabling file uploads?
Thanks!
Comment by James Woods — April 16, 2008 @ 10:13 pm
Nope, unfortunately, I didn’t find much use for my wiki since, so I didn’t try uploading files
Comment by zedr0n — April 20, 2008 @ 3:11 pm
opvlftqf…
opvlftqf…
Trackback by opvlftqf — June 29, 2008 @ 6:46 am
tramadol sale…
ingredients in tramadol…
Trackback by tramadol — August 8, 2008 @ 6:04 pm