Quercus: linode

From Resin 3.0

Jump to: navigation, search

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 "resin" user:
    useradd -m resin
  7. Change the ownership of the Resin installation to "resin":
    chown -R resin:resin resin-3.1.6
  8. Create a link from /usr/local/share/resin to the Resin directory
  9. Edit /usr/local/share/resin/conf/resin.conf to change the host-deploy directory:
    <host-deploy path="/var/www/hosts">
  10. Create a host directory: /var/www/hosts/<host-name>
  11. Change the ownership of /var/www to "resin":
    chown -R resin:resin /var/www
  12. Redirect traffic from port 80 to port 8080 using iptables:
    iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
  13. Change to user "resin"
  14. Create the web application tree: /var/www/hosts/<host-name>/webapps/ROOT/WEB-INF
  15. Download Drupal:
    wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-6.2.tar.gz
  16. Untar Drupal in /var/www/hosts/<host-name>/webapps/ROOT
  17. Download MySQL Connector/J (http://dev.mysql.com/downloads/connector/j/5.1.html) and place the jar in /var/www/hosts/<host-name>/webapps/ROOT/WEB-INF/lib
  18. Create the following /var/www/hosts/<host-name>/webapps/ROOT/WEB-INF/resin-web.xml:
    <web-app xmlns="http://caucho.com/ns/resin">
    <dispatch regexp="\.(php|gif|css|jpg|png|ico|js)"/>
    <forward regexp="^/" target="/index.php?q="/>
  19. Create a database for Drupal in MySQL
    mysql -u root
    > CREATE DATABASE drupal;
  20. Start Resin:
    java -jar /usr/local/share/resin/lib/resin.jar start
  21. Browse to your host and configure Drupal as directed.
Personal tools