Caucho Technology
  • resin 4.0
  • resin installation quick start

    You can start using Resin by simply expanding the archive, and starting Resin with a Java command line.

    Quick Start for the Impatient

    The Resin web server starts listening to HTTP requests on port 8080 and listens on port 6800 for load balancer and cluster messages. Resin can then be used for development or evaluation. The steps are:

    1. Install JDK 1.6 or later.
      • On Unix, set the JAVA_HOME variable or link /usr/java to the java home.
      • On Windows, check to make sure the JDK installation sets JAVA_HOME correctly.
    2. unzip/untar the Resin download. It will extract into resin-4.0.x/.
      • resin-4.0.x is resin.home, the location of the Resin distribution.
      • For now, it is also resin.root, the location of your content. Soon, you will want to move resin.root to something like /var/www.
    3. On Unix, execute ./configure --prefix=`pwd`; make; make install
    4. Start in development mode by executing java -jar lib/resin.jar console on Unix or simply resin.exe on Windows
    5. Browse to http://localhost:8080

    Adding Content

    Once you've made sure Resin is working, you'll want to add some content to the default web site:

    1. Add PHP files like resin-4.0.x/webapps/ROOT/hello.php.
    2. Add JSP files like resin-4.0.x/webapps/ROOT/hello.jsp.
    3. Add servlets like resin-4.0.x/webapps/ROOT/WEB-INF/classes/test/
      • Create a file resin-4.0.x/webapps/hello/WEB-INF/web.xml to configure the servlet.
    4. Add .war files like resin-4.0.x/webapps/hello.war.
    5. Create web-apps directly like resin-4.0.x/webapps/hello/index.php The URL in your browser is http://localhost:8080/hello.
      • Create a file resin-4.0.x/webapps/hello/WEB-INF/web.xml to configure the 'hello' web application.

    Running Resin as a daemon

    In a deployment environment, Resin will run as a background daemon. The previous steps ran Resin in the foreground, which is convenient for development since the logging output goes to the console. When running as a daemon, Resin detaches from the console and continues running until told to stop.

    1. Start resin with java -jar lib/resin.jar start
    2. Stop resin with java -jar lib/resin.jar stop
    3. Restart resin with java -jar lib/resin.jar restart

    Until you're ready to deploy the server, those are all the steps needed to get started with Resin.


    Resin 4.0 needs Java before it can run. It needs JDK 1.6 or a later JDK.

    Sun's JDK for Windows, Solaris, and Linux can be found at Sun also has links to some other ports of the JDK.

    Resin Web Server

    The easiest and fastest Resin configuration uses the Resin as the primary or only web server. This configuration provides a Java HTTP server. We recommend you start with this before trying any other configuration.

    The server listens at port 8080 in the default configuration and can be changed to the HTTP port 80 during deployment.


    1. Install JDK 1.6 or later.
    2. Check that the environment variable JAVA_HOME is set to the JDK location, e.g. c:\java\jdk1.6.0_14
    3. Unzip
    4. Define the environment variable RESIN_HOME to the location of Resin, for example c:\resin-4.0.x
    5. Execute resin.exe
    6. Browse to http://localhost:8080

    Unix, Linux, and Mac OS X

    1. Install JDK 1.6 or later and link /usr/java to the Java home or define the environment variable JAVA_HOME.
    2. tar -vzxf resin-4.0.x.tar.gz
    3. cd resin-4.0.x
    4. ./configure --prefix=`pwd`
    5. make
    6. make install
    7. Execute java -jar lib/resin.jar console
      • Or run bin/ console
    8. Browse to http://localhost:8080

    For more details, see the Resin Web Server configuration page.

    Resin with Apache

    If you are already using Apache for your web server, you can use Resin with Apache. This configuration uses Apache to serve html, images, PHP, or Perl, and Resin to serve JSPs and Servlets.

    The Apache configuration uses two pieces: a C program extending Apache (mod_caucho) and Java program supporting servlets and JSP (Resin.) The two pieces communicate with a special high-speed protocol.

    To configure Apache with Resin, you must configure both Apache and Resin. The Resin configuration is identical to Resin's httpd configuration. The Apache configuration tells Apache how to find Resin.

    1. On Unix only, compile using --with-apache or --with-apxs
    2. Make any needed Apache httpd.conf changes, such as adding loading the mod_caucho module. --with-apxs should take care of this automatically
    3. Make any needed Resin resin.xml changes, such as commenting out the http listener on port 80 or 8080 so that it does not conflict with Apache.
    4. Restart Apache and Resin
    Compiling Resin with mod_caucho
    unix> ./configure --prefix=`pwd` --with-apxs=/usr/local/apache/bin/apxs
    unix> make
    unix> make install

    For more details, see the Resin with Apache configuration page.

    Copyright © 1998-2011 Caucho Technology, Inc. All rights reserved.
    Resin ® is a registered trademark, and Quercustm, Ambertm, and Hessiantm are trademarks of Caucho Technology.