11 Mar

Step by step installation of Alfresco Community 4.2.c on Windows Server 2008 R2 Standard 64bit… please, no bundle!

Alfresco Community 4.2.cAfter the high interest of the installation tutorial under Ubuntu plaform, in this post is shared the installation of Alfresco Community 4.2.c on Windows Server 2008 R2 Standard 64bit with Apache Tomcat 7.0.30 and PostgreSQL 9.0.10. The purpose installation is not the bundle installation but a more “robust” for an enterprise configuration. As we like and prefer the installation is a step by step list of commands and tasks… simpler to understand, to do and to test. Hope you’ll be agree.

Before starting…

In this tutorial I use a brand new Windows Server 2008 R2 Standard 64bit installation with a user called ‘alfresco’, different from the Administrator user. Connected as ‘alfresco’ user:

JDK 1.7u7


  • Download and execute ‘jdk-7u7-windows-x64.exe’.
  • Install the jdk in ‘C:AlfrescoJavajdk1.7.0_07’.
  • Install the jre in ‘C:AlfrescoJavajre7’.
  • Click on Start -> Digit ‘cmd’ and press enter.
java -version
  • Check the java version described.
  • Right click on ‘Computer’ -> Properties -> Advanced settings -> Environment variables -> New variable with name ‘JAVA_HOME’ and value ‘C:AlfrescoJavajdk1.7.0_07’ -> Press ‘Ok’ and close all.

ImageMagick 6.7.9-4

To enable image manipulation in Alfresco, we have to install and configure ImageMagick.
Official site: http://www.imagemagick.org/script/binary-releases.php#windows
Binaries: http://imagemagick.spd.co.il/binaries/

  • First of all download GhostScript 9.06 (gs906w64.exe) used to render PDF documents, from Google Code.
  • Install gs906w64.exe in ‘C:Alfrescogs9.06’.
  • Download ‘ImageMagick-6.7.9-4-Q16-windows-x64-static.exe’ from here.

ATTENTION: Other ImageMagik versions could not work.

  • Install ‘ImageMagick-6.7.9-4-Q16-windows-x64-static.exe’ in ‘C:AlfrescoImageMagick’.
  • During the installation, check flags: ‘Add application directory to your system path’ and ‘Associate supported file extensions with ImageMagick’.
  • Click on Start -> Digit ‘cmd’.
convert.exe -version
  • Check the version described.
  • Check the version described.

SWFTools 0.9.1

SWFTools is a collection of utilities to work with Adobe Flash files (SWF files).
Download it from ‘http://www.swftools.org/download.html‘.

  • Download ‘swftools-0.9.1.exe’ in the Windows section.
  • Install in ‘C:AlfrescoSWFTools’ for all users.
  • Do not create shortcut or other.
  • Right click on ‘Computer’ -> Properties -> Advanced settings -> Environment variables -> Select ‘Path’ -> Modify -> Add ‘;C:AlfrescoSWFTools’ at the end -> Press ‘Ok’ and close.
  • Click on Start -> Digit ‘cmd’
pdf2swf.exe -V
  • Check the version described.

LibreOffice Windows, version 3.5.7, English (GB)

LibreOffice is used to manage office documents.
Download site: http://www.libreoffice.org/download
Previous versions: http://www.libreoffice.org/download/?nodetect

  • Download and execute ‘LibO_3.5.7_Win_x86_install_multi.msi’.
  • Install for all the users.
  • Custom installation.
  • Install in ‘C:AlfrescoLibreOffice’.
  • Leave defaults (desktop link apart).
  • Click on Start -> Digit ‘cmd’.
  • LibreOffice will start.

Let’s discuss about tuning. Alfresco requires that Office runs headless as a hidden process. To do that:

  • Click on Start -> Digit ‘cmd’.
C:AlfrescoLibreOfficeprogramsoffice.exe "-accept=socket,host=localhost,port=8101;urp;StarOffice.ServiceManager" -nologo -headless
  • To check the Office processes: open the task manager where there are two different processes called “soffice.exe *32” and “soffice.bin *32”.
  • Select “soffice.exe *32” and terminate the process. Also the other will be terminated.
  • Click on Start -> Digit ‘notepad++.exe C:AlfrescoLibreOfficestart_oo.bat’ and create a new file.
@echo off

rem -----------------------------
rem -                           -
rem - START Resident OpenOffice -
rem -                           -
rem -----------------------------

C:AlfrescoLibreOfficeprogramsoffice "-accept=socket,host=localhost,port=8101;urp;StarOffice.ServiceManager" -nologo -headless
  • Save and exit.
  • Click on Start -> Digit ‘C:AlfrescoLibreOfficestart_oo.bat’.

ATTENTION: A command window will be opened with no content and never closed. Don’t worry, close it and everything will be fine.

  • Open the task manager and check again the two processes: “soffice.exe *32” and “soffice.bin *32”.

ATTENTION: Restarting the system, the Office headless processes will not restart. Remeber to execute the ‘start_oo.bat’ script otherwise no preview or Office documents will be managed by Alfresco.

PostgreSQL 9.0.10

Download from  ‘http://www.enterprisedb.com/products-services-training/pgdownload#windows‘.

  • Execute the installation.
  • Install in ‘C:AlfrescoPostgreSQL9.0’.
  • Set data folder as ‘C:AlfrescoPostgreSQL9.0data’.
  • Choose your own password.
  • Press next, next, next…
  • No added packages with StackBuilder.

Now it’s time to customize the PostgreSQL installation for Alfresco.

  • Click on Start -> PostgreSQL 9.0 -> SQL shell (psql)
  • Login as default user
  • q to exit
  • Click on Start -> PostgreSQL 9.0 -> SQL shell (psql)
  • Login as ‘alfresco’ user on the ‘alfresco’ db with password ‘alfresco’.
ALTER USER alfresco WITH PASSWORD 'alfresco';
  • q to exit

Tomcat 7.0.30

Download from ‘http://tomcat.apache.org/‘.

  • Download ‘Tomcat 7.0’ -> Quick Navigation -> Archives -> 7.0.30 -> bin -> apache-tomcat-7.0.30-windows-x86.zip
  • Unzip it in ‘C:Alfresco’ and rename ‘apache-tomcat-7.0.32’ in ‘tomcat’.
  • Click on Start -> Digit ‘cmd’
cd C:Alfrescotomcatbin
  • A command window will be opened with inside all the execution logs of the Tomcat start.
  • At the end, after few seconds, open a browser to the url: http://localhost:8080/
  • To stop the Tomcat server, in the command window, execute:

Let’s customize the Tomcat installation for Alfresco.

  • Click on Start -> Digit ‘C:Alfrescotomcatconf’.
  • Copy ‘catalina.properties’ in ‘catalina.properties.orig’.
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatconfcatalina.properties’
  • Replace the ‘shared.loader’ line, initially set empty, to this value
  • Save and exit.
  • Copy ‘server.xml’ in ‘server.xml.orig’.
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatconfserver.xml’
  • Add ‘URIEncoding=”UTF-8″‘ to:
<Connector port="8080" protocol="HTTP/1.1"...
  • Save and exit.
  • Click on Start -> Digit ‘C:Alfrescotomcatconf’.
  • Copy ‘context.xml’ in ‘context.xml.orig’.
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatconfcontext.xml’
  • Add this line between the ‘<Context>’ starting and closing tag.
<Valve className="org.apache.catalina.authenticator.SSLAuthenticator" securePagesWithPragma="false" />
  • Save and exit.
  • From the Alfresco package ‘alfresco-community-4.2.c.zip’ extract the ‘postgresql-9.0-802.jdbc4’ from the ‘web-serverlib’ folder and copy it in ‘C:Alfrescotomcatlib’.

Alfresco Community 4.2.c

  • Click on Start -> Digit ‘C:Alfrescotomcat’
  • Create folder ‘endorsed’.
  • Create folder ‘shared’.
  • Create folder ‘shared/classes’.
  • Create folder ‘shared/lib’.
  • Unzip the ‘alfresco-community-4.2.c.zip’ package in ‘C:Alfrescotomcat’.
  • Move all the content of the folder ‘web-server/endorsed’ in ‘endorsed’.
  • Move all the content of the folder ‘web-server/shared’ in ‘shared’.
  • Move all the content of the folder ‘web-server/webapps’ in ‘webapps’.
  • Delete the file ‘README.txt’.
  • Delete the folder ‘web-server’.
  • Right click on ‘Computer’ -> Properties -> Advanced settings -> Environment variables -> Select ‘Path’ -> Modify -> Add ‘C:Alfrescotomcatbin’ -> Press ‘Ok’ and close.
  • Click on Start -> Digit ‘C:Alfrescotomcatsharedclasses’
  • Copy ‘alfresco-global.properties.sample’ in ‘alfresco-global.properties’
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatsharedclassesalfresco-global.properties’.
  • Change the settings as described below, leaving all the rest not modified.
# IMPORTANT: Leave the comment on the dir.keystore property.
# External locations
# LibreOffice installation
# ImageMagick installation
# SWFTools exe
  • Save and exit.

Now it’s time to define the start/stop script.

  • Click on Start -> Digiti ‘notepad++.exe C:Alfrescoalfresco.bat’
  • Of course create it with this content.
@echo off

rem ---------------------------
rem -                         -
rem - Start and Stop Alfresco -
rem -                         -
rem ---------------------------

set ALF_HOME=C:Alfresco
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx768m -Xss768m -server -XX:MaxPermSize=256M

if /I "%1"=="start" goto :start
if /I "%1"=="stop" goto :stop
echo Usage: alfresco.bat [start stop]
goto :end

goto :end

goto :end

  • Save and exit.
  • Click on Start -> Digit ‘cmd’ -> Right click on ‘cmd’ and execute it as administrator.
cd C:Alfresco
alfresco.bat start
  • A command window will be opened with inside all the execution logs of the Alfresco start.
  • Some minutes should be enough…
  • During bootstrap no error should appear.
  • At the end, open a browser and access to the url ‘http://localhost:8080/share’.

Last but not least, remember to copy ‘C:AlfrescotomcatbinWin32NetBIOSx64.dll’ in ‘C:WindowsSystem32’. This is usefull to make work the CIFS access to Alfresco on this Windows platform.

That’s all…

66 thoughts on “Step by step installation of Alfresco Community 4.2.c on Windows Server 2008 R2 Standard 64bit… please, no bundle!

  1. Avatar

    What permission level do you give the ‘alfresco’ user? Or to ask another way, which security group(s) is the user a member of?

    • Francesco Corti

      Hi Orion,

      I usually add the alfresco user to the sudoers to correctly install everything is necessary.
      I usually create the alfresco user with the default alfresco group without specific permits.
      Hope this help you.

  2. Avatar

    Thank you for your quick response.

    But you stated “In this tutorial I use a brand new Windows Server 2008 R2 Standard 64bit installation with a user called ‘alfresco’, different from the Administrator user. Connected as ‘alfresco’ user:”

    So, this is about installing on a windows server, correct? So when you create a new user called Alfresco, it will be a member of a windows security group…so my question is, what should it be a member of?

    • Francesco Corti

      Hi Orion,

      I apologize but I thought this tutorial was the one on the Linux platform so I gave you the wrong answer for the Windows platform. SOrry for this.

      Back to your question: in our cases we set the alfresco user as Administrator type but we avoid to use the default Administrator user.

      Let me know if you find or set the user in a different way… and Alfresco runs fine. 😉

  3. Avatar

    Hi, Francesco —

    Thanks for the great document: it’s very helpful. I’m far enough along that I’m trying to resolve the “Win32NetBIOSx64” issue. I don’t seem to be able to find a copy of this file as a result of unpacking the Alfresco 4.2.c WAR zip file, or in our Tomcat-7 stuff. Can you provide any additional information about this guy — or how to disable the need for it in Alfresco-global.properties, please?

    Thanks for your time.


      • Avatar

        Hi, again, Francesco —

        Thanks for the speedy reply, and for reminding me of the zip file. I had unpacked the WAR file from it several weeks ago and had then dismissed the zip file.

        I’ve been putting together a document like yours for a few weeks now, and just saw yours yesterday. After reading yours, I doubt there’s much that you don’t already know. Still, one thing that I learned when trying to address our SSL needs for our Alfresco server is to create the Tomcat server’s certificate request with a “Subject Alternative Name” (“SAN”) entry: this allows users to specify the alfresco sever’s URL as, say, “https://alfrescoServer.yourCompany.com/alfresco” or “https://alfrescoServer/alfresco” without annoying the browser. Perhaps you already knew this as well, but I hope it may be some return for what you’ve provided.

        In any case, thanks for the great document: it was very helpful to me.


  4. Avatar

    Hi Francesco

    Great Article. How do you setup Tomcat so it runs as a service and does not get killed when the alfresco user logs out i.e. how do you change the user to a system user?

    Have you ever setup Alfresco using MySQL DB?

    Thanks Mark

    • Francesco Corti

      Hi Mark,

      Thank you for your feedback.

      Regarding your first question: even if you run alfresco from a command line, when you logout as alfresco user, the tomcat still continue to work correctly.
      If you want to do something like ‘service alfresco start’ to run alfresco you can edit a new file ‘/etc/init.d/alfresco’ with this content:

      #!/bin/sh -e
      if [ “$1” = “start” ]; then
      su – alfresco “${ALFRESCO_SCRIPT}” “start”
      elif [ “$1” = “stop” ]; then
      su – alfresco “${ALFRESCO_SCRIPT}” “stop”
      elif [ “$1” = “restart” ]; then
      su – alfresco “${ALFRESCO_SCRIPT}” “stop”
      su – alfresco “${ALFRESCO_SCRIPT}” “start”
      echo “Usage: /etc/init.d/alfresco [start|stop|restart]”

      In production environment, please remember to put the ‘service alfresco start’ in the ‘rc.local’ file. 😉

      Regarding the second question, about MySql, of course yes!
      Alfresco works perfectly even with MySql.
      The approach to scripts/services/installation are exactly the same of the article but with custom commands for the different database and few different configurations for it.

      Hope this will help you.

  5. Avatar

    Hi Francesco Corti

    Thanks for the great document: it’s very helpful. But I got a Error message is : Your authentication details have not been recognized or Alfresco may not be available at this time

    Thanks for your time

    Stalin Louis

      • Avatar

        Hi Francesco Corthi..

        Thanks for your speedy reply.now it’s working properly.But i have one more doubts,i need to install Record management amp files in my Alfresco Community 4.2.e version… tell me any possible guide link

        thanks for your time

  6. Avatar

    Hi Franseco Corti i had some question about cifs on windows 7, so i had a problem when i trying to access the cifs it need authentication user and password but when i insert the password and username i got that the authentication failed, do i need to copy Win32NetBIOSx64.dll to system32 since i install alfresco not community but enterprise?

    and if it’s not what should i configure so i could use cifs on windows 7?

    because i red on alfresco forum they said i should uninstall file and printer sharing what do you think?

  7. Avatar

    Hi Francesco

    Great Article. I want plugin Activiti on my Alfresco Community 4.2.c ,I Want to add a new Workflow.
    How to add the plugin And Customize Workflow,kindly provide the solution for this…

    Thanks & Regards
    Stalin Louis

  8. Avatar

    Hi think you for your great Article
    I have followed this tutorial step by step ,i have access to the authentification page of alfresco ,but i still not able to be authentified i try the default username and password ADMIN ADMIN but it doesn’t work ,have u a suggestion?

  9. Avatar

    Hi Fransesco,

    Great tutorial! But I’ve problem about first Authentication user/pass into Alfresco after installation. I typed username and password. When I press login button, it’s nothing happened. The Login button was disabled. How could I fix this error?

    Thanks and Regards,

      • Avatar

        Hi Francesco,

        Yes, by using Firefox I see the error message exactly “The remote server may be unavailable or your authentication details have not been recognized.” When I checked the alfresco.log:
        WARN [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
        org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class ‘org.postgresql.Driver’
        I’ve tried copy jar JDBC driver into TOMCAT_HOME/lib but it doesn’t work properly. Have you any suggestion?

        Thanks and Regards,

    • Avatar

      i can pass now . I install again from start and check detail. It’s my bad. In fact, I have error that [Error: missing ‘server’ JVM at ‘C:AlfrescoJavajre7binserverjvm.dll’] . Now i solved it and i get alf_data. Sorry for my interrupt again and again . I am just a beginner and i have your post only one to refrence. Thanks you so much . 😀 😀 Now i have only problem that [java.lang.OutOfMemoryError: PermGen space] . i will fix that and i think i can run successfully .

    • Avatar

      Yes, you understand now, but please, what did you do? It may help other. This whole thing is about providing solution. Thank you.

  10. Avatar

    At first I want to thank you for this tutorial, it is very helpful 😀 I want to know how can i log in as an administrator for alfresco after this installation

  11. Avatar

    Dear Francesco ,
    The problem that i don’t find the directory tomcat/webapps/alfresco after this installation to configure the authentication.

  12. Avatar

    Hi Francesco,
    The LDAP authentication works perfectly, thank you for your quick responses.
    Now, I will try the external authentication with OpenAM 🙂

  13. Avatar

    Hi Francesco,

    I was struggling with the installation finally your blog saved my life.
    Thanks for such an explanatory article, now I am able to login to share and alfresco explorer.
    But As I am new Bee and i have a requirement to setup the same in Enterprise edition. But nowhere i am able to find “alfresco-enterprise-4.2.zip” file.
    Can you please tell me is it possible to setup enterprise edition the same way?
    If yes, can you please help me with that?

    Thanks in advance

    • Francesco Corti

      Hi Monendra,
      I’m happy you find the tutorial useful.
      You can download the zip file for the Enterprise distribution in the partners section of Alfresco otherwise you are not authorize to use and install it (except for a trial of 30 days).

  14. Avatar

    hi Francesco, thank you for this informative tut.
    I am having issue with the browser, it looks something to do with the CSS but I am not sure. when I open the admin dashboard (using Chrome & Mozilla) the half of “my Dashboard” button in the top left corner is missing plus when I am resizing the page its not showing any horizontal scroll bar which make the page contents looks like pasta with white sauce.

    i am using community edition 4.2

    any suggestions ?


  15. Avatar

    hi Francesco thank you for your tutorial
    i just have one question , i want to install alfresco on windows 7 x86
    and i just want know if i can do it with the step of your turtorial and x86 version of different requiere component
    Best Regards

    • Francesco Corti

      I would like to develop a new version of the tutorial but you can suppose the steps are more or less the same.
      Please, share the precise steps once you test into your environment so other people could benefit.
      Thank you for contribution.

  16. Avatar

    Francesco thank you for the post. I am facing an issue though.

    In the last step during the execution of the command “alfresco.bat.start” i get an error ermSize is not recognized as an internal or external command, operable program or batch file.

    Do you guess why I am facing this issue?


  17. Avatar

    Hi Francesco Corti
    thanks for the installation guide.
    I did install it on windows 7 using the lateset alfresco community 5 version.
    everything works fine except the startup time it takes in the browser.
    when i launch http://localhost:8080/share or alfresco first time it takes about 4 minutes to start .My Java_OPTS are set to 512 and 768 .
    My Pc has 4 gb ram .what will make it faster .


    • Francesco Corti

      Hi Rida,
      Nice test for this tutorial!
      Thank you for sharing your experience.
      Regarding your question: Alfresco is always a little bit slow during the startup and the very first time it takes more time because of the database setup.
      So, my first suggestion is to measure the startup time in the second time, not before.
      In every case, if you want to make the startup faster, you can set up:
      -Xmx3G -XX:MaxPermSize=256M
      (you can take a look at https://wiki.alfresco.com/wiki/JVM_Tuning)

  18. Avatar

    I am new to Apache Tomcat, but would like to do the following in a default install of Alfresco Community Edition 4.2.f on Windows 7.
    1. I would like the user to type the address http://servername rather than http://servername:8080/share/page/ and be directed to the Alfresco Community login page. This is a test platform, not interested in DNS setup or changing /etc file changes at the moment. Been searching how to do this for awhile. Your help is appreciated.

  19. Avatar

    Hi Francesco, I found very good your article.
    but I have a question, what do you mean with “robust” in
    “The purpose installation is not the bundle installation but a more “robust” for an enterprise configuration”

    what is the difference – for the enterprise – with an advanced installation (not easy) using the setup wizard?
    when using one or the other?

    • Francesco Corti

      Hi Mauricio,
      Sorry for the delay in my reply.
      When you install Alfresco using the wizard, all the dependencies, scripts and modules are installed as a “generic single thing”.
      This means that you can’t control everything as a separate component (for example: would be simple to update only Libre Office or FFMpeg?).
      With this installation you will be able to control every single component independently (you could update PostgreSql quite safely).
      Of course this does not means that this way to install Alfresco is easier. 😉
      Finally, I suggest you to use the wizard in a development or non-production environments.

  20. Avatar

    Hi Francesco, I would like to thank you for that great tutorial. It is really helpfull especially for beginners.
    I will have one question. I followed all the steps u told. But when I execute the command “alfresco.bat start ” nothing happens. A command window appeals but i disappear quickly and I can’t acceed to the URL.
    Could you help me resolve this problem ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.