Quercus: Drupal

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Quercus]]
+
[[Category: Quercus]]
  
==Download Resin 3.1.1+==
+
=Running Drupal 6.2 on Resin 3.1.6=
The newest Resin versions have several bug fixes for Drupal.
+
  
==Download Drupal==
+
==Requirements==
Download [http://drupal.org/download Drupal] into $resin_home/webapps/ROOT/drupal.
+
# MySQL server
 +
# Java 1.5 or higher
  
==Download MySQL JDBC Driver==
+
==Quick start==
Download [http://www.mysql.com/products/connector/j/ MySQL Connector/J JDBC Driver] into $resin_home/lib.  Any version is fine.
+
Follow these instructions if you would simply like to evaluate running Drupal without doing a system-wide installation.
  
==Add resin-web.xml==
+
# Download Drupal 6.2 from http://drupal.org/drupal-6.2
Add the following resin-web.xml file to $resin_home/webapps/ROOT/drupal/WEB-INF.  Customize email settings to allow the sending of emails from PHPAnything not in <b>bold</b> is optional.
+
# Download Resin 3.1.6 from http://www.caucho.com/download
 +
# Unzip Resin 3.1.6
 +
# Unzip Drupal and copy all files and directories to resin-3.1.6/webapps/ROOT
 +
# 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
 +
# 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
 +
# Create the following resin-3.1.6/webapps/ROOT/WEB-INF/resin-web.xml:
 +
#:<pre>
 +
#:<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|html|htm|txt)"/>
 +
#:    <forward regexp="^/" target="/index.php?q="/>
 +
#:  </rewrite-dispatch>
 +
#:</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
  
The resin-web.xml needs to have the QuercusServlet mapped to *.php.  Optionally, it can have a <[[database]]> as PHP's databaseQuercus can automatically create database pools if you omit the <[[database]]> configuration, but it's better to configure it explicitly.
+
==Full installation==
 +
Follow these instructions if you would like to perform a permanent installation with virtual hostsFollow the above directions for a quick start evaluation.
  
<b><web-app xmlns="http://caucho.com/ns/resin"></b>
+
# Download Drupal 6.2 from http://drupal.org/drupal-6.2
  <database jndi-name='jdbc/drupal'>
+
# Download Resin 3.1.6 from http://www.caucho.com/download
    <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
+
# Unzip Resin 3.1.6 in /usr/local/share
      <url>jdbc:mysql://localhost:3306/drupal</url>
+
# Copy /usr/local/share/resin-3.1.6/conf/resin.conf to /etc/resin/resin.conf
      <user></user>
+
# Edit /etc/resin/resin.conf to change the host-deploy directory:<pre><host-deploy path="/var/www/hosts"></pre>
      <password></password>
+
# Create a virtual host directory for your domain:<pre>/var/www/hosts/drupal.example.com/webapps/ROOT</pre> (in this example, the domain is drupal.example.com)
    </driver>
+
# Unzip Drupal and copy all files and directories to /var/www/hosts/drupal.example.com/webapps/ROOT
  </database>
+
# Create the Drupal database: <pre>mysql -u root</pre><pre>mysql> CREATE DATABASE drupal;</pre>
+
# Create the directory /var/www/hosts/drupal.example.com/webapps/ROOT/WEB-INF/lib
  <b><servlet-mapping url-pattern="*.php"
+
# Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
                    servlet-class="com.caucho.quercus.servlet.QuercusServlet">
+
# Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in /var/www/hosts/drupal.example.com/webapps/ROOT/WEB-INF/lib
    <init></b>
+
# Create the following /var/www/hosts/drupal.example.com/webapps/ROOT/WEB-INF/resin-web.xml:
      <database>jdbc/drupal</database>
+
#:<pre>
      <compile>true</compile>
+
#:<web-app xmlns="http://caucho.com/ns/resin">
      <b><php-ini>
+
#:  <welcome-file-list><welcome-file>index.php</welcome-file></welcome-file-list>
        <sendmail_from>my_email_address</sendmail_from>
+
#:
        <smtp_username>my_email_username</smtp_username>
+
#:  <rewrite-dispatch>
        <smtp_password>my_email_password</smtp_password>
+
#:    <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/>
      </php-ini>
+
#:    <forward regexp="^/" target="/index.php?q="/>
    </init>
+
#:  </rewrite-dispatch>
  </servlet-mapping></b>
+
#:</web-app></pre>
+
# Run <pre>java -jar /usr/local/share/resin-3.1.6/lib/resin.jar -conf /etc/resin/resin.conf start</pre>
  <b><welcome-file-list>index.php</welcome-file-list>
+
# Browse to <nowiki>http://drupal.example.com:8080</nowiki> and set up Drupal according to the online directions
</web-app></b>
+
 
+
==Finish==
+
Run Drupal's installation.  That's it!
+

Latest revision as of 21:10, 2 July 2009


Contents

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.

  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|html|htm|txt)"/>
    <forward regexp="^/" target="/index.php?q="/>
    </rewrite-dispatch>
    </web-app>
  10. Run
    java -jar resin-3.1.6/lib/resin.jar
  11. Browse to http://localhost:8080 and set up Drupal according to the online directions

Full installation

Follow these instructions if you would like to perform a permanent installation with virtual hosts. Follow the above directions for a quick start evaluation.

  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 in /usr/local/share
  4. Copy /usr/local/share/resin-3.1.6/conf/resin.conf to /etc/resin/resin.conf
  5. Edit /etc/resin/resin.conf to change the host-deploy directory:
    <host-deploy path="/var/www/hosts">
  6. Create a virtual host directory for your domain:
    /var/www/hosts/drupal.example.com/webapps/ROOT
    (in this example, the domain is drupal.example.com)
  7. Unzip Drupal and copy all files and directories to /var/www/hosts/drupal.example.com/webapps/ROOT
  8. Create the Drupal database:
    mysql -u root
    mysql> CREATE DATABASE drupal;
  9. Create the directory /var/www/hosts/drupal.example.com/webapps/ROOT/WEB-INF/lib
  10. Download MySQL Connector/J 5.1.6 (http://dev.mysql.com/downloads/connector/j/5.1.html)
  11. Unzip MySQL Connector/J and place the mysql-connector-java-5.1.6-bin.jar in /var/www/hosts/drupal.example.com/webapps/ROOT/WEB-INF/lib
  12. Create the following /var/www/hosts/drupal.example.com/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>
  13. Run
    java -jar /usr/local/share/resin-3.1.6/lib/resin.jar -conf /etc/resin/resin.conf start
  14. Browse to http://drupal.example.com:8080 and set up Drupal according to the online directions
Personal tools