<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ideas.... &#187; MediaWiki</title>
	<atom:link href="http://rosalynmetz.com/ideas/tag/mediawiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://rosalynmetz.com/ideas</link>
	<description>a blog for me to record thoughts and ideas</description>
	<lastBuildDate>Thu, 14 Apr 2011 17:56:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Resetting a MediaWiki Password</title>
		<link>http://rosalynmetz.com/ideas/2009/02/17/resetting-a-mediawiki-password/</link>
		<comments>http://rosalynmetz.com/ideas/2009/02/17/resetting-a-mediawiki-password/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 19:49:29 +0000</pubDate>
		<dc:creator>Rosalyn Metz</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://rosalynmetz.com/ideas/?p=456</guid>
		<description><![CDATA[If you forgot your MediaWiki password, you&#8217;ll want to reset it.  If you can, go to the login page and have the password sent to you, this is of course the easiest thing to do. Sometimes though, you&#8217;re a stupid &#8230; <a href="http://rosalynmetz.com/ideas/2009/02/17/resetting-a-mediawiki-password/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you forgot your MediaWiki password, you&#8217;ll want to reset it.  If you can, go to the login page and have the password sent to you, this is of course the easiest thing to do.</p>
<p>Sometimes though, you&#8217;re a stupid Sys Admin (read me) and you set up a wiki real quick and think &#8220;I won&#8217;t forget the password!&#8221;.  You then decide <strong>not</strong> to include your email address when creating the wiki account profile.  So if you&#8217;re that Sys Admin (read me) here are the instructions for retrieving that password:</p>
<ol>
<li>log on to mysql</li>
<li>type the following query:<br />
<blockquote><p><code>UPDATE user SET user_password = MD5(CONCAT(user_id, ‘-’, MD5(’newpassword‘))) WHERE user_id = uid</code></p></blockquote>
</li>
<li>go back to the MediaWiki page and log in.</li>
</ol>
<p>And next time don&#8217;t think you can remember a password, you can barely remember your name.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frosalynmetz.com%2Fideas%2F2009%2F02%2F17%2Fresetting-a-mediawiki-password%2F&amp;title=Resetting%20a%20MediaWiki%20Password" id="wpa2a_2">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://rosalynmetz.com/ideas/2009/02/17/resetting-a-mediawiki-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interesting MediaWiki Extensions</title>
		<link>http://rosalynmetz.com/ideas/2009/01/12/interesting-mediawiki-extensions/</link>
		<comments>http://rosalynmetz.com/ideas/2009/01/12/interesting-mediawiki-extensions/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 15:02:46 +0000</pubDate>
		<dc:creator>Rosalyn Metz</dc:creator>
				<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://rosalynmetz.com/ideas/?p=353</guid>
		<description><![CDATA[I&#8217;ve been poking around mediawiki a bit because I just set up a personal one. Some of the users of my personal wiki aren&#8217;t going to be very technologically savvy, so I thought of putting some information to help them &#8230; <a href="http://rosalynmetz.com/ideas/2009/01/12/interesting-mediawiki-extensions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been poking around mediawiki a bit because I just set up a personal one.  Some of the users of my personal wiki aren&#8217;t going to be very technologically savvy, so I thought of putting some information to help them use the wiki.  I created some quick editing tips, how to login, and then I thought, &#8220;how am i going to explain what the heck this thing is?&#8221;  That&#8217;s when I remembered <a href="http://www.commoncraft.com/">CommonCraft</a>&#8216;s video, Wikis in Plain English (see below):</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/-dnL00TdmLY&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-dnL00TdmLY&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>So I thought wouldn&#8217;t it be great to embed the Wiki&#8217;s in Plain English video into a wiki so that people can figure out what it is before beginning to use it.  I found a great extension called <a href="http://www.mediawiki.org/wiki/Extension:VideoFlash">VideoFlash</a> that allows you to embed a number of different video types into a MediaWiki site.  So I included the Wiki&#8217;s in Plain English video on my personal wiki as well.</p>
<p>Then I thought, &#8220;hey i can use this for my mediawiki farm at work&#8221;.  We have a mediawiki farm here at Wheaton that allows multiple wikis to exist on with just one MediaWiki installation.  One of my to do lists is to create a main page for the farm.  I thought what could be on the main page is a form asking people to sign up for a wiki.  I then thought maybe the main page could be a wiki.  Users could see the video, and fill out information via a form.  </p>
<p>So I found a very simple extension that is basically a form handler that will email the information submitted by the user to whatever email you would like, its called:<br />
<a href="http://www.mediawiki.org/wiki/Extension:FormHandler_send_form_by_Email">FormHandler send form by Email</a></p>
<p>I&#8217;m still not sure if I&#8217;m going to go this route, but it is a possibility and maybe something that others might find interesting as well.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frosalynmetz.com%2Fideas%2F2009%2F01%2F12%2Finteresting-mediawiki-extensions%2F&amp;title=Interesting%20MediaWiki%20Extensions" id="wpa2a_4">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://rosalynmetz.com/ideas/2009/01/12/interesting-mediawiki-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force Users to Login to MediaWiki</title>
		<link>http://rosalynmetz.com/ideas/2009/01/06/force-users-to-login-to-mediawiki/</link>
		<comments>http://rosalynmetz.com/ideas/2009/01/06/force-users-to-login-to-mediawiki/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 21:37:13 +0000</pubDate>
		<dc:creator>Rosalyn Metz</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://rosalynmetz.com/ideas/?p=307</guid>
		<description><![CDATA[So in addition to installing the LDAP plugin for MediaWiki, I&#8217;ve also found a great page that discusses forcing users to login to MediaWiki. http://www.mediawiki.org/wiki/Manual:$wgGroupPermissions Basically copy and paste the code on that page into your LocalSettings.php file. I chose &#8230; <a href="http://rosalynmetz.com/ideas/2009/01/06/force-users-to-login-to-mediawiki/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So in addition to <a href="http://rosalynmetz.com/ideas/2009/01/06/logging-into-mediawiki-using-ldap/">installing the LDAP plugin for MediaWiki</a>, I&#8217;ve also found a great page that discusses forcing users to login to MediaWiki.<br />
<a href="http://www.mediawiki.org/wiki/Manual:$wgGroupPermissions">http://www.mediawiki.org/wiki/Manual:$wgGroupPermissions</a></p>
<p>Basically copy and paste the code on that page into your LocalSettings.php file.  I chose to stick with permissions for random users (*) and logged in users (users).  You may actually have groups and what not that you want to do more with.  This was simple enough to do&#8230;but it was RIDICULOUSLY hard to find this page, mostly because I kept searching for password protecting your MediaWiki.  So I&#8217;m archiving it here for my own future reference.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frosalynmetz.com%2Fideas%2F2009%2F01%2F06%2Fforce-users-to-login-to-mediawiki%2F&amp;title=Force%20Users%20to%20Login%20to%20MediaWiki" id="wpa2a_6">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://rosalynmetz.com/ideas/2009/01/06/force-users-to-login-to-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logging into MediaWiki using LDAP</title>
		<link>http://rosalynmetz.com/ideas/2009/01/06/logging-into-mediawiki-using-ldap/</link>
		<comments>http://rosalynmetz.com/ideas/2009/01/06/logging-into-mediawiki-using-ldap/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 19:48:14 +0000</pubDate>
		<dc:creator>Rosalyn Metz</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://rosalynmetz.com/ideas/?p=302</guid>
		<description><![CDATA[First I&#8217;d like to say that I know nothing about LDAP. I think its a magical thing that has all our usernames and passwords and just connects to software so I don&#8217;t have to maintain user information. This makes LDAP &#8230; <a href="http://rosalynmetz.com/ideas/2009/01/06/logging-into-mediawiki-using-ldap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First I&#8217;d like to say that I know nothing about LDAP.  I think its a magical thing that has all our usernames and passwords and just connects to software so I don&#8217;t have to maintain user information.  This makes LDAP wonderful.</p>
<p>That being said its actually important that you know a little something about LDAP when setting up LDAP and MediaWiki.  While this page is helpful:<br />
<a href="http://www.mediawiki.org/wiki/Extension:LDAP_Authentication#Explanation_of_options">http://www.mediawiki.org/wiki/Extension:LDAP_Authentication#Explanation_of_options</a></p>
<p>You really need to know what&#8217;s going on with your LDAP.  I&#8217;d post what I discovered here, but then you&#8217;d know how to get into my LDAP server and that would be bad.  Needless to say, the best thing to do is copy the options on the page above and then talk to the owner of the LDAP server.  They can point you in the right direction.</p>
<p>I&#8217;d also like to end this post with a shout out to Brian Gibson for helping me out and teaching me a little something about LDAP.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frosalynmetz.com%2Fideas%2F2009%2F01%2F06%2Flogging-into-mediawiki-using-ldap%2F&amp;title=Logging%20into%20MediaWiki%20using%20LDAP" id="wpa2a_8">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://rosalynmetz.com/ideas/2009/01/06/logging-into-mediawiki-using-ldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving a MediaWiki</title>
		<link>http://rosalynmetz.com/ideas/2008/11/18/moving-a-mediawiki/</link>
		<comments>http://rosalynmetz.com/ideas/2008/11/18/moving-a-mediawiki/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 16:23:34 +0000</pubDate>
		<dc:creator>Rosalyn Metz</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://rosalynmetz.com/ideas/?p=198</guid>
		<description><![CDATA[I&#8217;m currently in the process of setting up a MediaWiki farm.  As I stated in my previous post on creating a MediaWiki farm, I have a number of already existing MediaWikis that I need to move into my MediaWiki farm. &#8230; <a href="http://rosalynmetz.com/ideas/2008/11/18/moving-a-mediawiki/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently in the process of setting up a MediaWiki farm.  As I stated in <a href="http://rosalynmetz.com/ideas/2008/11/14/making-a-mediawiki-farm/">my previous post on creating a MediaWiki farm</a>, I have a number of already existing MediaWikis that I need to move into my MediaWiki farm. This post outlines the steps I followed in order to move those existing MediaWikis, into my new farm.</p>
<p><strong>First a Bit of Research</strong></p>
<p>A number of people have posted that its just simply moving the LocalSettings.php file and image directory into the new directory, changing some words in the LocalSettings.php file and voila&#8230;it all works.  But this wasn&#8217;t the case for me.  I&#8217;m not sure if its because of the symlinks or what, but I was running into problems when I did this.</p>
<p>So I did a comparison between a moved wiki and a wiki created within the farm.  Interestingly enough the ones created in the farm were indicating that their $wgScriptPath was <code>/wikis/[wiki-name]</code>.  Now when I set up my MediaWiki, I didn&#8217;t put it at the web root, instead I put it in a containing directory called wikis (clever huh).  One reason I did this was because I had other things on the server beside MediaWiki (WordPressMU for one) and I didn&#8217;t want there to be any conflicts.</p>
<p>Another reason I did this was so that I could set up a DNS to point to the wikis directory.  So if you go to http://wikis.wheatoncollege.edu/domingo you&#8217;ll see a wiki that&#8217;s part of the farm but its not sitting at the root of a server called wikis.wheatoncollege.edu, its sitting at fred.wheatoncollege.edu/wikis.  So&#8230;</p>
<ul>
<li>wikis.wheatoncollege.edu = fred.wheatoncollege.edu/wikis</li>
<li>wikis.wheatoncollege.edu/domingo = fred.wheatoncollege.edu/wikis/domingo</li>
</ul>
<p>I digress&#8230;</p>
<p>So I couldn&#8217;t figure out why this change was happening (I&#8217;m sure it has something to do with symbolic links) and I honestly didn&#8217;t have time to try to figure it out, and besides the web interface install script nicely creates a LocalSettings.php file for you anyway, and no one did a lot (if any) customization for the wikis at my institution.  So why not just use the web based script?</p>
<p><strong>Backing Up a MediaWiki Database</strong></p>
<p>So at this point all I&#8217;m doing is really moving over the database.  I could (if I wanted to) not even move the database, I could just connect the current MediaWikis&#8217; databases to the new interface.  You can do this by entering in all the information that you used before into the web based install script.  But I don&#8217;t like the names my databases were given :) (ok that&#8217;s not the real reason&#8230;the real reason is so that i can keep the old ones running for a day without it affecting the new one)</p>
<p>So I did a MySQL backup:</p>
<blockquote><p><code>mysqldump -u [mysqlrootuser] -p[mysqlrootpassword] --add-drop-table -B &gt; [mysqldumpfile].sql</code></p></blockquote>
<p>Note that I&#8217;m using the <code>--add-drop-table</code> mysql option.  What does this do?  Well when I restore the database, it will look in the existing database and see if the tables already exist.  If they do, it&#8217;ll drop them and then re-add them.  If they don&#8217;t, it&#8217;ll just add them.  This means that essentially its wiping EVERYTHING in your database and replacing it with everything in your backup.  So if there is a table not in your backup that you want to keep&#8230;re-run your backup.  Or restore the tables one at a time (this is an option with MySQL).</p>
<p>Now I stated that I wanted to change my database&#8217;s names.  If I simply restored the database using:</p>
<blockquote><p><code>mysql -u [mysqlrootuser] -p[mysqlrootpassword] &lt; [mysqldumpfile].sql</code></p></blockquote>
<p>It would restore with the same name as before.  Now I thought if I ran this command:</p>
<blockquote><p><code>mysql -u [mysqlrootuser] -p[mysqlrootpassword] [newdbname] &lt; [mysqldumpfile].sql</code></p></blockquote>
<p>It would restore with a different database name, I was wrong.  I&#8217;m sure there is a way to do it from the commandline, but I&#8217;m in a hurry.  So I opened up the .sql file with TextWrangler (a Mac text editor) and found the database name (it occurs four times in the top part of the file) and changed it (much thanks to <a href="http://www.coloradocollege.edu/library/index.php/about/carol-ou">Carol Ou</a> for confirming I could do this).  If you do choose to go this route, make sure you have a backup of the .sql file before you edit it.</p>
<p>A couple of quick notes about doing a backup this way:</p>
<ol>
<li>before you restore the database, you&#8217;ll need to create the new database (with your new database name).  you can do that with a quick <code>create database [newname];</code> query.</li>
<li>once you restore the database, there will be no MySQL users associated with the database, but there will be MediaWiki users associated with the database.  A MediaWiki user <em><strong>does not</strong></em> equal a MySQL user.  One is so that you can go into the GUI and edit the wiki and the other is so that MediaWiki can write information to the database.  When you run the MediaWiki web install script, it will allow you to create MySQL users for the database.</li>
<li>after you restore the database do a quick <code>show tables;</code> query in MySQL to make sure the data was really restored.  doublechecking is always important.</li>
</ol>
<p><strong>Backing up the Images</strong></p>
<p>The last piece that you&#8217;ll want to remember to do is create a backup of the images.  This is simple enough to do, just tar and zip it all up:</p>
<blockquote><p><code>tar -cvzpf [backupname].tgz [wikidirectory]/images</code></p></blockquote>
<p>At this point you&#8217;ll have all of the images in a tarball ready to move into your new wiki&#8217;s image directory.</p>
<p><strong>Now On To Moving a MediaWiki into Your Farm<br />
</strong></p>
<p>Now that I have a backup of the database and a tarball of the images, I&#8217;m ready to move the MediaWiki over.  One thing to note, all my MediaWikis are the same version (yay).  If you have different MediaWiki versions, you&#8217;ll probably want to update them before doing the following steps.</p>
<ol>
<li>Create the directory the MediaWiki will live in under that wikis directory you set up (see above).</li>
<li>Restore the MySQL database as its new name.  You can do this by:<br />
<blockquote><p><code>mysql -u [mysqlrootuser] -p[mysqlrootpassword] [newdbname] &lt; [mysqldumpfile].sql</code></p></blockquote>
<p>Another thing to check is whether or not table prefixes were used when the MediaWiki was originally installed.  In my case, one of the MediaWikis did have prefixes; I checked this by running a simple <code>show tables;</code> query in MySQL.</li>
<li>Create the symbolic links for the MediaWiki.  You can use <a href="http://rosalynmetz.com/ideas/2008/11/14/making-a-mediawiki-farm/">my other post on creating a MediaWiki farm</a> if you&#8217;re not sure how to do this.  I&#8217;ve also created <a href="http://rosalynmetz.com/ideas/wp-content/linkedfiles/createwiki.txt">a script</a> that walks the liaisons here at Wheaton through creating the wiki.  Its works&#8230;but I could improve it and hopefully I&#8217;ll update the file when I do.</li>
<li>Move the untar the images directory that you tarred up before.  You&#8217;ll want to untar it in the MediaWiki&#8217;s directory.  Doing this will move all the images over to the new wiki.</li>
<li>Once you create the symbolic links, you&#8217;ll want to go to the web install script and run it.  This includes:
<ul>
<li>database name [the new one]</li>
<li>database username [you can create a new database user]</li>
<li>database password [again you can create a new one]</li>
<li>database prefix [only if you entered one for the previous incarnation of the wiki]</li>
<li>wiki admin and password [best to use the previous one...if you have it]</li>
</ul>
</li>
<li>Finish up the install by moving the LocalSettings.php file into the MediaWiki&#8217;s main directory, changing permission on the file, and deleting the config directory.</li>
<li>If the LocalSettings.php file was altered for any of the MediaWikis (in my case one was).  Go in and remake those changes.</li>
</ol>
<p>And voila! MediaWiki moved.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frosalynmetz.com%2Fideas%2F2008%2F11%2F18%2Fmoving-a-mediawiki%2F&amp;title=Moving%20a%20MediaWiki" id="wpa2a_10">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://rosalynmetz.com/ideas/2008/11/18/moving-a-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a MediaWiki Farm</title>
		<link>http://rosalynmetz.com/ideas/2008/11/14/making-a-mediawiki-farm/</link>
		<comments>http://rosalynmetz.com/ideas/2008/11/14/making-a-mediawiki-farm/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 20:56:07 +0000</pubDate>
		<dc:creator>Rosalyn Metz</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://rosalynmetz.com/ideas/?p=164</guid>
		<description><![CDATA[Introduction I was tasked by my boss to create a MediaWiki Farm.  I thought this would give me the opportunity to learn more about MediaWiki, but believe it or not it also helped me learn more about Mac&#8217;s &#8220;Unix&#8221; flavor. &#8230; <a href="http://rosalynmetz.com/ideas/2008/11/14/making-a-mediawiki-farm/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>I was tasked by my boss to create a MediaWiki Farm.  I thought this would give me the opportunity to learn more about MediaWiki, but believe it or not it also helped me learn more about Mac&#8217;s &#8220;Unix&#8221; flavor.</p>
<p>The purpose of the MediaWiki Farm is so that professors can request wikis for academic/research work from our Research and Instruction Department.  The reason we chose to create a farm was so that we could minimize the amount of work necessary to maintain 5 plus MediaWikis (I don&#8217;t want to have to update each and every one&#8217;s filesystem each time a new version comes out).</p>
<p><strong>Creating the MediaWiki Farm with Symbolic Links</strong></p>
<p>While poking around on my good friend Google I found a lovely page that described <a href="http://www.shawndouglas.com/wikifarm/">How to Create a MediaWiki Farm using Symbolic Links on Mac OS X</a>.  It was nice because it gave me directions.  But as a former Unix person I assumed some of the directions could be improved upon (silly me).  So I set about creating my MediaWiki Farm.</p>
<p>Below are the directions that I followed and what I learned from the process:</p>
<ol>
<li><em>Download MediaWiki and unpack it.</em><br />
I decided to put everything in a directory named wikis since I have multiple products running on this server.  I then asked that the wikis folder be mapped to a new DNS (wikis.wheatoncollege.edu).</li>
<li><em>Create symbolic links from the unpacked MediaWiki to a template directory.</em><br />
<blockquote><p><code>ln -s mediawiki-[version] template</code></p></blockquote>
<p>At first I wasn&#8217;t sure why I was doing this that way.  Why not just link everything to the unpacked file system?  After thinking about this I realized that it would be easier to update symbolic links once, not 5, 10, 15 times.  But I have to say I&#8217;m still on the fence about this, because of the next step.</li>
<li><em>Create a blank wiki from your template.</em><br />
First I created the direcotory the new wiki will reside in.</p>
<blockquote><p><code>cd /Library/WebServer/Documents/wikis<br />
mkdir [newdirectory]<br />
cd /Library/WebServer/Documents/wikis/[newdirectory]<br />
</code></p></blockquote>
<p>Another thing to consider is creating the AdminSettings.php file.  To do this I renamed the sample file and created a symbolic link for it:</p>
<blockquote><p><code>cd /Library/WebServer/Documents/wikis/template<br />
mv AdminSettings.sample AdminSettings.php<br />
sudo chmod 744 AdminSettings.php</code></p></blockquote>
<p>You&#8217;ll also want to edit the AdminSettings.php file and include super user access.  This will help you in updating the wiki later on down the road.</p>
<p>The next thing I did was create a list of all the files in the template directory.  This is why I&#8217;m still on the fence about not just linking directly; will I have to create a new list every time I update MediaWiki?  I&#8217;m sure there is a way to automate this, but I don&#8217;t have time to work on this now, I&#8217;ll do that later.</p>
<p>Another thing is that Mac works strangely with symbolic links.  If I were to do an <code>ln -s mediawiki-[version] [newdirectory]</code> it would link to everything in that directory.  And let&#8217;s say I go into [newdirectory] and remove one of the files in the directory using <code>rm wiki.phtml</code> for example.  The <code>rm wiki.phtml</code> will <strong>not only</strong> delete the file in [newdirectory], but also the one in the template directory <strong>and</strong> the one in the mediawiki-[version] directory.  I discovered this when I went in and symlinked the template to [newdirectory] using <code>ln -s template [newdirectory]</code>.  I ended up having to start over.</p>
<p>So I created a symlink for each of the files and the subdirectories:</p>
<blockquote><p><code>ln -s /Library/WebServer/Documents/wikis/template/api.php<br />
ln -s /Library/WebServer/Documents/wikis/template/AdminSettings.php<br />
ln -s /Library/WebServer/Documents/wikis/template/api.php5<br />
ln -s /Library/WebServer/Documents/wikis/template/COPYING<br />
ln -s /Library/WebServer/Documents/wikis/template/docs<br />
ln -s /Library/WebServer/Documents/wikis/template/extensions<br />
ln -s /Library/WebServer/Documents/wikis/template/FAQ<br />
ln -s /Library/WebServer/Documents/wikis/template/HISTORY<br />
ln -s /Library/WebServer/Documents/wikis/template/img_auth.php<br />
ln -s /Library/WebServer/Documents/wikis/template/img_auth.php5<br />
ln -s /Library/WebServer/Documents/wikis/template/includes<br />
ln -s /Library/WebServer/Documents/wikis/template/index.php<br />
ln -s /Library/WebServer/Documents/wikis/template/index.php5<br />
ln -s /Library/WebServer/Documents/wikis/template/INSTALL<br />
ln -s /Library/WebServer/Documents/wikis/template/install-utils.inc<br />
ln -s /Library/WebServer/Documents/wikis/template/languages<br />
ln -s /Library/WebServer/Documents/wikis/template/locale<br />
ln -s /Library/WebServer/Documents/wikis/template/maintenance<br />
ln -s /Library/WebServer/Documents/wikis/template/Makefile<br />
ln -s /Library/WebServer/Documents/wikis/template/math<br />
ln -s /Library/WebServer/Documents/wikis/template/opensearch_desc.php<br />
ln -s /Library/WebServer/Documents/wikis/template/opensearch_desc.php5<br />
ln -s /Library/WebServer/Documents/wikis/template/profileinfo.php<br />
ln -s /Library/WebServer/Documents/wikis/template/README<br />
ln -s /Library/WebServer/Documents/wikis/template/redirect.php<br />
ln -s /Library/WebServer/Documents/wikis/template/redirect.php5<br />
ln -s /Library/WebServer/Documents/wikis/template/redirect.phtml<br />
ln -s /Library/WebServer/Documents/wikis/template/RELEASE-NOTES<br />
ln -s /Library/WebServer/Documents/wikis/template/serialized<br />
ln -s /Library/WebServer/Documents/wikis/template/skins<br />
ln -s /Library/WebServer/Documents/wikis/template/StartProfiler.php<br />
ln -s /Library/WebServer/Documents/wikis/template/t<br />
ln -s /Library/WebServer/Documents/wikis/template/Test.php<br />
ln -s /Library/WebServer/Documents/wikis/template/tests<br />
ln -s /Library/WebServer/Documents/wikis/template/thumb.php<br />
ln -s /Library/WebServer/Documents/wikis/template/thumb.php5<br />
ln -s /Library/WebServer/Documents/wikis/template/trackback.php<br />
ln -s /Library/WebServer/Documents/wikis/template/UPGRADE<br />
ln -s /Library/WebServer/Documents/wikis/template/wiki.phtml</code></p></blockquote>
<p>Essentially the reason I&#8217;m creating a list is because certain files in the first layer of the directory should not be symlinked (ie. LocalSettings.php and the images directory).  So I need to create/copy those files into [newdirectory]:</p>
<blockquote><p><code>mkdir images<br />
sudo chown www:wheel images<br />
cp -R /Library/WebServer/Documents/wikis/template/config .<br />
sudo chmod a+w config</code></p></blockquote>
<p>Ok now we have the file system for a new wiki set up.  Next we need to create the database piece.</li>
<li><em>Create the Database for the MediaWiki</em><br />
So in the document on <a href="http://www.shawndouglas.com/wikifarm/#Creating_the_Nth_Wiki">How to Create a MediaWiki Farm on Using Mac OS X</a>, the author creates the database from a shell script.  While it seems to make sense, I personally need to know more about how it works before I&#8217;ll do this.  And I just don&#8217;t have the time to do that right now.</p>
<p>So what I&#8217;ll do for now is go to the wiki&#8217;s start page and follow the instructions there.  Simple enough.</li>
<li><em>Move the LocalSettings.php file and delete the config directory</em><br />
The last step is to move the LocalSettings.php file and delete the config directory.  Make sure that when you move the LocalSettings.php file that you&#8217;re moving it to the full path name, otherwise if you do a <code>mv LocalSettings.php ../</code> it&#8217;ll end up in the template directory (this is because of the weirdness with Macs and symlinks).</p>
<blockquote><p><code>cd config/<br />
mv LocalSettings.php /Library/WebServer/Documents/wikis/[newdirectory]/<br />
cd ..<br />
rm -rf config</code></p></blockquote>
<p>After you move the the LocalSettings.php file you will need to change permissions on it so that people can&#8217;t write or execute the file unless they are the admin user.</p>
<blockquote><p><code>sudo chmod 744 LocalSettings.php</code></p></blockquote>
</li>
<li>Now your MediaWiki is ready to go!</li>
</ol>
<p><strong>Next Steps for the MediaWiki Farm</strong></p>
<p>My next posts will be on moving a MediaWiki to the farm and updating a farmed MediaWiki with separate databases for each instance of MediaWiki.  These topics of are concerned from me since we are currently in an environment where we have multiple outdated MediaWikis being housed in completely seperate installations.  I need to end that, and quickly since its a lot of work to maintain multiple MediaWikis.</p>
<p>Also its important to point out that the reason I chose to use separate databases for each instance of MediaWiki is because of our current environment.  It is possible to use one database for <strong>all</strong> of your MediaWikis, you just append tables with a prefix when you do the install.  The reason I&#8217;ve chosen not to do this is because importing a database as a database and not as tables is significantly easier than renaming all those tables.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frosalynmetz.com%2Fideas%2F2008%2F11%2F14%2Fmaking-a-mediawiki-farm%2F&amp;title=Making%20a%20MediaWiki%20Farm" id="wpa2a_12">Share/Save</a></p>]]></content:encoded>
			<wfw:commentRss>http://rosalynmetz.com/ideas/2008/11/14/making-a-mediawiki-farm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

