cancel
Showing results for 
Search instead for 
Did you mean: 

Installation of Alfresco on Windows as a service

fjodor
Champ in-the-making
Champ in-the-making
It took me quite a while to find out how to get Alfresco running as a service in Windows. The trick is to NOT start Alfresco after installation but from the start  configure it as a service.

This is complete installation procedure:

Installation procedure for Alfresco on Windows 2003 server.

Prerequisites:
- MySql server (v4.1)

Run setup, you can do a default or custom installation.

After setup is finished do not start Alfresco via 'Start Alfresco Server'
in the Start menu! Also do not use the batch file to start Alfresco!

Copy <Alfresco>\bin\imconvert.exe to C:\WINDOWS\system32

See <Alfresco>\README_mysql.txt and configure Alfresco for use with MySql as described:
Open a command prompt and CD to <Alfresco>\extras\databases\mysql\
Run db_setup.bat
Remove these 3 files from <Alfresco>\tomcat\shared\classes\alfresco\extension:
- custom-db-and-data-context.xml
- custom-db-connection.properties
- custom-hibernate-dialect.properties

Configure Alfresco to be run by Tomcat as a service:

Open a command prompt and CD to <Alfresco>\tomcat\bin
Type "set CATALINA_HOME=<Alfresco>\tomcat"
Run "service.bat install"

Set the service to start automatically.

Add the following to the SYSTEM PATH:
…..;<MySql>\bin;<Alfresco>\java\bin;<Alfresco>\tomcat\bin

Run <Alfresco>\tomcat\bin\tomcat5w.exe
Configure the options like those in <Alfresco>\alfresco.bat
On the Java tab:
Point the Java Virtual Machine to <Alfresco>\java\jre\bin\client\jvm.dll
and the Java classpath to <Alfresco>\tomcat\bin\bootstrap.jar
add the Java options:
-Dcatalina.base=<Alfresco>\tomcat
-Dcatalina.home=<Alfresco>\tomcat
set the memory options:
Initial memory pool: 128 Mb
Maximum memory pool: 512 Mb
Thread stack size: 64 Mb
(you can change these accoording to the amount of memory your system has)

Reboot!

Login to http://localhost:8080/ (user admin, password admin)

Goto the Administration Console, Manage System Users, 'Show all' and change the admin password.

If you have a firewall running, you might want to open port 8080 to give others access to Alfresco.
32 REPLIES 32

derek
Star Contributor
Star Contributor
Hi,

The service couldn't reliably start Open Office and other remote components given the wide range of platforms that the system was being installed on.

If one of our customers were to request the service, then we'd put effort into it.  Usually, on production systems, they have their own mechanisms in place to ensure high availability so it's not been an issue.  There are tools to make just about anything a service, so you should be able to do it yourself with little effort.  There've even been some forum posts in the last few days on how to do it.

Regards

razvancg
Champ in-the-making
Champ in-the-making
pls help me
I stiil can't install ALfresco even if a made all step from first postSmiley Sad(
when I try to run "service.bat install" it's finished with faild installing 'Tomcat5' service
why:-/

dozyarmadillo
Champ on-the-rise
Champ on-the-rise
Derek - fair enough. I'll use srvany for OO and Java Service Wrapper for Tomcat.

Regards

christophes
Champ in-the-making
Champ in-the-making
Hi,

There's a nice set of instructions here:

http://www.tacktech.com/display.cfm?ttid=197

Cheers,

–Aladdin

I've followed this instructions to put Open Office Portable in service but when I want to transform a doc file in PDF, I have the following error :

Please correct the errors below then click Finish.
* Failed to run Actions due to error: No transformation exists between mimetypes application/msword and application/pdf

If I go to the Task Manager, I can see the process OpenOfficePortable.exe. So I don't understand.

Can someone help me ?

Christophe

christophes
Champ in-the-making
Champ in-the-making
Anyone have a solution ?  I have to start Alfresco manually to do this transformation.

Christophe

bsawler
Champ in-the-making
Champ in-the-making
Hi,

Sorry, but in all my wisdom I did not notice that the forum had more then 1 page, so I would always check back to this and go to the bottom of page 1 and would not notice any further converstions nor did I ever see the page 1 of 2… just found it.

Yes I did delete the 3 custom files as explained in the readme for MySql install, but for the life of me, I could never get the CIFs working.  I could log in via the web client (firefox) and could do everything, but I could never map the alfresco drive <server>_a, nor would it ever come up under windows networks.  I admit defeat, and asked the IT person to "start Alfresco" whenever the server was rebooted, and in doing this the <server>_a always appears as expected.

It seems like a "nice to have" to have it start on boot-up, but labour is cheap here in Vietnam so I will leave it to them to manually start the server.

Thanks,
Bradley

bsawler
Champ in-the-making
Champ in-the-making
razvancg,

I had the same problem while I tried 500 times to get Alfresco working properly, but I could not!  I did get the same error as you, with the failed tomcat after running "service.bat install".

First check to make sure that Tomcat is not already running… (Windows) go to "start" then "control panel" then "administrative tools" then "services" make sure "Apache Tomcat" is not there and if so change to "Stopped". Then give the service.bat a-go.

Providing you have not added any documents etc. to your database, then go to one of the tomcat directories where you "installed" the database and run "db_remove" (or something like that), and then "db_install" again, and with windows, do the old regular re-boots after every stage and see what happens.

If that doesn't work, reverse back through all the steps that you did to setup as a service, remove MySql, Alfresco, reboot and re-install, and when you run "service.bat install" it will say "tomcat installed" as the last line in the batch file.

With all that said, I ended up abondoning the service cause I do not know computers that well therefore I cannot fix the problem with the CIF when I run Alfresco as a server.

Alfresco is one fantastic product.  Excellent job guys/girls.

Bradley

tpe
Champ in-the-making
Champ in-the-making
What I noticed is, that though installed as a service the open office did not survive loggin off. The problem is that the service itself is still running, but the service is srvany.exe not the openofficeportable.exe. Does anyone has the solution for this problem?

emeins
Champ in-the-making
Champ in-the-making
I figured out how to get OpenOfficePortable and Alfresco/Tomcat running correctly as a service.

First: Use the info provided here and elsewhere to get Tomcat running as a service.

Second: Use the srvany.exe as mentioned from the windows resource kit to get OpenOfficePortable running as a service.

Finally:  The trick is to edit the service properties and make sure you set "Allow service to interact with desktop" to on for both services under the Log On tab.

Transformations now work as they did when running the whole stack from the default batch file and logged on as a user.

Eric

mike91
Champ in-the-making
Champ in-the-making
I found this thread through Google as I'm having this same problem.

It's pretty pathetic when I have to use some 3rd-party utility or resort to logging into the console and having to manually start Alfresco by hand.

Just goes to show the business minds of the people running that company.