Quercus: Drupal

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(resin-web.xml configuration file)
(Reformat and update)
Line 1: Line 1:
[[Category:Quercus]]
+
[[Category: Quercus]]
  
[http://drupal.org Drupal], a forum/blog content management system, now works on Quercus (requires the latest snapshot or 3.0.18).  The [http://forum.caucho.com Caucho Forum] is now running using Drupal.
+
=Running Drupal 6.2 on Resin 3.1.6=
  
== installation ==
+
==Requirements==
 +
# MySQL server
 +
# Java 1.5 or higher
  
Drupal requires [[JavaMail]] to send user confirmation and passwordsYou will need to download JavaMail from the Sun site and install it in resin/lib for Drupal to work. This example also uses MySQL as Drupal's database. In order to connect to MySQL through Java, you will need to download MySQL Connector/J and install the jar file in resin/lib.
+
==Quick start==
 
+
Follow these instructions if you would simply like to evaluate running Drupal without doing a system-wide installationFollow the instructions below to perform a system-wide installation.
To install Drupal, just expand the Drupal .tar file into [[webapps]]/drupal (or [[webapps]]/ROOT). From there, follow the Drupal documentation.   Essentially, you'll just need to:
+
# Download Drupal 6.2 from http://drupal.org/drupal-6.2
 
+
# Download Resin 3.1.6 from http://www.caucho.com/download
* modify drupal/sites/default/settings.php (to set the expected URL)
+
# Unzip Resin 3.1.6
* create the database with 'mysql drupal < drupal/database/database.mysql'
+
# Unzip Drupal and copy all files and directories to resin-3.1.6/webapps/ROOT
* Add a drupal/WEB-INF/resin-web.xml to configure Quercus and modify the URLs
+
# Create the Drupal database: <pre>mysql -u root</pre><pre>mysql> CREATE DATABASE drupal;</pre>
 
+
# Create the directory resin-3.1.6/webapps/ROOT/WEB-INF/lib
== resin-web.xml configuration file ==
+
# Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
 
+
# Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in resin-3.1.6/webapps/ROOT/WEB-INF/lib
The [[resin-web.xml]] file is placed in [[webapps]]/drupal/WEB-INF/resin-web.xml.
+
# Create the following resin-3.1.6/webapps/ROOT/WEB-INF/resin-web.xml:
 
+
Configuring the <[[database]]> is optional, but allows you complete control over the database connections Drupal uses. If you do not configure the <[[database]]>, Quercus will create a new database pool automatically.
+
 
+
The <[[rewrite-dispatch]]> lets you use clean URLs, so your paths will look like http://windansea.caucho.com/forum instead of http://windansea.caucho.com/index.php?q=forum
+
 
+
<pre>
+
 
  <web-app xmlns="http://caucho.com/ns/resin">
 
  <web-app xmlns="http://caucho.com/ns/resin">
  <database jndi-name="jdbc/drupal">
 
    <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
 
      <url>jdbc:mysql://localhost:3306/drupal</url>
 
      <user>root</user>
 
      <password></password>
 
    </driver>
 
  </database>
 
 
  <servlet servlet-name="php"
 
            servlet-class="com.caucho.quercus.servlet.QuercusServlet">
 
    <init database="jdbc/drupal"/>
 
  </servlet>
 
 
    <servlet-mapping url-pattern="*.php" servlet-name="php"/>
 
 
 
   <welcome-file-list><welcome-file>index.php</welcome-file></welcome-file-list>
 
   <welcome-file-list><welcome-file>index.php</welcome-file></welcome-file-list>
 
   
 
   
 
   <rewrite-dispatch>
 
   <rewrite-dispatch>
     <dispatch regexp="\.(php|gif|css|jpg|png|ico|js|htm|html)"/>
+
     <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/>
 
     <forward regexp="^/" target="/index.php?q="/>
 
     <forward regexp="^/" target="/index.php?q="/>
 
   </rewrite-dispatch>
 
   </rewrite-dispatch>
 
  </web-app>
 
  </web-app>
</pre>
+
# Run <pre>java -jar resin-3.1.6/lib/resin.jar</pre>
 
+
# Browse to http://localhost:8080 and set up Drupal according to the online directions
== clean URLs ==
+
 
+
You may need to modify the settings.php to force clean URLs
+
 
+
  $conf['clean_url'] = 1;
+

Revision as of 17:29, 26 June 2008


Running Drupal 6.2 on Resin 3.1.6

Requirements

  1. MySQL server
  2. Java 1.5 or higher

Quick start

Follow these instructions if you would simply like to evaluate running Drupal without doing a system-wide installation. Follow the instructions below to perform a system-wide installation.

  1. Download Drupal 6.2 from http://drupal.org/drupal-6.2
  2. Download Resin 3.1.6 from http://www.caucho.com/download
  3. Unzip Resin 3.1.6
  4. Unzip Drupal and copy all files and directories to resin-3.1.6/webapps/ROOT
  5. Create the Drupal database:
    mysql -u root
    mysql> CREATE DATABASE drupal;
  6. Create the directory resin-3.1.6/webapps/ROOT/WEB-INF/lib
  7. Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
  8. Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in resin-3.1.6/webapps/ROOT/WEB-INF/lib
  9. Create the following resin-3.1.6/webapps/ROOT/WEB-INF/resin-web.xml:
<web-app xmlns="http://caucho.com/ns/resin">
  <welcome-file-list><welcome-file>index.php</welcome-file></welcome-file-list>

  <rewrite-dispatch>
    <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/>
    <forward regexp="^/" target="/index.php?q="/>
  </rewrite-dispatch>
</web-app>
  1. Run
    java -jar resin-3.1.6/lib/resin.jar
  2. Browse to http://localhost:8080 and set up Drupal according to the online directions
Personal tools