Caucho Technology

resin installation quick start


You can start using Resin by simply expanding the archive and starting Resin with a Java command line. You can also start Resin directly from an IDE.

Preconditions

Resin 4.0 needs Java before it can run. You will need JDK 1.6 or later.

Oracle's JDK for Windows, Solaris, and Linux can be found athttp://www.oracle.com/technetwork/java/javase/overview/index.html. Oracle also has links to some other ports of the JDK.

Resin as a Web Server

Resin comes with a built-in high-performance production-ready HTTP server. The easiest and fastest Resin configuration uses Resin as the web server as well as the application server. We highly recommend you start with this configuration although you are free to use other web servers like Apache or IIS with Resin.

browser <-> Resin httpd/servlets,beans <- html,jsp

The built-in HTTP server listens on port 8080 in the default configuration and can be changed to listen on the HTTP port 80 instead during deployment.

For more details, see theResin Web Serverconfiguration page.

Installing Resin

While the Resin web server starts listening to HTTP requests on port 8080, it also listens on port 6800 forload balancer and clustermessages. Keep in mind, Resin can be used for development or evaluation in addition to using it in production. If desired, you can easily apply for a development license to enable Resin Pro features. You can also simply use Resin Open Source to start development.

Installation steps for the major operating systems are outlined below:

Windows

  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 resin-4.0.x.zip
  4. Define the environment variable RESIN_HOME to the location of Resin, for example c:\resin-4.0.x
  5. Execute resin.exe
    • or run java -jar lib/resin.jar console
  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 bin/resin.sh console
    • or run java -jar lib/resin.jar console
  8. Browse to http://localhost:8080

Debian Unix apt-get

We provide a Debian packaged version of Resin that Debian and Ubuntu users can take advantage of. It performs all of the installation steps above for you and creates all the recommended server and content directories. Simply download from theResin download pageand install using dpkg.

Alternatively, you can add Caucho's Debian repository to your system's repositories to use automated update tools like Synaptic and apt-get. To do this, add the following line to your/etc/apt/sources.list

deb http://caucho.com/download/debian unstable multiverse

After adding this line, update your local repository cache by running:

apt-get update

Finally, install Resin Professional using the following:

apt-get install resin-pro

If you have a license file for Resin, save it in/usr/local/resin/licenses

Or install Resin Open Source with this command:

apt-get install resin

Running Applications

Once you've made sure Resin is working, you can start to run applications/add content:

  1. You can deploy .war files by copying them to the webapps directory like this: resin-4.0.x/webapps/hello.war.
  2. You can deploy using the command-line like this: bin/resin.sh deploy hello.war.
  3. You can also deploy .wars in exploded form like: resin-4.0.x/webapps/hello/index.php. You can use a web.xml file to configure the 'hello' web application: resin-4.0.x/webapps/hello/WEB-INF/web.xml.

For more information on deployment, see thedeployment documentation.

Running Resin as a Daemon

In most production environments, 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.

The following are the basic steps to running Resin as a daemon:

  1. Start resin with bin/resin.sh start
  2. Stop resin with bin/resin.sh stop
  3. Restart resin with bin/resin.sh restart

Resin IDE Support

Resin includes excellent support for Eclipse. In fact, using the Eclipse support may be the easiest way get started with Resin.

Resin plugin support is included in Indigo (Eclipse 3.7) and above (you can install the Resin plugin manually for earlier Eclipse versions). The Resin plugin allows you to create new server instances, configure servers, start servers, stop servers, restart instances, deploy/undeploy applications, debug on the server and so on. You can even automatically download and install the latest version of Resin using the plugin or apply for a development license for Resin Pro.

Further details on the Resin Eclipse plugin is availablehere.

More Installation Options

More installation and configuration are available atinstallation options.


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