Quercus: linode

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
m (start resin, iptables)
(fixes after practice)
Line 11: Line 11:
 
# Edit /usr/local/share/resin/conf/resin.conf to change the host-deploy directory:<pre><host-deploy path="/var/www/hosts"></pre>
 
# Edit /usr/local/share/resin/conf/resin.conf to change the host-deploy directory:<pre><host-deploy path="/var/www/hosts"></pre>
 
# Create a host directory: /var/www/hosts/<host-name>
 
# Create a host directory: /var/www/hosts/<host-name>
 +
# Create the web application tree: /var/www/hosts/<host-name>/webapps/ROOT/WEB-INF
 
# Download Drupal:<pre>wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-6.2.tar.gz</pre>
 
# Download Drupal:<pre>wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-6.2.tar.gz</pre>
# Untar Drupal in /var/www/hosts/<host-name>
+
# Untar Drupal in /var/www/hosts/<host-name>/webapps/ROOT
 +
# Create the following resin-web.xml:<pre>
 +
<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>
 +
 +
  <rewrite-dispatch>
 +
    <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/>
 +
    <forward regexp="^/" target="/index.php?q="/>
 +
  </rewrite-dispatch>
 +
</web-app>
 +
</pre>
 
# Create a database for Drupal in MySQL<pre>mysql -u root</pre><pre>> CREATE DATABASE drupal;</pre>
 
# Create a database for Drupal in MySQL<pre>mysql -u root</pre><pre>> CREATE DATABASE drupal;</pre>
 
# Start Resin:<pre>java -jar /usr/local/share/resin/lib/resin.jar start
 
# Start Resin:<pre>java -jar /usr/local/share/resin/lib/resin.jar start
 
# Browse to your host and configure Drupal as directed.
 
# Browse to your host and configure Drupal as directed.

Revision as of 00:02, 15 May 2008

Running Quercus hosted by linode.com


  1. Obtain an account from linode.com
  2. Log in to the account and create an Ubuntu image
  3. Log into your linode and install the following packages:
    apt-get install ubuntu-minimal ubuntu-standard sun-java6-jdk mysql-server postfix iptables
  4. Download Resin Open Source [1]
    wget http://www.caucho.com/download/resin-3.1.6.tar.gz
  5. Untar Resin into /usr/local/share
  6. Create a link from /usr/local/share/resin to the Resin directory
  7. Edit /usr/local/share/resin/conf/resin.conf to change the host-deploy directory:
    <host-deploy path="/var/www/hosts">
  8. Create a host directory: /var/www/hosts/<host-name>
  9. Create the web application tree: /var/www/hosts/<host-name>/webapps/ROOT/WEB-INF
  10. Download Drupal:
    wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-6.2.tar.gz
  11. Untar Drupal in /var/www/hosts/<host-name>/webapps/ROOT
  12. Create the following resin-web.xml:
<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> <rewrite-dispatch> <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/> <forward regexp="^/" target="/index.php?q="/> </rewrite-dispatch> </web-app>
  1. Create a database for Drupal in MySQL
    mysql -u root
    > CREATE DATABASE drupal;
  2. Start Resin:
    java -jar /usr/local/share/resin/lib/resin.jar start
    
# Browse to your host and configure Drupal as directed.
Personal tools