Warning: Archived Page
The official documentation is at: http://docs.alfresco.com
Note to the Reader
Though the following article refers to Alfresco 1.4, these instructions equally apply to Alfresco 2.0.
Content management has quickly become a key concern for enterprises and government agencies who, for a wide variety of reasons (regulatory compliance or otherwise), need to maintain a grasp of all the information and knowledge authored and published by the organization. This content is not just simply composed of web pages, but includes documents, scanned images, digital assets, and sensitive records with specific retention policies attached to them. Alfresco, based in the UK with offices throughout Europe and the US, is among a small group of companies offering a complete open source Enterprise Content Management (ECM) solution. ECM is generally considered to be an umbrella term that covers many different aspects of content management including, but not limited to, document management, records and image management, collaboration, and web content management (WCM).
All ECM systems need to offer some core services as part of their feature set. The most important of these are: versioning, security, metadata management, search and workflow. Aside from being a web-based application, Alfresco is unique among most ECM solutions as it includes a virtual fileserver (VFS) that provides direct access to the content repository via FTP, WebDAV, and SMB/CIFS (Microsoftâ€™s Common Internet Filesystem). Linux users have come to know SMB and CIFS through the Samba project which provides an open source implementation of the SMB and CIFS protocol. As a cross-platform (Windows, Unix/Linux, Mac OS X) J2EE application that can be deployed to virtually any servlet engine such as Apache Tomcat, Alfresco employs a pure Java-based implementation of CIFS. This means that Samba is not required on the server thatâ€™s running Alfresco. More importantly, Alfrescoâ€™s built-in CIFS support lowers the ECM adoption barrier by permitting users to use the Windows Explorer (or the Finder on Macs) to easily connect to the repository and immediately benefit from the aforementioned advantages of a content repository.
For this walk-through we assume the reader is using a Linux server or workstation with at least 1GB of RAM and 1GB of available disk space. Though Samba is not required, it is good to have it installed as it may help with testing and debugging, please make sure that the Samba daemon (smbd) is not running as it will cause a port conflict with Alfrescoâ€™s built-in CIFS server. This conflict may be eliminated by assigning multiple IP addresses and binding Samba and the Alfresco Java VM to different IPs. Additionally, to keep the install process simple, we assume the reader will use the Alfresco Linux installer available at http://www.alfresco.com or http://sourceforge.net/projects/alfresco. In this case weâ€™ll use the Alfresco 1.4 Community version titled AlfrescoCommunity-1.4-Linux-x86-Install. This is a self-executing installer that includes all the necessary components to run Alfresco on a Linux environment. Note that the SourceForge site also includes other bundles for different operating systems (Windows and Linux), J2EE containers (such as Tomcat and JBoss) and portals such as those from Liferay and JBoss.
For this example we used the following command to download Alfresco Community version 1.4 (the latest stable release as of this writing) into an Amazon EC2 server running Fedora Core 4:
[root@mybox ~]# wget http://easynews.dl.sourceforge.net/sourceforge/alfresco/AlfrescoCommunity-1.4-Linux-x86-Install
Please note that this is a rather hefty download weighing in at about 250MB as it includes a Java virtual machine (JVM) and OpenOffice which Alfresco uses for indexing and content transformations. Also observe that for simplicity, weâ€™re logged in as ROOT as this permits the Tomcat server running Alfresco to bind itself to privileged ports (which CIFS requires). Proper security precautions should be taken for any kind of production install.
Once downloaded, make the file executable and run it:
[root@mybox ~]# chmod +x AlfrescoCommunity-1.4-Linux-x86-Install [root@mybox ~]# ./AlfrescoCommunity-1.4-Linux-x86-Install -S
Alfresco uses a graphical installer, but since weâ€™re installing on a headless server without a local graphical console or X11 forwarding, we have used the â€“S flag to install silently. Feel free to omit the â€“S switch if a graphical install is desired.
The Alfresco 1.4 installer defaults to /usr/local/alfresco though the upcoming Alfresco 2.0 version will default to /opt/alfresco as the destination directory.
Navigate to /usr/local/alfresco and examine the directory structure:
[root@mybox ~]# cd /usr/local/alfresco/ [root@mybox alfresco]# ls AlfrescoLogo32.gif README_osx.txt alf_stop.sh java start_oo.sh README.txt alf_data alfresco.sh licenses tomcat README_mysql.txt alf_start.sh extras openoffice.org2.0 uninstall
Barring any problems and assuming there are no application processes running on port 80 (and that smbd is not running), you may immediately try to run Alfresco by executing "alf_start.sh" or "alfresco.sh start":
[root@mybox alfresco]# ./alf_start.sh /usr/local/alfresco/alfresco.sh: line 11: export: `-XX:CompileCommand=exclude,org/apache/lucene/index/IndexReader\$1,doBody -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeIndexes -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeDeletions': not a valid identifier Using CATALINA_BASE: /usr/local/alfresco/tomcat Using CATALINA_HOME: /usr/local/alfresco/tomcat Using CATALINA_TMPDIR: /usr/local/alfresco/tomcat/temp Using JRE_HOME: /usr/local/alfresco/java Using JAVA_OPTS: -Xms128m -Xmx512m -server -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/alfresco/tomcat/conf/logging.properties Starting OpenOffice service... [root@mybox alfresco]#
The following error may present itself if there is no X server to connect to and may be safely ignored when testing CIFS.
/usr/local/alfresco/openoffice.org2.0/program/soffice.bin X11 error: Can't open display: Set DISPLAY environment variable, use -display option or check permissions of your X-Server (See "man X" resp. "man xhost" for details)
Note however, that OpenOffice needs to be running in order for document indexing and transformations to work. Instructions on configuring X11 on Linux environments may be found at: http://wiki.alfresco.com/wiki/Linux_Quick_Install
Alfresco generates a log file called "alfresco.log" and the Tomcat server log my be monitored by looking at the catalina.out log file:
[root@mybox alfresco]# tail -f tomcat/logs/catalina.out Jan 25, 2007 5:50:02 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 25, 2007 5:50:03 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 25, 2007 5:50:03 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/41 config=null Jan 25, 2007 5:50:04 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Jan 25, 2007 5:50:04 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 207374 ms
The line that reads "INFO: Server startup in 207374 ms" is a good indicator that the Tomcat server and Alfresco have loaded properly.
Configuration and Testing
The next step is to connect to Alfrescoâ€™s Web Client interface and confirm itâ€™s running properly.
The Tomcat server Alfresco includes in the installer will default to port 8080 and the Alfresco Web Application is deployed to the following URL: http://localhost:8080/alfresco
Pointing a browser to that URL will lead to the Guest User view:
Alfresco includes a default administrator account with a login of "admin" and a password of "admin". Once logged in will take the user to the same screen as Figure 1. Clicking on the "Company Home" link on the upper left-hand corner of the page will reveal the Alfresco repository containing some default folders (known as Spaces in Alfresco terminology). Alfresco includes a tutorial that explores the basic features of the Alfresco Web Client but since the goal of this article is to cover Alfrescoâ€™s CIFS capability, we shall drop back to the command-line to test the CIFS server.
If Samba is installed, one can connect to the CIFS server from Linux though the Samba Client (smbclient):
[root@mybox alfresco]# smbclient -U admin \\\\127.0.0.1\\alfresco admin Domain=[WORKGROUP] OS=[Java] Server=[Alfresco CIFS Server 3.5.1] smb: \> ls . D 0 Wed Dec 31 19:00:00 1969 .. D 0 Wed Dec 31 19:00:00 1969 Data Dictionary D 0 Thu Jan 25 17:49:46 2007 Guest Home D 0 Thu Jan 25 17:49:46 2007 40000 blocks of size 2097152. 36000 blocks available
Observe that UNC is used to connect to the Alfresco CIFS server, given that this is a Unix shell, we need to escape backslashes so that what would normally be expressed as \\servername\alfresco is instead written \\\\servername\\alfresco. Also note that weâ€™ve logged in as the admin user with the same login and password as before. At this point, it is worth mentioning that Alfresco pretends to be its own standalone fileserver, as such it will broadcast its default NetBIOS name of "ALF" to the network. This name is completely independent from the hostname of the Linux server on which Alfresco is installed and may be configured by editing the configuration file located at <ALFRESCO_ROOT>/tomcat/shared/classes/alfresco/extension/file-servers-custom.xml as instructed at http://wiki.alfresco.com/wiki/File_Server_Configuration
We may now proceed with connecting through Microsoft Windows by using the Map Network Drive utility and connect our Windows client to Alfresco using the UNC path of \\servername\alfresco using the login and password of "admin".
If everything is in order, the Windows Explorer will reveal the Alfresco repository. Users will be able to drag and drop files, leverage Alfrescoâ€™s security, rules and workflows without having to learn too much about the Alfresco Web Client.
Naturally, not all Web Client functions are available via the CIFS interface, but Alfresco does provide "Virtual Executables" that perform check-in/check-out operations as well as viewing document metadata. Programmers can create their own executables that expand on this functionality and even contribute these extensions to Alfresco for possible inclusion in a later version of the Alfresco Enterprise Content Management System.
It is not uncommon for a few problems to crop up. For example, the Alfresco CIFS server may fail to broadcast its name properly. Also, Alfresco supports LDAP and NTLM which require performing additional configuration of the CIFS server. Solutions to these problems are documented at the Alfresco Wiki and forums at http://wiki.alfresco.com and http://forums.alfresco.com respectively.
Hopefully, this walkthrough has demonstrated the relative ease by which organizations may benefit from having a secure, searchable content and document repository while lowering the end-userâ€™s learning curve through the use of the commonly used Windows Explorer. Organizations may now leverage the repository to ensure compliance with any internal policies as well as governmental regulations such as Sarbanes-Oxley. Not explored here is Alfresco 2.0â€™s Web Content Management (WCM) functionality which is slated to be released in the spring of 2007 and, as of this writing, is available in Beta form. With this, enterprises can enjoy the benefits of managing all content regardless of how or where itâ€™s used. Additionally, teams of collaborators may engage in projects knowing that their documents are easily accessible through a wide variety of interfaces while benefiting from document versioning and security.
Those interested in learning more may visit http://www.alfresco.com and request access to the Alfresco product documentation. Additional information may also be found at http://wiki.alfresco.com and http://forums.alfresco.com
About the Authors
Luis Sala is the Senior Director of Solutions Engineering at Alfresco You can read his blog and listen to his podcast at http://blogs.alfresco.com/luissala