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

richmitc
Champ in-the-making
Champ in-the-making
Bradley,

I'm not exactly sure of your situation, but I will try to help….

First, the _a is just something alfresco adds to differentiate its server from the regular file server of the computer with alfresco on it.

I suggest you do a "Map Network Drive" as follows:

1.  Bring up My Computer or My Documents.

2.  Select Tools->Map Network Drive

3.  Select the Drive you want to mount your alfresco on.  It will default to Z: if you don't have that mounted already.

4.  Under Folder type \\bgs_a\alfresco

5.  Click different user name, enter your alfresco user name and password, and click OK.

6.  I suggest you might want to click Reconnect at logon so that it will still be there next time you logon.

7.  Click Finish.

Now, you should see this drive under My Computer and will be able to use it as a normal drive.  The permissions on the folders and files will be as they are for you in Alfresco.

Hope this helps….

Rich

bsawler
Champ in-the-making
Champ in-the-making
Hey Rich,

Thanks for the prompt response! 

This morning I started up my laptop and I forgot that I had set it for running on windows as a service and I went to "Start Alfresco Server" then logged on and could map 'bgs_a' as you outlined.  ALL worked good.  When I 'hover' over the 'Open Network Folder icon it says "Open Network Folder \\bgs_a\alfresco " and down below in the status it says "file:////bgs_a/alfresco…"

Then I realized that I started it wrong cause I set it up as a service as outlined in this discussion.  So I "Stopped Alfresco Server" then "started" the tomcat service from the tomcat5w.exe command, fired up firefox and logged into Alfresco and all my files are there etc… looks fine, but when I 'hover' over the 'Open Network Folder icon it says "Open Network Folder " and down below in the status it says "file://///"  i.e. I do not know where the files are and I cannot map bgs_a.


Thanks in advance,
Bradley

richmitc
Champ in-the-making
Champ in-the-making
I'll think about this and post another reply if I think of anything else….

Meanwhile, I recommend that you delete or rename your manual Alfresco start and stop selections.  I have done the same thing you did and this was the only way I stopped myself.

I wouldn't run the tomcat command directly.  If you go Control Panel->Administrative Tools->Services, you should see an Alfresco service in the list.  You can stop, restart, and start it from there.  Also, you can set it to manual or automatic.  In any case, even if you set it to manual, you might want to always start, stop, and restart it from there.

I would reboot your laptop and see if it works.  That is if you have the service on automatic.  If not, go to the Services and start it from there.

I hope this helps.

If not, we will need to go into the log to find out if we can see what is happening with CIFS.

I wish you all the best.

Rich

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

I do not have an "Alfresco" service but there is an "Apache Tomcat" service, which was stopped and manual.  I started it and then could log onto Alfresco immediately.  I changed this service to auto, rebooted and the service started but same issue with the CIF.

I have a clean machine next to me in the office.  I will perform a clean install and perform op's outlined above, and will see how it works.  Cause I have 'removed' and installed Alfresco about 6 times over the past few days and hopefully this may be the culprit. 

Cheers,
Bradley

richmitc
Champ in-the-making
Champ in-the-making
Yes, the Apache Tomcat service is likely Alfresco.  That is the default name.

As far as your access to CIFS, I would start checking firewall issues.  Are you trying to access CIFS from a different computer or the one Alfresco is running on?  If the same computer, are you trying to access as localhost, your machine name, or your machine IP address?

I don't remember what ports CIFS requires to be open.  I believe you can find that from other posts in this forum though.

To start, check if your Windows firewall is turned on.  If so, turn it off.  TEMPORARILY!  Check if CIFS works.  If so, turn the firewall back on, and go searching for the right ports.  Then go into the firewall and enable those.

Note, it might have nothing to do with firewall.

I wish you all the best….

Rich

derek
Star Contributor
Star Contributor
Hi,

I don't want to get in the way of a lively and helpful conversation, but I just wanted to check: Did you remove the custom-* files and replace them with appropriate ones for MySQL?

When CIFS appears to be offline, are you still able to login via the Web interface on http://localhost:8080/alfresco ?

Regards

richmitc
Champ in-the-making
Champ in-the-making
Derek,

Welcome!  I very much appreciate you joining in.

I'll let Bradley answer, but his posts seem to indicate the web interface was working.  I don't know if it is localhost though.

In regards though to the custom* files though…  I remember that as a "just remove" for MySQL.  Is that not correct?  Just checking as I may be doing that.

Thanks,

Rich

derek
Star Contributor
Star Contributor
Hi,

Just remove is for fast-preview using MySQL.  The tiny readme is not an admin guide.  The Wiki page, http://wiki.alfresco.com/wiki/Repository_Configuration#New_Installations is an essential read to avoid headaches later.  The 1.4 server should catch them for you, but it's better just to put it down solidly right up front.

Regarding the CIFS configuration, the alfresco.log will give more information.  If we get a look at those then Gary might be able to spot something.

Regards

richmitc
Champ in-the-making
Champ in-the-making
Thanks for the pointer to the MySQL setup information!  You were right.  I was just reading the readme.

Rich

dozyarmadillo
Champ on-the-rise
Champ on-the-rise
It's strange that the service is no longer installed for the community version. I'm sure that 1.4 did install the service. Does the enterprise version install the service?

Regards

Mark