Category Archives: Alfresco

Troubleshooting Alfresco’s JMX Console Connections

Most of the time, I can get jconsole to make a JMX connection to a running instance of Alfresco but there are times when I will run into issues or a customer simply can’t seem to make it work. Below are some troubleshooting steps to getting JMX working and make a connection to it.

Make sure that the Alfresco server does not have a NAT network connection. If you’re not sure what this is, you can ask your network administrator to check and tell you for sure. I realize I have this first in the list but usually this isn’t the cause. I would suspect this as the issue only if the following troubleshooting fails and you simply can’t get it working.

Make sure you have this somewhere in your java_opts:

-Dcom.sun.management.jmxremote

This tells the running JVM to start the jmx service.

Make sure you have this in your alfresco-global.properties:

alfresco.rmi.services.port=50500
alfresco.rmi.services.host=<hostname>

The <hostname> should be resolvable using ping from the workstation from where you are running jconsole.

Make sure you connect with the jconsole in the java/bin/ using the JDK you’re using to run Alfresco with. In other words, you may have another JDK installed elsewhere and jconsole from that JDK may be on your path. It’s a good idea to do a `whereis jconsole` to see which path it comes from. If nothing else, go directly to the java/bin directory in your Alfresco install and use the jconsole executable there. This is the standard url to use when connecting:

service:jmx:rmi:///jndi/rmi://<hostname>:50500/alfresco/jmxrmi

If you’re running this on the local server, you may want to try localhost for hostname. In any case, make sure that <hostname> is set to a reachable domain name on the network. IP Address might not be a bad idea either.

If you haven’t changed the username/password for JMX, the default is:

userid: controlRole
password: change_asap

The ‘change_asap’ password should be a hint to change it as soon as you can. If you simply can’t remember the username/password combo, they should be revealed in these files:

<configRoot>/alfresco/alfresco-jmxrmi.access
<configRoot>/alfresco/alfresco-jmxrmi.password

With all these things satisfied and Alfresco started, you can test on the Alfresco server to make sure the JMX rmi service is running by either issuing these from the command line:

# lsof -i :50500 (for Linux)
# netstat -an (for Windows)

With Windows you can probably use the /find switch to look for port 50500 in the listing specifically or you can scroll through the output to look for 50500.

Next, from the client workstation, you can test connectivity to the JMX rmi port by first pinging the server’s hostname. After this, check for port opening from your workstation by issuing:

# telnet <hostname> 50500

You’ll know this is open by getting a blank screen instead of the “unable to connect” message or something similar.

If none of these work, then have  your network admin see if your server is set up with NAT addressing. This can cause problems with any of the RMI services (of which JMX is related).

HTH,

H.S. :)

IMAP: Exposing one folder instead of the whole repository

I recently had a customer ask how he can expose a single folder as AlfrescoIMAP instead of exposing the whole repository by default. True, if you set up Alfresco’s IMAP out of the box, the whole repo is exposed in the Outlook client. In and of itself, this is not a bad thing. But, sometimes you may want to deal with one folder instead of the whole thing. Here’s how to do that. We’ll assume that you’ve gone into the “Company Home” directory which is effectively the top level of the repository and created a sub-directory there called “MyIMAProot”. You can then set the following in alfresco-global.properties:

imap.config.server.mountPoints.value.AlfrescoIMAP.rootPath=/app:company_home/cm:MyIMAProot

This should work after a restart but keep in mind that if some users try to configure their Outlook client and do not have access to the subdirectories, there is a bug that will keep Alfresco from rendering all subdirs since it gives up on the rest of cycling through if it encounters a folder it doesn’t have rights to. You can read more about that here:

https://issues.alfresco.com/jira/browse/MNT-12063

This will likely be ready when 4.2.4 comes out which isn’t far off. But for now, as long as your users have access to this folder and any subfolders within MyIMAProot, you should be good to go.

HTH,

H.S. :)

Best Practices for Using Active Directory with Alfresco

Normally when I help a user that involves issues with setting up synchronization of users and groups, the customer has settings that are extremely generic like these:

ldap.synchronization.groupSearchBase=dc\=example,dc\=foo
ldap.synchronization.userSearchBase=dc\=example,dc\=foo

ldap.synchronization.groupQuery=objectclass\=group
ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))

ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(!(modifyTimestamp<\={0})))
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!modifyTimestamp<\={0}))

Syntactically speaking, these queries are fine but they synch users and groups from a very naive perspective. What these queries and settings are telling you are this:

1. We’ll start our search for groups and users in example.foo (based on the settings below).

ldap.synchronization.groupSearchBase=dc\=example,dc\=foo
ldap.synchronization.userSearchBase=dc\=example,dc\=foo

2. We will synch in ALL users and ALL groups inside of example.foo.

ldap.synchronization.groupQuery=objectclass\=group
ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))

3. When the differential synchronization occurs we will synch in any additional users and groups that are created that fit the query we’ve set up previously (which to say will be ALL of them).

ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(!(modifyTimestamp<\={0})))
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!modifyTimestamp<\={0}))

Now, you may have a use-case that requires this but that’s probably not likely. Almost more likely is the fact that most of your AD users will not be using Alfresco. A lot of them maybe but not all of them. The best practice here is to create an Alfresco organizational unit and then create a couple of different Alfresco groups in this OU:

Create an Alfresco organizational unit with a distinguished name like so:

OU=Alfresco,DC=example,DC=foo

Then you can create any Alfresco specific groups underneath OU=Alfresco like so:

CN=AlfrescoAdmins,OU=Alfresco,DC=example,DC=foo
CN=AlfrescoUsers,OU=Alfresco,DC=example,DC=foo

At this point, you can assign your users to these different two groups. For my testing purposes I created 3 AD users (aduser1, aduser2, aduser3) and then made aduser1 a member of AlfrescoAdmins and then all three, members of AlfrescoUsers. Now we can change our queries to look thusly:

Our LDAP queries will now only search for groups in ou=Alfresco,dc=example,dc=foo and users throughout the directory (as they could realistically exist in many places).

ldap.synchronization.groupSearchBase=ou\=alfresco,dc\=example,dc\=foo
ldap.synchronization.userSearchBase=dc\=example,dc\=foo

We can keep at least the groupQuery the same. This will bring in every group in OU=Alfresco:

ldap.synchronization.groupQuery=objectclass\=group

This will only bring in users who are members of AlfrescoAdmins and AlfrescoUsers and not every single user in Active Directory:

ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(|(memberOf=cn\=AlfrescoAdmins,ou=alfresco,dc=example,dc=foo)(memberOf=cn\=AlfrescoUsers,ou=alfresco,dc=example,dc=foo)))

Next of course, for differential synchs we’ll use the same queries except add the modifiedTimestamp directive at the end:

ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(|(memberOf=cn\=AlfrescoAdmins,ou=alfresco,dc=example,dc=foo)(memberOf=cn\=AlfrescoUsers,ou=alfresco,dc=example,dc=foo))(!(modifyTimestamp<\={0})))

ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!modifyTimestamp<\={0}))

Below are the LDAP and Synchronization settings I used for 4.2.x and this works with no issues:

### AD authentication only ###
authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap-ad1:ldap-ad
ldap.authentication.active=true
ldap.authentication.allowGuestLogin=true
ldap.authentication.userNameFormat=%s@example.foo
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://example.foo:389
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.escapeCommasInBind=false
ldap.authentication.escapeCommasInUid=false
ldap.authentication.defaultAdministratorUserNames=Administrator

ldap.synchronization.active=true
ldap.synchronization.java.naming.security.principal=administrator@example.foo
ldap.synchronization.java.naming.security.credentials=Alfr3sc0
ldap.synchronization.queryBatchSize=1000
ldap.synchronization.attributeBatchSize=1000
synchronization.synchronizeChangesOnly=false
synchronization.allowDeletions=true
synchronization.syncWhenMissingPeopleLogIn=true

ldap.synchronization.groupQuery=objectclass\=group
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=group)(!(modifyTimestamp<\={0})))

ldap.synchronization.personQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(|(memberOf=cn\=AlfrescoAdmins,ou=alfresco,dc=example,dc=foo)(memberOf=cn\=AlfrescoUsers,ou=alfresco,dc=example,dc=foo)))

ldap.synchronization.personDifferentialQuery=(&(objectclass\=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512)(|(memberOf=cn\=AlfrescoAdmins,ou=alfresco,dc=example,dc=foo)(memberOf=cn\=AlfrescoUsers,ou=alfresco,dc=example,dc=foo))(!(modifyTimestamp<\={0})))

ldap.synchronization.groupSearchBase=ou\=alfresco,dc\=example,dc\=foo

ldap.synchronization.userSearchBase=dc\=example,dc\=foo

ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'.0Z'
ldap.synchronization.userIdAttributeName=sAMAccountName
ldap.synchronization.userFirstNameAttributeName=givenName
ldap.synchronization.userLastNameAttributeName=sn
ldap.synchronization.userEmailAttributeName=mail
ldap.synchronization.userOrganizationalIdAttributeName=company
ldap.synchronization.defaultHomeFolderProvider=largeHomeFolderProvider
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupDisplayNameAttributeName=displayName
ldap.synchronization.groupType=group
ldap.synchronization.personType=user
ldap.synchronization.groupMemberAttributeName=member
ldap.synchronization.enableProgressEstimation=true

Now all groups show up and all users show up in the proper group. I hope this is helpful.

-H.S.

Javascript: Templating Folders when created by Share Rules

question

This one has had me perplexed for some time. We seem to get this question just a few times a year but it’s a really good one:

I’m creating a rule on a folder in Share. This rule will create 3 particular subfolders in the new folder that’s being created with a script. How do I accomplish this?

It made sense to me that your script should look like:

var subfolder1 = space.childByNamePath("subfolder1");
subfolder1 = space.createFolder("subfolder1");

As I’ve found out, the “space” counts as the root folder where this new folder is being placed. If this does anything, it will only create the folders in the same directory as your new folder. It took me a while of looking through blogs, articles and our own documentation to find out that this is the way to get it done:

var invoices = document.childByNamePath("Invoices");
invoices = document.createFolder("Invoices");

I tested this with a rule and it works like a champ. It didn’t dawn on me initially to use document to represent the node being created that triggers the rule. And from here we can then do things like copy, change/add aspects, create associations, and so on. 

Happy Scripting!

-H.S.

Alfresco Custom Data Lists

Summary

The data lists feature allows site members to create and manage lists of data relevant to the site. Users can work with their own lists and can also contribute to lists created by other site members. Out of the box there are many list templates provided such as: Contact list, Event list, Issue list, To-do list, Feedback list, etc.

Since there are a limited number of canned or out of the box data lists, you will likely need to create your own custom datalist.

To do this, you’ll need to create a custom model file that will define the data list essentially. You’ll also need a context file that references the custom model and finally, make modifications to share-config-custom.xml so that your data list will register and display in your Share site. Be aware that I was able to successfully create a custom data-list using these steps on Alfresco versions 3.4.x and 4.x. I did not test in 3.3, 3.2 or before.

Below are the steps to accomplish this.

Custom Model File

I have called this one slModel.xml to be placed in the extensions directory. This is usually in <alfresco_install_dir>/tomcat/shared/classes/alfresco/extension directory:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="sl:slDatalist" xmlns="http://www.alfresco.org/model/dictionary/1.0">
 <!-- Optional meta-data about the model --> 
 <description>KB datalist</description>
 <author>Harlin Seritt</author>
 <version>1.0</version>
 <!-- Imports are required to allow references to definitions in other models --> 
 <imports>
     <!-- Import Alfresco Dictionary Definitions -->
     <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
     <!-- Import Alfresco Content Domain Model Definitions -->
     <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
     <!-- Import Alfresco Data List Model Definitions -->
     <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl"/>
 </imports>

<!-- Introduction of new namespaces defined by this model --> 
 <namespaces>
     <namespace uri="sl.customlists.com" prefix="sl"/>
 </namespaces>
 <types>
 <!-- Data list defintions For this model go here -->
     <type name="sl:slArticle">
         <title>SL Article</title>
         <description>Simple Article</description>
         <parent>dl:dataListItem</parent>

         <properties>
             <property name="sl:slTitle">
                 <title>Title</title>
                 <type>d:text</type>
                 <mandatory>true</mandatory>
             </property>

             <property name="sl:slContent">
                 <title>Content</title>
                 <type>d:text</type>
                 <mandatory>false</mandatory>
             </property>
         </properties> 

         <associations>
             <association name="sl:slAttachments">
                 <title>Attachements</title>
                 <source>
                     <mandatory>false</mandatory>
                     <many>true</many>
                 </source>
                 <target>
                     <class>cm:content</class>
                     <mandatory>false</mandatory>
                     <many>true</many>
                 </target>
             </association>
         </associations>
     </type>
 </types> 
</model>

Next, you’ll need to create a context file. This file (slModel-context.xml) needs to be placed in the extension directory :

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
    <!-- Registration of new models --> 
    <bean id="sl.extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
    <property name="models">
        <list>
            <value>alfresco/extension/slModel.xml</value>
        </list>
    </property>
 </bean>

<!-- Shows how to add an additional model if needed
<bean id="extension.mtg.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
 <property name="models">
     <list>
         <value>alfresco/extension/myOtherDatalistModel.xml</value>
     </list>
 </property>
</bean>
-->

</beans>

Last, add these configs to the share-config-custom.xml file (to be overwritten in the web-extensions directory usually in tomcat/shared/classes/web-extension):<config evaluator=”model-type” condition=”sl:slArticle”> <forms>

     <!-- Create item form -->
     <form>
         <field-visibility>
             <show id="sl:slTitle" /> 
             <show id="sl:slContent" /> 
             <show id="sl:slAttachments" /> 
         </field-visibility>
         <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
         <appearance>
             <field id="sl:slTitle">
                 <control template="/org/alfresco/components/form/controls/textarea.ftl" /> 
             </field>
             <field id="sl:slContent">
                 <control template="/org/alfresco/components/form/controls/textarea.ftl" /> 
             </field> 
             <field id="sl:slAttachments">
                 <control>
                     <control-param name="startLocation">{doclib}</control-param>
                 </control>
             </field>
         </appearance>
     </form>

 <!-- Data Grid view -->
 <form id="datagrid">
      <field-visibility> 
          <show id="sl:slTitle" /> 
          <show id="sl:slContent" /> 
          <show id="sl:slAttachments" /> 
      </field-visibility>
 </form>
</forms>
</config>

 <!-- Edit view -->
 <config evaluator="node-type" condition="sl:slArticle">
 <forms>
     <!-- Edit marketing item form -->
     <form>
          <field-visibility> 
              <show id="sl:slTitle" /> 
              <show id="sl:slContent" /> 
              <show id="sl:slAttachments" /> 
          </field-visibility>
          <create-form template="/org/alfresco/components/data-lists/forms/dataitem.ftl" />
          <appearance>
              <field id="sl:slTitle">
                 <control template="/org/alfresco/components/form/controls/textarea.ftl" /> 
              </field>
              <field id="sl:slContent">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" /> 
              </field> 
              <field id="sl:slAttachments">
                  <control>
                      <control-param name="startLocation">{doclib}</control-param>
                  </control>
              </field>
          </appearance>
     </form>
 </forms>
</config>

Add these in place and restart Alfresco. You can then go to any Share site and add this datalist:

<screenshot>

Choose the SL Article data list:

<screenshot>

Add data:

<screenshot>

Now, you have a custom data list!

Cheers! -H.S.

How To Install Alfresco Dashlets

Screen Shot 2013-02-05 at 2.20.30 PM

Summary

Alfresco Share Dashlets are mini applications (some may be tempted to say Applets but that is more of a Java term 😉 ) that are able to be added on the fly to add some very minor functionality to your Alfresco server. You can get Share dashlets here. In case you weren’t aware, you can pick up many new dashlets created by the community and even peek inside some sample ones to get an idea how to create your own.

Make sure you have a look at the individual page for each dashlet you’re interested. The dashlet’s page may tell you how to build them (usually with ant), deploy them, which Alfresco version is required, etc.

How To Deploy Dashlets to Alfresco

Which jar file to use for them may depend on the build method used.

Create a tomcat/shared/lib directory if you haven’t already:

# cd <alf_install>/tomcat
# mkdir -p shared/lib

Add the shared/lib/*.jar to shared.loader in tomcat/conf/catalina.properties:

shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

Afterwards, copy the dashlet jars into tomcat/shared/classes and restart Alfresco.

Open your Share page and go to Customize Dashboard.

Screen Shot 2013-02-05 at 10.07.15 AM

When you click on Add Dashlets you should now see your dashlet added to the list. In my case this is the BBC Weather dashlet.

Screen Shot 2013-02-05 at 10.08.03 AM

Drag this one to your list and click Ok. I dragged mine from Add Dashlets to Column 1 in this case. This will bring you to your dashboard and the dashlet should be now showing. To configure this particular one to show the weather for a particular city, click on the pencil icon in the upper right corner of the dashboard (look on yours, in the screenshot below the pencil icon isn’t shown).

Screen Shot 2013-02-05 at 10.10.23 AM

Change the city to yours and click Ok.

Screen Shot 2013-02-05 at 10.10.47 AM

Voila! The BBC Weather Dashlet should be showing on your dashboard.

This method should work for most dashlets but keep in mind, some of them may take some additional steps to configure.

Happy Dashletting!

Cheers! -H.S.

Alfresco Install with MySQL

Installing Alfresco can sometimes be like putting a puzzle together. Sigh.
Installing Alfresco can sometimes be like putting a puzzle together.

In order to help our customers with different issues, I have to install Alfresco a lot. We do have an ESX server that we can use, so in theory, we should be able to install Alfresco once and be done with it. In reality though, our customers’ versions of installed Alfresco can be anywhere between 3.x through 4.1.2 (currently) and with many different hotfix versions along the way. Occasionally we have the poor soul who is on an older and unsupported version (2.1 often shows up but we do support helping them upgrade at least to the 3.x series). So, it’s a good idea for me to be well-versed in being able to get Alfresco set up and running at a moment’s notice. It also helps to set up your environment in such a way that it makes it a snap to install additional versions.

For me personally, I prefer that Alfresco be installed on Linux (RHEL or Ubuntu is fine either way). I am so used to getting around in the *NIX world that now I find it just a little difficult to maneuver in Windows 2008. Although Mac is supposed to be a *NIX, it’s just not the same but that’s another story in itself (note: installing Enterprise on the Mac is not supported — but with a few steps it’s really a snap and really useful if you prefer to do development on a Mac). Either way, choose an OS you’re familiar with. You may want to refer to our Supported Platforms page to see which ones are supported for the version you’re wanting to install. Also, please be aware that on our main site, you probably will only be able to find the most recent Alfresco install package. You can however, visit here if you really want an older version.

You’ll need an RDBMS database server. For most, the easiest one to whip up is going to be MySQL. Keep in mind you can use Oracle, MS-SQL or PostgreSQL if you prefer. I’ll be providing instructions on how to set up your server with MySQL however. For the other database servers you’ll want to look up how to install them, create a database/schema and ensure the right privileges are in place for the database user. You’ll also want to locate the proper JDBC driver for your version as well as what the JDBC URL should look like. Links for docs on how to configure the other supported databases are below:

Moving on with the MySQL server install:

  • On RHEL, you can simply do: yum install mysql-server
  • On Ubuntu, you can do: apt-get install mysql-server-5.5 (If you’re not sure, just do apt-cache search mysql-server and the current version should be revealed)

Using the apt or yum tool will also install any necessary goodies that MySQL server depends on, if any.

On Windows, you can go to the MySQL website, download the latest 5.5 version and install it there. With Windows there is an advanced configuration wizard that comes with the installer. Make sure you run it so you can set up your MySQL root user password. With Linux, you’ll need to do a few extra things to get the root user set up. From the command line do:

# mysql -u root

This should get you to the MySQL command line. Here you can do this to set your MySQL root password:

> grant all privileges on *.* to 'root'@'localhost' identified by '<type your password here>' with grant option;

If you really do need remote access (and I wouldn’t do this unless you absolutely know what you’re doing), you can do this:

> grant all privileges on *.* to 'root'@'%' identified by '<type your password here>' with grant option;

This will allow you to connect to your MySQL server from a remote workstation using the root account.

Next, we’ll need to set up a database and grant privileges for it so that Alfresco can use it.

I prefer to use a naming convention like alf<version without dots>. It helps to keep track of the myriad Alfresco databases I now have. So if we’re installing 4.1.2 Alfresco, you can do this:

> create database alf412;
> grant all privileges on alf412.* to 'alfresco'@'localhost' identified by 'alfresco';

Of course, feel free to replace the database username and password to one that works with your environment and preferences.

So, now we have MySQL set up. It’s time to get Alfresco. You can go here for the latest versions:

Community
Enterprise

Keep in mind that the Enterprise trial is for 30 days. So you’re aware, compared to similar open source/community and enterprise softwares, Alfresco Community is to Alfresco Enterprise as Fedora is to RHEL. Not much of a difference really (beyond extra features) except that an enterprise version you can expect to pay for support for it while a community version will be supported by a forum or IRC channel.

My download looks like:

alfresco-enterprise-4.1.2-installer-linux-x64.bin

Keep in mind that all steps going forward work for either Community or Enterprise (except for licenses). So, from my command line I try this:

# ./alfresco-enterprise-4.1.2-installer-linux-x64.bin
*If you see a warning that you’re lacking the correct privileges to run it, do this before trying it again:
# chmod +x alfresco-enterprise-4.1.2-installer-linux-x64.bin

The install is pretty straight-forward with a few caveats:

  • Choose the Advanced install
  • Un-check the PostgreSQL (unless you really want to use the distributed PostgreSQL server — which you really don’t. Even if you prefer to use PostgreSQL, it’s better to install a local version in much the same way you did with the instructions given for MySQL above — it will make shuffling databases around a lot easier when you need to do upgrades). Otherwise make sure everything else is checked.
  • Select an install folder. My folder setup looks something like /alfresco/412. Like I said, I find that I need to install a few different versions. This makes it easy to manage and find.
  • JDBC URL for MySQL should look like: jdbc:mysql://localhost/<database name>?useUnicode=yes&characterEncoding=UTF-8
  • JDBC Driver for MySQL should be org.gjt.mm.mysql.Driver
  • Don’t change the Tomcat configs unless you know what you’re doing and have a good reason to change them.
  • The rest of it keep at default but do change them if you believe you need to do otherwise.

This will install Alfresco from a basic standpoint. No tables will be created yet. After the installation is done, do a Google search for MySQL jdbc driver (the one for PostgreSQL will already be provided). My jdbc driver looks something like:

mysql-connector-java-5.1.17-bin.jar

Make sure you put a copy of this in <alfresco_install>/tomcat/lib.

If you have an enterprise license, make sure you put that license in <alfresco_install>/tomcat/shared/classes/alfresco/extension/license. Note that you will have to create the license sub-directory in that path.

After all this, you’re ready to get started. For a startup I recommend you doing this:

# <alfresco_install>/alfresco.sh start

After a few seconds after startup it may be a good idea to watch the log:

# tail -f <alfresco_install>/alfresco.log

Alfresco should now install without any errors except for a Solr one that will look like:

ERROR [org.quartz.core.JobRunShell] Job DEFAULT.org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean#215b011c threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.PublishQueueProcessor] failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 11220001 SOLR queries can not be executed while the repository is bootstrapping

This simply says that Alfresco can’t query Solr while Alfresco is bootstrapping. Once you’ve seen an entry like this one in alfresco.log, the install should be near the end:

INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 525 Web Scripts (+0 failed), 809 URLs

… it’s usually ok to start up a web browser and aim it at http://<hostname>:8080/share. You can then log in with your admin username and password and have a look around.

A tip for Enterprise users: I would recommend copying the original alfresco.log file to another location or renaming it to something like alfresco.log.installed in case you need it to give to support for a look in case something goes wrong.

Hopefully this is helpful for someone who is an Alfresco novice. It also may help to have a look at docs.alfresco.com for help and guidance on the product. If you’re an Enterprise customer, remember it’s easy to get help. Simply go to http://support.alfresco.com and log a ticket. If you’re a Community user, there is http://forums.alfresco.com and even #alfresco on freenode.net if you’re into IRC. If you run into errors, it’s best to work from the top down in alfresco.log and solve them as you go. For an install like this though, it should be easy to solve almost all of them.

Cheers! — H.S.