cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Installation


Introduction


This page describes the process of installing Alfresco 3.2r2 CE in the packaged XAMPP bundle on a Windows platform.  The test system is Windows XP, however these instructions should also work with XAMPP on other variants of windows, linux and macintosh. 

Alfresco has a Windows installer which may be more appropriate for the casual user without much configuration to perform.  The Alfresco installer is an all-in-one solution which includes everything required and which starts and stops MySQL and Tomcat with a single menu selection. XAMPP, on the other hand, installs many things which are not strictly required (Apache, Perl, PHP, etc.) and fails to install Alfresco.  XAMPP provides a convenient status and control panel from which each of the components may be started and stopped individually.  In addition, the XAMPP package also includes the phpMyAdmin tool to aid database management.

The ability to start components individually is critical for 'development' deployments where configuration issues are being debugged.  In particular, the case where you must troubleshoot user import from LDAP or active directory requires that you stop tomcat while leaving the MySQL server running.  Having access to phpMyAdmin is 'gravy' if you're familiar with the command line tools, but is convenient in any case. 

Deploying Alfresco within the XAMPP environment also affords users the opportunity to configure the Apache webserver to frontend Tomcat.  Not only does this eliminate the somewhat annoying ':8080' at the end of the hostname, it allows Apache to handle the details involved with SSL and HTTPS.

The instructions on this page are not meant for use on a production server.  There are additional steps you must take to secure your server if you intend to use this in a production environment.  (See XAMPP security.)


Prerequisites


These instructions assume that a sun Java runtime environment (1.5+) is already installed and the 'JAVA_HOME' environment variable is properly set.


Install XAMPP and the Tomcat addon


  1. Download the current XAMPP For Windows installer (version 1.7.3 as of this writing).
  2. From the same page, download the Tomcat add on (Tomcat version 6.0.20 as of this writing).
  3. Run the XAMPP installer.
  4. Run the XAMPP Tomcat installer.

By default, this will place everything in a directory called 'C:\xampp'.  The remainder of this document assumes that 'C:\xampp' is the install directory, so adjust your paths appropriately if you did something different.  This document also assumes that you chose to put a shortcut to the 'XAMPP Control Panel' on your desktop.


Prepare Tomcat for Alfresco


As discussed in Install Tomcat6, the newest version of Tomcat requires more setup than the old version (version 5.x.x and below).  This additional setup is summarized here.


  1. Create the shared classes directory ('C:\xampp\tomcat\shared' and 'C:\xampp\tomcat\shared\classes')
  2. Create the endorsed libraries directory ('C:\xampp\tomcat\endorsed')
  3. Edit the 'shared.loader' line in 'C:\xampp\tomcat\conf\catalina.properties' to list the shared classes directory and all of the jarfiles in the endorsed libraries directory.  (See step #4 on Install Tomcat6.)
  4. Edit the 'JAVA_OPTS' environment variable in 'C:\xampp\tomcat\bin\setenv.bat' to read '-Xms128m -Xmx512m -Xss96k -XX:MaxPermSize=128m -server -Dcom.sun.management.jmxremote'
  5. Download the MySQL JDBC driver to 'C:\xampp\tomcat\lib'

Prepare the MySQL database


Alfresco will initialize an empty database on its first run.  However, it will not create the database, nor will it create its own user. 


  1. Start the XMAPP control panel (using the shortcut on the desktop or the menu option).
  2. Using the XMAPP control panel:
    1. Click the start button for 'Apache' and wait for a status message to appear and say 'Running'.
    2. Click the start button for 'MySQL' and wait for a status message to appear and say 'Running'.
    3. Click the Admin button for 'MySQL'; Alternatively, start a web browser manually and type 'http://localhost/phpmyadmin' in the address bar.
  3. Create the alfresco user and database using the web browser pointed to phpMyAdmin on localhost:
    1. Observe that you are automatically logged in as the privileged database user.
    2. Click on the 'Privileges' tab.
    3. Click on the 'Add a new user' link
    4. Type 'alfresco' in the text box next to 'User name:'
    5. From the 'Host:' drop down box, select 'Local'
    6. Type 'alfresco' (or a password of your choice) in the 'Password:' and 'Re-Type:' text boxes.
    7. Select the 'Create database with same name and grant all privileges' radio button in the 'Database for user' section.
    8. Select the 'Check All' link in the 'Global Privileges' section.
    9. Click on the 'Go' button.
    10. If everything worked, the page should reload with a green check mark at the top and a message saying something to the effect that 'you have created a new user'

Download and Deploy Alfresco 3.2r2 CE


  1. Using a browser, navigate to Community Edition file list 32r2 or whatever release is current.
  2. Download the zipfile containing the 'WAR' file (but not tomcat).  This should be annotated with 'Alfresco war files for deployment into existing application servers'.
  3. Unzip the Alfresco distribution to someplace harmless, like 'C:\Alfresco'.  Do not unzip this file inside the tomcat webapps directory.
  4. Move all files from C:\Alfresco\endorsed to C:\xampp\tomcat\endorsed
  5. Move C:\Alfresco\extensions to C:\xampp\tomcat\shared\classes
  6. Rename C:\xampp\tomcat\shared\classes\extensions to 'alfresco' in the same directory.
  7. Copy C:\xampp\tomcat\share\classes\alfresco\extension\alfresco-global.properties up two directories to C:\xampp\tomcat\share\classes
  8. Edit the copy of 'alfresco-global.properties' file made in the previous step. 
    1. Change the 'dir.root' property to read 'dir.root=C:/Alfresco/alf_data' (Note that the slashes go 'forward' instead of 'backwards'.)
    2. Take this opportunity to set the correct paths to any optional software installed on the target system, particularly the properties: 'ooo.exe', 'img.root', and 'swf.exe'
  9. Deploy the warfiles to tomcat:
    1. Navigate to C:\Alfresco
    2. Select 'alfresco.war', 'share.war', and 'mobile.war'
    3. Right click over one of the selected files and pick 'Copy' or 'Cut' from the context menu.
    4. Navigate to C:\xampp\tomcat\webapps
    5. Select Edit -> Paste

Starting and Stopping Alfresco


To perform a 'cold start' of all the components, use the XAMPP control panel to start MySQL, then Tomcat (waiting for confirmation that MySQL is running before starting Tomcat.)  To shut everything down, use the XAMPP control panel to stop Tomcat, then MySQL (waiting for confirmation that Tomcat is stopped prior to shutting off MySQL). 

Obviously one of the main reasons to choose this deployment method over the all in one installer is the ability to leave MySQL running when tomcat has been stopped.  This allows you to make configuration changes, delete C:\Alfresco\alf_data, and drop/re-create the alfresco database.  This is an effective means of deleting all users (as well as everything else).  Restarting tomcat will then cause alfresco to re-initialize its repository and database and re-bootstrap whatever users exist in the defined user registries.


Operational Notes


  • If anything causes an exception to be thrown, the java process running tomcat is likely to hang and not die when tomcat terminates.  You will need to manually kill the javaw process if this happens (Ctrl-Alt-Del, click on 'Task Manager', click on the 'Processes' tab, select the 'javaw' process and select the 'End Process' button.)  The XAMPP control panel will show a 'Running' status for Tomcat until the 'javaw' process dies, so if the control panel says that tomcat is running and you can't connect, hunt down and kill javaw.  (Note: the exception to this rule is when you've just started tomcat: it can take almost ten minutes to start, particularly the first time, when Alfresco is initializing its database schema and tomcat is exploding the WARfiles.)
  • The 'alfresco.log' file is in C:\xampp\tomcat.
  • With this configuration, the repository store is C:\Alfresco\alf_data