2. Support Engineering Group : alfresco-test.shore.mbari.org Installation Notes This page last changed on Dec 17, 2010 by kgomes. In order to properly have a test environment for our Alfresco installation, I went ahead and setup a HP xw4100 with Windows Server 2003 (SP-2) and setup an instance of Alfresco on that machine. Here are the steps I completed. Logged into alfresco-test.shore.mbari.org as a local admin (my user account). Downloaded Java 6 SE Development Kit Update 5 from java.sun.com and then double-clicked on the .exe.
   | I installed it to c:\bin\Java
12. I added a Environment variable to the server named 'JAVA_HOME' and pointed it to 'C:\bin\Java\jdk1.6.0_05' I then added ';%JAVA_HOME%\bin' to the end of the existing PATH environment variable I then went to http://customers.alfresco.com I logged in using kgomes@mbari.org as the username and the password that was supplied in an email to me from Alfresco I browsed to 'Company Home'>'Downloads'>'2.1 Releases'>'2.1.1' I changed to the 'Details View', made 40 items visible, and then downloaded 'alfresco-enterprise-tomcat-2.1.1.zip' file. I then unzipped the downloaded file to c:\bin which created an alfresco-enterprise-tomcat-2.1.1 folder in c:\bin. I renamed the alfresco-enterprise-tomcat-2.1.1 folder to simply alfresco. I then went back to the web browser and went to 'Company Home'>'Downloads'>'2.1 Releases'>'2.1.1'>'License Files' I am not sure if I can do this with our agreement, but I downloaded the 'enterprise-network-customer-unlimited.lic' file.
    | I did get approval from Joe Van De Graaff at Alfresco to use the license for a test installation to get us through this issue.
18. I logged out of the Alfresco customer web site. I Googled on jTDS to find the jTDS JDBC driver and downloaded the jtds-1.2.2-dist.zip file from the website. Using Windows Explorer, I could just open the jTDS zip file and copy the jtds-1.2.2.jar file. I then pasted it in the directory c:\bin\alfresco\tomcat\common\lib directory. I created a c:\data\alf_data directory where the alfresco data will be stored. This is different from the production installation in that the content is stored on a network appliance (\\tornado.shore.mbari.org\alfresco). I installed a copy of SQL Server 2005 locally to use for the database to back the Alfresco test install.
    | In order to do this without warnings, I had to go back and install IIS through the Add/Remove Programs Control Panel.
21. 1. 1. I used the Local System account to run services and only used Windows Authentication logins I installed all the service packs and the SQL Server Management Studio product to admin DBs. In SQL Server, I added the SHORE\DB_Collaboration accounts to the logins. I created a new database named alfresco-test and made SHORE\DB_Collaboration the owner. I then went to the c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions directory for the customization of the server. I edited the custom-repository.properties file Changed the dir.root and dir.indexes to look like:
              dir.root=c:/data/alf_data
              dir.indexes=c:/data/alf_data/lucene-indexes
       3. Commented out the db.* lines for the HSQL Connection (db.driver and db.url) Uncommented the db.* lines for MSSQL and changed to use the jTDS driver. They should look like (except the password should be the right one):
              db.driver=net.sourceforge.jtds.jdbc.Driver
              db.url=jdbc:jtds:sqlserver://localhost/alfresco-test;domain=SHORE;user=DB_Collaboration;password=XXXXXXXXX
       4. I also added the following section to override the mail server settings
              # Mail server configuration
              mail.host=mail.mbari.org
              mail.port=25
              mail.username=
              mail.password=
22. Edited the custom-hibernate-dialect.properties file Commented out the HSQL Dialect Uncommented the MSSQL Dialect Now this is not necessarily fun, but in order to really get it configured the way we want it, you need to pull the original .war file out, edit some stuff inside and re-create the .war.
    | This should all be done before starting Alfresco for the first time.
25. Copy the c:\bin\alfresco\tomcat\webapps\alfresco.war file to your home directory. Make a second copy so that you will always the original (I copied to alfresco.war.orig and moved it somewhere else. It is important to move it and have only the alfresco.war file in the directory because when you un-jar it, all the files go right where alfresco.war is.) From a command line, un-jar the war file using:
        jar -xvf alfresco.war
27. 3. This unpacks a lot of files and after it completes, move (or delete) the alfresco.war file from the directory. This needs to be done so it does not end up in the new .war file. I wanted to change the "Company Home" that seems to be everywhere to something that says MBARI. Edited ./WEB-INF/classes/alfresco/messages/webclient.properties and changed company_home from 'Company Home' to 'MBARI Test' Edited ./WEB-INF/classes/alfresco/messages/webclient_en_US.properties and changed company_home from 'Company Home' to 'MBARI Test' I edited ./WEB-INF/classes/alfresco/messages/bootstrap-spaces.properties and changed the first two lines to read
           spaces.company_home.name=MBARI Test
           spaces.company_home.description=The root of MBARIs Test Alfresco Server
    4. Edited ./WEB-INF/classes/alfresco/messages/bootstrap-spaces_en_US.properties and made the same changes as the previous step
       | This took a bit to find all these, and to be honest, I am not sure which one actually made the change on the GUI, but I suspect it was the _en_US ones.
28. When users are imported via LDAP, user spaces get created automatically. In order to put them where I wanted them to go (instead of right in the Company Home), I edited the ./WEB-INF/classes/alfresco/authentication-services-context.xml file. In the file there is a bean with an name of personalHomeFolderProvider. There is a property name 'path' and I added
        /${spaces.user_homes.childname}
    to the end to try to get them to create the user spaces there instead of in the Company Home. The final bean XML looks like:
            <bean name="personalHomeFolderProvider" class="org.alfresco.repo.security.person.UIDBasedHomeFolderProvider">
                <property name="serviceRegistry">
                    <ref bean="ServiceRegistry" />
                </property>
                <property name="path">
                   <value>/${spaces.company_home.childname}/${spaces.user_homes.childname}</value>
                </property>
                <property name="storeUrl">
                   <value>${spaces.store}</value>
                </property>
                <property name="homeFolderManager">
                    <ref bean="homeFolderManager" />
                </property>
                <property name="inheritsPermissionsOnCreate">
                    <value>false</value>
                </property>
                <property name="ownerPemissionsToSetOnCreate">
                    <set>
                        <value>All</value>
                    </set>
                </property>
                <property name="userPemissions">
                    <set>
                        <value>All</value>
                    </set>
                </property>
            </bean>
29. I wanted to change the logo that is used. I attached the replacement Alfresco Logo. Copy this to ./images/logo and overwrite the one that is there.
    | Note that I did NOT setup SSL for this installation so if I will need to come back and do that if I want truly parallel systems
30. Now in order to change the default behavior so that all content is versioned from the start, I edited the .\WEB-INF\classes\alfresco\model\contentModel.xml and searched for the content type definition block.
              <type name="cm:content">
                 <title>Content</title>
                 <parent>cm:cmobject</parent>
                 <archive>true</archive>
                 <properties>
                    <property name="cm:content">
                       <type>d:content</type>
                       <mandatory>false</mandatory>
                       <!--- Index content in the background -->
                       <index enabled="true">
                          <atomic>true</atomic>
                          <stored>false</stored>
                          <tokenised>true</tokenised>
                       </index>
                    </property>
                 </properties>
              </type>
    and added the following block right before the ending </type> tag:
                 <mandatory-aspects>
                    <aspect>cm:versionable</aspect>
                 </mandatory-aspects>
    so the final block looks like:
              <type name="cm:content">
                 <title>Content</title>
                 <parent>cm:cmobject</parent>
                 <archive>true</archive>
                 <properties>
                    <property name="cm:content">
                       <type>d:content</type>
                       <mandatory>false</mandatory>
                       <!--- Index content in the background -->
                       <index enabled="true">
                          <atomic>true</atomic>
                          <stored>false</stored>
                          <tokenised>true</tokenised>
                       </index>
                    </property>
                 </properties>
                 <mandatory-aspects>
                    <aspect>cm:versionable</aspect>
                 </mandatory-aspects>
              </type>
34. That takes care of all the changes to the WAR file. We can now put it back into .war form. While you are in the directory you expanded the war file in, run jar cvfm alfresco.war META-INF\MANIFEST.MF . You should now have an alfresco.war file in the directory. Move that back to the alfresco install and overwrite the existing one. Most users like the details view, so I set the default to that by editing c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions\web-client-config-custom.xml and added:
        <!-- MBARI Custom: Added this to change the default view to details -->
        <config evaluator="string-compare" condition="Views">
              <!-- the views available in the client -->
              <views>
                 <!-- default values for the views available in the client -->
                 <view-defaults>
                    <browse>
                       <!-- allowable values: list|details|icons -->
                       <view>details</view>
                       <page-size>
                          <list>20</list>
                          <details>20</details>
                          <icons>20</icons>
                       </page-size>
                    </browse>
                 </view-defaults>
              </views>
        </config>
35. 1. right before the closing </alfresco-config> tag. Now in order to use MBARI accounts, NTLM authentication was turned on and then chained with the native Alfresco accounts so that we could have non-MBARI accounts on the Alfresco server. For simplicity sake, I have attached the files and you can simply download and install them in the c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions directory.
       | Before doing these next steps, rename the file-servers-custom.xml file to file-servers-custom.xml.orig so you will have a backup of the original
       5. First install the CLT:NTLM Configuration XML File Next install the CLT:Authentication Chaining Configuration File Next install the CLT:CIFS configuration file and over-write the existing one. Now in order to setup a job that imports users and groups once a day, download and install the CLT:LDAP configuration file. The ldap sych XML file simply contains all the configuration information with properties to hold the actual values for your installation. To define these properties, I installed the following CLT:properties file. If you are setting up your own installation, you will change these properties for your install.
          | In the CIFS configuration file, make sure you change the <host name=""> tag to reflect a unique name on the network.
       6. Next install the CLT:customized authority configuration file (this gives administrative privs to certain accounts).
          | Note that I did NOT change the server to take over port 80 traffic as the SQL Server install seemed to want IIS which is currently using port 80
36. Now in order for the alfresco web application to be the default, I edit the c:\bin\alfresco\tomcat\conf\server.xml file and added:
                <Context path="" docBase="alfresco" debug="0" >
                  <Valve className="org.apache.catalina.authenticator.FormAuthenticator" disableProxyCaching="false" />
                </Context>
    as the last line of the <Host> tag section (right before the closing </Host> tag).
    | You will also notice the Valve tag that I had to add to turn off proxy cache disabling so that IE clients would work correctly over SSL. Gotta love M$.
38. Just to keep things clean, I edited the c:\bin\alfresco\alfresco.bat file and put 'rem' in front of the second JAVA_OPTS set as I am using Java 6. You are now actually ready to start alfresco for the first time! Open a command window and cd over the to c:\bin\alfresco directory and then type:
        alf_start.bat
40. After a long time (took several minutes on a regular PC), look at the alfresco.log file in the c:\bin\alfresco directory and see if it looks like everything started OK, you can also check the database to see if the tables have been created in the alfresco-test database. You should also be able to go to http://alfresco-test.shore.mbari.org:8080 and see the alfresco web application. Now from the command window where you ran alf_start.bat, run alf_stop.bat to shut the server down. Check the alfresco.log file to see if anything weird happened. If not, try restarting it with alf_start.bat again and look at the alfresco.log file. Sometimes, you can't restart it because you get:
        java.sql.SQLException: Column names in each table must be unique. Column name 'ID_' in table 'JBPM_ACTION' is specified more than once.
    Sigh, so in order to keep Alfresco from hurting itself, you might have to turn off the schema updates. This is done by editing the c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions\custom-repository.properties and adding the following:
        db.schema.update=false
41. and then restarting alfresco. To install Alfresco as a Windows Service use a command prompt and enter the following:
        cd c:\bin\alfresco\tomcat\bin
        service.bat install alfresco
        tomcat5.exe //US//alfresco --DisplayName "Alfresco Server"
        tomcat5.exe //US//alfresco --JvmMs=512 --JvmMx=1024 --JvmSs=64
        tomcat5.exe //US//alfresco --JavaHome=c:/bin/Java/jrockit-R27.4.0-jdk1.6.0_02
        tomcat5.exe //US//alfresco --Environment ALF_HOME=c:/bin/alfresco/
        tomcat5.exe //US//alfresco --Environment PATH=c:/bin/alfresco/bin;%PATH%
        tomcat5.exe //US//alfresco --StartPath c:/bin/alfresco --Startup auto
42. To uninstall the service, at a later time, do the following:
        cd c:\bin\alfresco\tomcat\bin
        service.bat uninstall alfresco
43. To edit your service settings at any time:
        cd c:\alfresco\tomcat\bin
        tomcat5w.exe //ES//alfresco
    | These next couple of steps had to be taken to install a patch from Alfresco for an issue with bulk uploads I was having. Essentially when file and path structures get really long and nasty, Alfresco was throwing an error and bailing out. This patch (two Java classes) fixed that issue.
48. Next, I downloaded the attached CLT:JAR file and copied it to the c:\bin\alfresco\tomcat\webapps\alfresco\WEB-INF\classes directory. I shutdown Alfresco and then unjarred the file to install the new classes. They are: org/alfresco/filesys/smb/server/SMBSrvPacket.class org/alfresco/filesys/util/DataBuffer.class I would assume since they do not overwrite anything, that this location is further up in the class loader and so it will load these new classes first. I deleted the act2139.jar file and the META-INF directory that the unjarring process created. I did not do this, but you can verify this took, I run alfresco with the
        CATALINA_OPTS="-verbose:class"
    and verifyied that you can find some line, some where, that shows:
        [Loaded org.alfresco.filesys.smb.server.SMBSrvPacket from file:/opt/alfresco211/tomcat/webapps/alfresco/WEB-INF/classes/org/alfresco/filesys/smb/server/SMBSrvPacket.class]
    and NOT:
        Loaded org.alfresco.filesys.smb.server.SMBSrvPacket from file:/opt/alfresco211/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository.jar]
Attachments: ntlm-authentication-context.xml (text/xml) chaining-authentication-context.xml (text/xml) file-servers-custom.xml (text/xml) custom-authority-services-context.xml (text/xml) ldap-synchronisation-context.xml (text/xml) ldap-synchronisation.properties (application/octet-stream) ldap-synchronisation.properties (application/octet-stream) act2139.jar (application/octet-stream)

Document generated by Confluence on Feb 03, 2026 16:22