Quercus: linode
From Resin 3.0
(Difference between revisions)
(Checkpoint) |
m (preformatted text in list) |
||
(12 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | Running Quercus hosted by [linode.com] | + | [[Category: Quercus]] |
+ | |||
+ | =Running Quercus hosted by [http://linode.com linode.com]= | ||
---- | ---- | ||
− | # Obtain an account from [http://linode.com] | + | # Obtain an account from [http://linode.com linode.com] |
# Log in to the account and create an Ubuntu image | # Log in to the account and create an Ubuntu image | ||
− | # Log into your linode and install the following packages: | + | # Log into your linode and install the following packages:<pre>apt-get install ubuntu-minimal ubuntu-standard sun-java6-jdk mysql-server postfix iptables</pre> |
− | + | # Download Resin Open Source [http://www.caucho.com/download]<pre>wget http://www.caucho.com/download/resin-3.1.6.tar.gz</pre> | |
− | # Download Resin Open Source [http://www.caucho.com/download] | + | |
− | + | ||
# Untar Resin into /usr/local/share | # Untar Resin into /usr/local/share | ||
+ | # Create a "resin" user:<pre>useradd -m resin</pre> | ||
+ | # Change the ownership of the Resin installation to "resin": <pre>chown -R resin:resin resin-3.1.6</pre> | ||
# Create a link from /usr/local/share/resin to the Resin directory | # Create a link from /usr/local/share/resin to the Resin directory | ||
− | # Edit /usr/local/share/resin/conf/resin.conf to change the host-deploy directory: | + | # 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> | ||
− | # Download Drupal: | + | # Change the ownership of /var/www to "resin": <pre>chown -R resin:resin /var/www</pre> |
− | + | # Redirect traffic from port 80 to port 8080 using iptables: <pre>iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080</pre> | |
− | # Untar Drupal in /var/www/hosts/<host-name> | + | # Change to user "resin" |
− | # Create a database for Drupal in MySQL | + | # 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> | |
− | + | # Untar Drupal in /var/www/hosts/<host-name>/webapps/ROOT | |
+ | # 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 | ||
+ | # Create the following /var/www/hosts/<host-name>/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)"/> | ||
+ | #: <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> | ||
+ | # Start Resin:<pre>java -jar /usr/local/share/resin/lib/resin.jar start</pre> | ||
# Browse to your host and configure Drupal as directed. | # Browse to your host and configure Drupal as directed. |
Latest revision as of 17:42, 26 June 2008
Running Quercus hosted by linode.com
- Obtain an account from linode.com
- Log in to the account and create an Ubuntu image
- Log into your linode and install the following packages:
apt-get install ubuntu-minimal ubuntu-standard sun-java6-jdk mysql-server postfix iptables
- Download Resin Open Source [1]
wget http://www.caucho.com/download/resin-3.1.6.tar.gz
- Untar Resin into /usr/local/share
- Create a "resin" user:
useradd -m resin
- Change the ownership of the Resin installation to "resin":
chown -R resin:resin resin-3.1.6
- Create a link from /usr/local/share/resin to the Resin directory
- Edit /usr/local/share/resin/conf/resin.conf to change the host-deploy directory:
<host-deploy path="/var/www/hosts">
- Create a host directory: /var/www/hosts/<host-name>
- Change the ownership of /var/www to "resin":
chown -R resin:resin /var/www
- 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
- Change to user "resin"
- Create the web application tree: /var/www/hosts/<host-name>/webapps/ROOT/WEB-INF
- Download Drupal:
wget http://ftp.osuosl.org/pub/drupal/files/projects/drupal-6.2.tar.gz
- Untar Drupal in /var/www/hosts/<host-name>/webapps/ROOT
- 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
- Create the following /var/www/hosts/<host-name>/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>
- Create a database for Drupal in MySQL
mysql -u root
> CREATE DATABASE drupal;
- Start Resin:
java -jar /usr/local/share/resin/lib/resin.jar start
- Browse to your host and configure Drupal as directed.