<?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>Thoughts Electrique &#187; XWiki</title>
	<atom:link href="http://www.sebastian.himberger.de/blog/tag/xwiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sebastian.himberger.de/blog</link>
	<description>Sebastian Himbergers blog about technology and software development</description>
	<lastBuildDate>Thu, 08 Jul 2010 17:05:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up XWiki in Tomcat and MySQL</title>
		<link>http://www.sebastian.himberger.de/blog/2009/09/10/setting-up-xwiki-in-tomcat-and-mysql/</link>
		<comments>http://www.sebastian.himberger.de/blog/2009/09/10/setting-up-xwiki-in-tomcat-and-mysql/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 13:32:34 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XWiki]]></category>

		<guid isPermaLink="false">http://www.sebastian.himberger.de/blog/?p=468</guid>
		<description><![CDATA[I recently set up a new XWiki 2.0 instance (with MySQL) for documentation purposes. Although some of the steps are already described in the XWiki manual I&#8217;ll document it here mainly because I keep forgetting things. Also step-by-step tutorials come in handy when you&#8217;re in a hurry.

Create the webapp directory
Since the configuration files have to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently set up a new <a title="XWiki Enterprise website" href="http://enterprise.xwiki.org" target="_blank">XWiki 2.0</a> instance (with MySQL) for documentation purposes. Although some of the steps are already described in the XWiki manual I&#8217;ll document it here mainly because I keep forgetting things. Also step-by-step tutorials come in handy when you&#8217;re in a hurry.</p>
<p><span id="more-468"></span></p>
<h3><strong>Create the webapp directory</strong></h3>
<p>Since the configuration files have to be modified an exploded WAR has to be used. The webapp directory has to be created and the WAR will be extracted inside of it.</p>
<pre class="terminal">mkdir xwiki &amp;&amp; cd xwiki
unzip ../xwiki.war
rm ../xwiki.war</pre>
<h3><strong>Create and configure a database</strong></h3>
<p>Create a database including a dedicated database user. Open the file <em>WEB-INF/hibernate.cfg.xml</em> and uncomment the MySQL block. Modify the following properties:</p>
<ul>
<li>connection.username</li>
<li>connection.password</li>
<li>connection.url</li>
</ul>
<p><strong>Important:</strong> Don&#8217;t forget to add the <a title="MySQL JDBC Connector" href="http://dev.mysql.com/downloads/connector/j/" target="_blank">MySQL JDBC driver</a> to your classpath (e.g. WEB-INF/lib).</p>
<p><strong>Note: </strong>It is of course also possible to use a container managed DataSource via JNDI.</p>
<h3><strong>Configure Logfile</strong></h3>
<p>Since the security manager restricts file IO to the webapp directory the logging has to be reconfigured. To do so the <em>log4.properties</em> file has to be copied from <em>xwiki-core-2.0-milestone-4.jar</em> to the <em>WEB-INF/classes</em> directory. After this the property <em>log4j.appender.file.File</em> has to be modified to point to a writeable path.</p>
<h3><strong>Add the context file to Tomcat</strong></h3>
<p>Add a file name <em>${context}.xml</em> to the <em>/conf/Catalina/localhost</em>&#8221; directory of <em>$CATALINA_HOME</em> (the Tomcat instance) and put the following content into it:</p>
<pre class="file">&lt;Context path="<strong>${contextPath}</strong>" docBase="<strong>${pathToWebapp}</strong>" &gt;&lt;/Context&gt;</pre>
<p>Eventually put in references to resources like DataSource&#8217;s etc.</p>
<h3><strong>Create the proxy settings in Apache HTTPD</strong></h3>
<p>You can use any proxy settings. I&#8217;m currently using a very simple setup:</p>
<pre class="file">&lt;Proxy ajp://localhost:10709*&gt;
  Allow from all
&lt;/Proxy&gt;

RewriteEngine On
RewriteRule ^/$ /<em>xwiki</em>/ [R=301,L]

ProxyPass        /      ajp://localhost:10709/
ProxyPassReverse /      ajp://localhost:10709/</pre>
<p><strong>Note:</strong> <em>xwiki </em>is the contextPath</p>
<h3><strong>Test the installation</strong></h3>
<p>Surf to http://www.yourdomain.com/. An empty XWiki page should be displayed. The first step should always be to register a user so the administration area is accessible. The default content can be imported by using the page <em>/${contextPath}/bin/import/XWiki/XWikiPreferences</em>.</p>
<p>I&#8217;ll probably blog more about XWiki and how to customize it in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebastian.himberger.de/blog/2009/09/10/setting-up-xwiki-in-tomcat-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
