Quercus: Mediawiki

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(resin-web.xml)
Line 7: Line 7:
 
# start Resin and browse to http://localhost:8080/wiki
 
# start Resin and browse to http://localhost:8080/wiki
  
== resin-web.xml ==
+
=Download Resin 3.1.1+=
 +
The newest Resin versions have several bug fixes for Mediawiki.
  
The resin-web.xml needs to add the QuercusServlet and map it to *.php.  Optionally, it configures a <[[database]]> as PHP's database.  Quercus can automatically create database pools if you omit the <[[database]]> configuration, but it's better to configure it explicitly.
+
=Download Mediawiki=
 +
Download [http://www.mediawiki.org/wiki/Download : Mediawiki] into $resin_home/webapps/ROOT/mediawiki.
  
==== resin-web.xml ====
+
=Download MySQL JDBC Driver=
 +
Download [http://www.mysql.com/products/connector/j/ : MySQL Connector/J JDBC Driver] into $resin_home/lib.
  
  <web-app xmlns="http://caucho.com/ns/resin">
+
=Add resin-web.xml=
    <database jndi-name='jdbc/wiki'>
+
Add the following resin-web.xml file to $resin_home/webapps/ROOT/mediawiki/WEB-INF. Customize email settings to allow the sending of emails from PHP.  Anything not in bold is optional.
      <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
+
 
        <url>jdbc:mysql://localhost:3306/test_wiki2</url>
+
The resin-web.xml needs to add the QuercusServlet and map it to *.php.  Optionally, it configures a <[[database]]> as PHP's database.  Quercus can automatically create database pools if you omit the <[[database]]> configuration, but it's better to configure it explicitly.
        <user></user>
+
 
        <password></password>
+
<b><web-app xmlns="http://caucho.com/ns/resin"></b>
      </driver>
+
  <database jndi-name='jdbc/mediawiki'>
    </database>
+
    <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
 +
      <url>jdbc:mysql://localhost:3306/mediawiki</url>
 +
      <user></user>
 +
      <password></password>
 +
    </driver>
 +
  </database>
 
   
 
   
   <servlet-mapping url-pattern="*.php"
+
   <b><servlet-mapping url-pattern="*.php"
 
                     servlet-class="com.caucho.quercus.servlet.QuercusServlet">
 
                     servlet-class="com.caucho.quercus.servlet.QuercusServlet">
      <init compile="true" database="jdbc/wiki"/>
+
    <init></b>
   </servlet-mapping>
+
      <database>jdbc/mediawiki</database>
 +
      <compile>true></compile>
 +
      <b><php-ini>
 +
        <sendmail_from>foo@bar.com</sendmail_form>
 +
        <script-encoding>ISO-8859-1</script-encoding>
 +
      </php-ini>
 +
    </init>
 +
   </servlet-mapping></b>
 
   
 
   
   <welcome-file-list>index.php</welcome-file-list>
+
   <b><welcome-file-list>index.php</welcome-file-list>
  </web-app>
+
  </web-app></b>
 +
 
 +
=Finish=
 +
Run Mediawiki's installation.  That's it!

Revision as of 06:59, 6 February 2007


Steps:

  1. unpack mediawiki in webapps/wiki
  2. add resin-web.xml
  3. start Resin and browse to http://localhost:8080/wiki

Contents

Download Resin 3.1.1+

The newest Resin versions have several bug fixes for Mediawiki.

Download Mediawiki

Download : Mediawiki into $resin_home/webapps/ROOT/mediawiki.

Download MySQL JDBC Driver

Download : MySQL Connector/J JDBC Driver into $resin_home/lib.

Add resin-web.xml

Add the following resin-web.xml file to $resin_home/webapps/ROOT/mediawiki/WEB-INF. Customize email settings to allow the sending of emails from PHP. Anything not in bold is optional.

The resin-web.xml needs to add the QuercusServlet and map it to *.php. Optionally, it configures a <database> as PHP's database. Quercus can automatically create database pools if you omit the <database> configuration, but it's better to configure it explicitly.

<web-app xmlns="http://caucho.com/ns/resin">
  <database jndi-name='jdbc/mediawiki'>
    <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
      <url>jdbc:mysql://localhost:3306/mediawiki</url>
      <user></user>
      <password></password>
    </driver>
  </database>

  <servlet-mapping url-pattern="*.php"
                   servlet-class="com.caucho.quercus.servlet.QuercusServlet">
    <init>
      <database>jdbc/mediawiki</database>
      <compile>true></compile>
      <php-ini>
        <sendmail_from>foo@bar.com</sendmail_form>
        <script-encoding>ISO-8859-1</script-encoding>
      </php-ini>
    </init>
  </servlet-mapping>

  <welcome-file-list>index.php</welcome-file-list>
</web-app>

Finish

Run Mediawiki's installation. That's it!

Personal tools