cancel
Showing results for 
Search instead for 
Did you mean: 

Installing FSR as service in Windows

fsweb
Champ in-the-making
Champ in-the-making
We have Alfresco Enterprise 3.1.1 WCM on a RHEL 5 box and I'm trying to install the FSR 3.1 on a Windows 2008 box. It installs and runs fine, however when logging the user off it also kills the FSR. I know it runs inside a JVM and I think that's the problem. I've tried configuring the deploy_start.bat to run as a service, start on boot, etc. but to no avail. I checked the wiki and it says it can be installed as a service but doesn't give any info on how. Does anyone know how to do this??

Thanks for any help.
12 REPLIES 12

varun_shah
Champ in-the-making
Champ in-the-making
I also need to set up FSR as window service.

Thanks in Advance.

mrogers
Star Contributor
Star Contributor
You could use a framework like this:
http://wrapper.tanukisoftware.org/doc/english/index.html#service

Or write the windows service adapter yourself and contribute it back please.

power
Champ in-the-making
Champ in-the-making
I didn't get the configuration given on site to call our  deploy_start.bat. from their config file

varun_shah
Champ in-the-making
Champ in-the-making
I went through documentation provided on java wrapper service site.I have also tried tomcat start stop feature.But How I configure deploy_start.bat to wrapper service.
Do I need to write Java code for this ?

mrogers
Star Contributor
Star Contributor
No its windows code.  Unless you use some sort of framework which does the work for you.

varun_shah
Champ in-the-making
Champ in-the-making
Thanks for reply.
It would be great if you will provide sample program to call our deploy_start.bat .
Deployer bat file  contains some parameters to start(like application-context.xml).
start /min "Deployment Server" "%JAVA_HOME%\bin\java" -server -Djava.ext.dirs=. org.alfresco.deployment.Main application-context.xml 

I need it urgent so please reply me ASAP.

Thanks in advance.

g_rathod
Star Contributor
Star Contributor
Hi mrogers,

We have achieved FSR as windows service on 32bit machines  using JAVA wrapper class.

- Ghanshyam

mrogers
Star Contributor
Star Contributor
Excellent.  Smiley Happy   Could you contribute it please.   Or consider sharing it with varun.shah and fsweb above ?

shahsnehal
Champ in-the-making
Champ in-the-making
Solution Steps for Windows 32 bit
========================================================
1.   Download Java Wrapper from following URL.
a.   http://wrapper.tanukisoftware.org/doc/english/download.jsp We downloaded Community Version for 32 bit windows.
2.   Unzip the wrapper to some folder. i.e C:\wrapper
3.   Get Alfresco FSR Deployer for 3.1
4.   Copy all Jar files from FSR Deployer 3.1 to "wrapper\lib" folder.
5.   Create a empty jar file and add a " deployment.properties" from FSR Deployer 3.1. Copy this jar file to "wrapper\lib" folder. Name it as " deployment-config.jar". (attached file contains this jar file)
6.   Copy following files from FSR Deployer 3.1 to "wrapper\bin" directory.
a.   application-context.xml
b.   shutdown-context.xml
7.   Copy following files from "wrapper\src\bin" to "wrapper\bin" directory and remove ".in" from file name to make it batch file.
a.   InstallApp-NT.bat.in (after rename it should be " InstallApp-NT.bat" )
b.   UninstallApp-NT.bat.in (after rename it should be " UninstallApp-NT.bat" )
8.   Open "wrapper/conf/wrapper.conf" file and make following changes.
a.   change " wrapper.java.command" to "%JAVA_HOME%/bin/java"
b.   change " wrapper.java.mainclass" to "org.tanukisoftware.wrapper.WrapperStartStopApp"
c.   Add following classpath entries. Remove default entries for classpath.
i.   wrapper.java.classpath.1=../lib/wrapper.jar
ii.   wrapper.java.classpath.2=C:/Java/jdk1.6.0_14/lib/tools.jar  (give JAVA_HOME path here. as per you JAVA_HOME configuration. use %JAVA_HOME%)
iii.   wrapper.java.classpath.4=../lib/alfresco-deployment.jar
iv.   wrapper.java.classpath.5=../lib/alfresco-core.jar
v.   wrapper.java.classpath.6=../lib/commons-logging-1.1.jar
vi.   wrapper.java.classpath.7=../lib/jug-lgpl-2.0.0.jar
vii.   wrapper.java.classpath.8=../lib/log4j-1.2.15.jar
viii.   wrapper.java.classpath.9=../lib/spring-2.0.8.jar
ix.   wrapper.java.classpath.10=../lib/deployment-config.jar
x.   #wrapper.java.classpath.10=../lib/deployment.properties
xi.   #wrapper.java.classpath.11=../lib/shutdown-context.xml
xii.   #wrapper.java.classpath.12=../lib/application-context.xml
d.   Add following additions parameters.
i.   wrapper.java.additional.2=-Dcatalina.base=..
ii.   wrapper.java.additional.3=-Dcatalina.home=..
iii.   wrapper.java.additional.4=-Djava.io.tmpdir=../temp
e.   Add following Application Parameters
i.   wrapper.app.parameter.1=org.alfresco.deployment.Main
ii.   wrapper.app.parameter.2=1
iii.   wrapper.app.parameter.3=application-context.xml
iv.   wrapper.app.parameter.4=org.alfresco.deployment.Main
v.   wrapper.app.parameter.5=TRUE
vi.   wrapper.app.parameter.6=1
vii.   wrapper.app.parameter.7=shutdown-context.xml
f.   Change service name related changes as per below
i.   # Name of the service
ii.   wrapper.name=Alfresco FSR
iii.   # Display name of the service
iv.   wrapper.displayname=Alfresco FSR
v.   # Description of the service
vi.   wrapper.description=Alfresco FSR
9.   After all above changes, click on "wrapper\bin\InstallApp-NT.bat" file. You should be able to see service name "Alfresco FSR". For the first time, you need to start the service manually.

Please follow the above steps. You can check service log under "wrapper\log\wrapper.log" file.

Let me know if you need more details