⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install-iis.xtp

📁 RESIN 3.2 最新源码
💻 XTP
📖 第 1 页 / 共 2 页
字号:
<document>  <header>    <product>resin</product>    <title>Resin with IIS</title>    <description>      <p>For sites requiring the use of IIS, Resin provides a fast servletrunner, allowing IIS to run servlets and JSP files.</p>    </description>  </header>  <body><s1>      <figure src="iis_srun.gif"/>      <p>If you have not yet done so, we suggest youconsider the <a href="resin-web-server.xtp">Resinweb server</a> option first, either as a standalone web server or asa web-tier server load-balancing to Resin app-tier servers.Resin's Java web server provides management, clustering,and load-balancing with failover.</p></s1>    <localtoc/><s1 title="Prerequisites and Environment Variables"><p>Resin requires a 1.5 JDK.  You can download one from Sun and install it.</p> <p>The Control Panel is used to configure two environment variables:</p><example>JAVA_HOME=C:\jdk1.5.0RESIN_HOME=C:\resin-3.2</example></s1><s1 title="Configuring IIS/PWS"><p>To configure Resin with IIS, you must follow the following steps:</p><ol><li>Configure IIS/PWS</li><li>Configure resin.xml</li><li>Start resin.exe</li></ol><s2 title="ISAPI Filter"><p>You should run <code>RESIN_HOME/setup.exe</code> to setup yourconfiguration.  If setup.exe is not used, or it fails, the steps in <a href="#Manual-Configuration">Manual Configuration</a> are necessary.</p></s2><s2 title="ISAPI Filter Priority"><p>isapi_srun.dll installs itself as the default priority.  Some users may needto set the priority to a higher level, e.g. to override IIS's DAV support.</p><example title="resin.ini">ResinConfigServer localhost 6802CauchoStatus yesIISPriority high</example></s2><s2 title="Configuring resin.xml"><p>resin.xml should mirror the configuration of IIS.  In other words, you need to configure the document root and any directory aliases.</p><p>For many users, the only need to change needed in Resin is to change the<a config-tag="document-directory"/> attribute from 'webapps/ROOT' to somethinglike 'C:/inetpub/wwwroot'.  The mapping of url paths from the browser to realfiles on the disk must be the same for Resin as they are for IIS. For morecomplicated configurations that use mappings in IIS, you'll need to add <a href="webapp-tags.xtp">path-mapping</a> attributesto match.</p><example title="Example: resin.xml" language="xml">&lt;resin xmlns="http://caucho.com/ns/resin">&lt;cluster id="">  &lt;!-- configures the default host, matching any host name --&gt;  &lt;host id=""&gt;  &lt;!-- configures the root web-app --&gt;  &lt;web-app id='/'&gt;    &lt;root-directory&gt;C:/inetpub/wwwroot&lt;/root-directory&gt;    &lt;!-- adds xsl to the search path --&gt;    &lt;class-loader&gt;      &lt;simple-loader path="$host-root/xsl"/&gt;    &lt;/class-loader&gt;  &lt;/web-app&gt;&lt;/host&gt;&lt;/cluster&gt;&lt;/cluster&gt;</example></s2><s2 title="Testing the servlet engine"><p>From a <code>cmd</code> shell run <code>RESIN_HOME/resin.exe</code> to start theservlet runner.</p><example title="Run resin.exe">C:\&gt; cd %RESIN_HOME%C:\resin-3.2&gt; resin.exe</example><p>Now browse http://localhost/test.jsp.  You should get a 'file notfound' message.</p><p>Create a test file 'd:\inetpub\wwwroot\test.jsp'</p><example>2 + 2 = &lt;%= 2 + 2 %&gt;</example><p>Browse http://localhost/test.jsp again.  You should now get</p><results>2 + 2 = 4</results></s2></s1><s1 title="Command line arguments"><p>The following configuration line arguments are recognized by resin.exe.When command line arguments are used along with <code>-install</code> toinstall as a service, the arguments are used each time the service starts.</p><deftable><tr><th>Argument</th><th>Meaning</th></tr><tr><td>-verbose</td><td>Write more verbose information to the log file</td></tr><tr><td>-resin_home &lt;path&gt;</td><td>Sets the location of Resin</td></tr><tr><td>-java_home &lt;path&gt;</td><td>Specify the JDK location</td></tr><tr><td>-msjava</td><td>Use Microsoft's JVM</td></tr><tr><td>-nojit</td><td>Disable JIT compilation to help debugging</td></tr><tr><td>-classpath &lt;cp&gt;</td><td>Add to the classpath</td></tr><tr><td>-J&lt;arg&gt;</td><td>Set a Java command line argument, e.g. -J-nojit.</td></tr><tr><td>-X&lt;arg&gt;</td><td>Set a Java -X command line argument, e.g. -Xms128m.</td></tr><tr><td>-D&lt;foo=bar&gt;</td><td>Set a Java variable, e.g. -Dresin.home=here.</td></tr><tr><td>-install</td><td>Install as an NT service</td></tr><tr><td>-install-as &lt;name&gt;</td><td>Install as an NT service with the specific name.</td></tr><tr><td>-remove</td><td>Remove as an NT service</td></tr><tr><td>-remove-as &lt;name&gt;</td><td>Remove as an NT service with the specific name.</td></tr></deftable><s2 title="Memory Configuration"><p>Memory configuration is part of the JVM's arguments.  For most JVMs,you can find the full list by starting "java -X".</p><deftable title="Memory Configuration"><tr><th>Argument</th><th>Meaning</th></tr><tr><td>-Xms&lt;size&gt;</td><td>Initial Java heap size, e.g. -Xms32m</td></tr><tr><td>-Xmx&lt;size&gt;</td><td>Maximum Java heap size, e.g. -Xmx128m</td></tr><tr><td>-Xms&lt;size&gt;</td><td>the size of the heap for the young generation</td></tr></deftable><p>See <a href="jvm-tuning.xtp#memory">Performance : JVM Tuning : Memory</a> for more information on JVM memory usage.</p></s2></s1><s1 title="Deploying as an NT Service"><p>Once you're comfortable with using Resin with IIS, you can install itas an NT service.  As a service, Resin will automatically start whenNT reboots.  The service will also automatically restart Resin if itunexpectedly exits.</p><p>To install the service, use</p><example>win&gt; resin-3.2.x/resin.exe -install</example><p>To remove the service, use</p><example>win&gt; resin-3.2.x/resin.exe -remove</example><p>You will either need to reboot the machine or start the servicefrom the Control&#160;Panel/Services panel to start the server.  On amachine reboot, NT will automatically start the servlet runner.</p><p/><note>There is a bug in many JDKs which cause the JDK to exit when theadministrator logs out.  JDK 1.4 and later can avoid that bug if theJDK is started with -Xrs. </note><example>win&gt; resin-3.2.x/resin.exe -install -Xrs</example></s1><s1 name="balance" title="Load Balancing"><p>With Resin, you can distribute requests to multiple machines.  Allrequests with the same session will go to the same host.  In addition, if onehost goes down, the IIS filter will send the request to the nextavailable machine.</p><p>In addition, you can specify backup machines.  The backup only will serverequests if all primaries are down.</p><p>See the <a href="cluster.xtp">Resin config</a> section for moredetails.</p><example title="resin.xml">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;&lt;cluster id="app-tier"&gt;    &lt;server id="a" address="host1" port="6802" index="1"/&gt;    &lt;server id="b" address="host2" port="6802" index="2"/&gt;    &lt;server id="c" address="backup" port="6802" index="3" backup="true"/&gt;  ...&lt;/cluster&gt;&lt;/resin&gt;</example><example title="installing multiple servlet runners as services">win&gt; resin-3.2.x/resin.exe -install-as "Resin-A" -server a -Xrswin&gt; resin-3.2.x/resin.exe -install-as "Resin-B" -server b -Xrswin&gt; resin-3.2.x/resin.exe -install-as "Resin-C" -server c -Xrs</example></s1><s1 title="Manual Configuration"><p>Experts may want to configure Resin/IIS by hand insteadof using the setup program.  The steps involved are:</p><ol>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -