One of the remarkable features of Alfresco is the ease with which it can be installed and deployed. The simple out of the box installation is quite straight forward, with preconfigured options that are aimed at having a complete, working content management system in no time. This chapter provides you with a basic understanding of Alfresco architecture, various installation options, and the key terminologies used. By the end of this chapter, you will be well equipped with the information necessary to make a choice of a suitable operating system, database, application server, and other software required for your installation. This chapter is essential reading matter for anyone not already familiar with Alfresco.
By the end of this chapter, you will have learned about:
Before delving directly into installation, it is important for you to understand the architecture behind Alfresco and the various installation options available to you. This will help you to make good decisions in selecting the appropriate software for your business application.
The Out of the box deployment of Alfresco is a typical web application architecture, consisting of different layers, as shown in the next figure. This new architecture is basically N-tier and delivers scalability without the need for massive hardware and software investment. It can also accommodate more users with the existing hardware resources. The layered architecture of Alfresco provides the benefits of easily manageable, flexible, and highly scalable content management solution.
The Client Applications layer contains the actual application, as the web browser, on the user's machine, that is, basically the presentation layer. Out of the box, Alfresco provides two client applications: Alfresco Explorer and Alfresco Share. Alfresco Explorer is a pure document management web application, and Alfresco Share is a web 2.0 application, that provides dynamic, collaborative support. In the next couple of chapters, we will talk about these two applications in detail. Along with these two applications, Alfresco provides support for CIFS, FTP, WebDAV, Microsoft office, and so on. Refer to the topic in Chapter 9, named Integrations, for more information on the different client applications that are integrated into Alfresco in order to leverage the services provided by Alfresco.
The Repository Services layer consists of Alfresco components and services. This new architecture provides a clear separation between the presentation tier and the repository tier. The Alfresco RESTful API provides access to its services via HTTP, which makes it accessible to other tools and applications. The Alfresco Surf platform enables you to build dynamic, REST-oriented web applications and collaborative web sites. More detailed information about Surf platforms are provided in Chapter 11. The SharePoint protocol offers greater choice for Microsoft users, by providing them with the first open source, fully-compatible SharePoint repository. Companies can leverage existing investments in Linux and Java, as well as Microsoft .NET connection software, to significantly reduce their SharePoint total cost of ownership and maximize their hardware and software investments. Chapter 11 describes SharePoint protocol in detail. The Content Management Interoperability Services (CMIS) specification defines a domain model and a set of API bindings that can be used by applications, to work with one or more Enterprise Content Management repositories or systems.
The Data Storage layer stores the data in a relational database and a file system.
The content in Alfresco is stored in persistent back-end systems such as a database and file system. There is a reason for using both database and a file system as content storage. Any content within Alfresco consists of two elements—the content itself and information about the content (metadata).
The actual content can be anything from simple documents (HTML, XML) to images, audio, and video. The actual content and its related versions are stored as binary files in the file system. Storing content in a file system has its own advantages. It allows a very large amount of content, random-access streaming, and options for different storage devices. It is important to note that Alfresco is agnostic with respect to the file system it utilizes. It is possible to configure Alfresco to use a vast diversity of file systems.
Alfresco uses Lucene—a popular open source search engine, to provide metadata searching, and full text search capabilities of the content. Apart from the actual binary content, Lucene's index files are also stored in the file system.
The content metadata consists of information that includes elements like:
The security settings are stored in the relational database.
The application server hosts the user interface and domain logic. It provides an abstraction and enables communication between the client and storage layers. In the case of Alfresco, the application server houses Alfresco applications (such as the Alfresco Explorer and Alfresco Share) and the Alfresco repository.
The Alfresco repository provides a set of reusable cross-cutting content management services such as content storage, query, versioning, and transformation, which may be utilized by one or more applications.
An Alfresco application provides a complete solution tailored for a specific area of content management such as document management and records management. The user interfaces for all of these applications are referred to as Alfresco Explorer and Alfresco Share. Alfresco Explorer is the JSF based client, which is highly customizable and configurable according to specific user requirements. The out of the box web client gives you lot of packaged functionality. With the web client management console, you can manage users, security, content, business rules, and so on. Additionally, Alfresco Share introduces a new, simplified, easy-to-use, and adopt knowledge worker UI. The current JSF client is still available and is unchanged.
There is no installation or configuration required for the Alfresco user interface. Any number of web browsers can connect to the application without prior client installation activities.
The out of box installation comes with Alfresco Share and the Alfresco Share web client, which you can use to connect to the Alfresco repository through web-based applications.
Apart from these applications, Alfresco's out of the box installation supports various client applications for accessing Alfresco content via Web Services or protocols such as FTP, WebDAV, and CIFS:
Web Services: Most of the ECM products, on the market store content, are in a proprietary format, which is like a black box. Alfresco's content is stored as per the JCR (Java Content Repository-JSR 170) open standards. Any JCR-compliant client application can read content that is stored in the Alfresco repository. This is one of the key selling points of Alfresco. An API is provided out of the box so that you can connect to the Alfresco repository from your applications, through web services or JCR integration.
Alfresco is a completely open source application, which is developed using open standards. Hence, it runs on various operating systems, relational databases, application servers, web browsers, and portals, and supports various languages. Let us examine all of the choices, and determine which option is right for you.
Alfresco currently provides two types of product download options:
Both of these options have the same code base and features, and are completely open source. For both the options, you can use the Alfresco documentation (Wiki), community support (forums), and community-contributed add-on products. Alfresco Community Lab Network is free. Alfresco Enterprise Network requires a per-CPU license fee.
The Alfresco Community Labs Network is an unsupported product and is mainly designed for developers and technical enthusiasts in non-critical environments. Alfresco Community Lab is released early and often, and renders a daily build, while offering the latest functionality. It doesn't provide scalability or high availability certifications. I would recommend this for use as the research vehicle for new features, and as the platform for the Alfresco Community, and consider it as a test drive before you install the Enterprise edition.
If you are implementing Alfresco for a major corporation or a financial, insurance, government or healthcare organization, I would recommend that you go for Alfresco Enterprise Network support. The primary benefit is that with the support of Alfresco and its certified partners you will get a stable, reliable, certified, and supported application with warranty and indemnity. Your Alfresco version will be certified on all available stacks, such as Linux, Windows, MySQL, Oracle, and so on. You will also benefit from Alfresco support, which includes problem resolution, compatibility advice, migration advice, and upgrade support. For mission-critical applications, you will get 24 x 7 support from Alfresco experts.
Choosing an operating system to run Alfresco on will be based on various factors. For some companies it depends on in-house expertise. For example, if you have administrators and I.T staff who can easily manage business applications running on a Microsoft windows platform, then your choice could be to go with the Windows operating system. For some companies it is based on the integration requirements with existing systems.
If you do not have any preferences, I would recommend that you go with Linux operating system for production use. Linux source code is freely distributed. Tens of thousands of programmers have reviewed the source code to improve performance, eliminate bugs, and strengthen security. No other operating system has ever undergone this level of review. The key advantages of Linux are listed below:
The data access layer of Alfresco is implemented using an open source software component and ORM (Object Relational Mapping) tool called Hibernate. Hibernate abstracts the database layer and provides seamless integration between the Alfresco repository and any relational database.
If you have already chosen the Microsoft Windows operating system, then the natural choice for you would be MS SQL Server. If you already have a license for Oracle, then an Oracle database is the best choice for you. Alfresco also supports the PostgreSQL database.
If you do not have any preference, I recommend that you go with the MySQL database, which costs nothing if you go with the open source version. The MySQL database has become the world's most popular open source database because of its consistent, fast performance, high reliability, and easy usability. It's used in more than 10 million installations, ranging from large corporations to specialized embedded applications. MySQL runs on more than 20 platforms, including Linux, Windows, OS/X, HP-UX, AIX, and Netware, giving you the kind of flexibility that puts you in control.
Alfresco runs on any J2SE 5.0 complaint application server. Hence, there are no application server specific dependencies. However, it is important to make a choice of application server before moving into production.
Alfresco uses the Spring framework and not the Enterprise Java Beans (EJB) framework. This means that there is no dependency on JBoss or any other application server that provides EJB containers. Spring is an open source application framework for Java/JEE. The Alfresco repository uses the Spring Framework as the core foundation of its architecture. If you are developing a standalone application, then Apache Tomcat might be a good option. Tomcat powers numerous large-scale and mission-critical web applications across a diverse range of industries and organizations. It is the most widely-accepted web application server on the market.
On the other hand, you should consider using the JBoss application server, which has the highest market capture (> 35%) of J2EE-based application servers in the world. JBoss internally uses Tomcat, and hence you get the benefits of the Tomcat servlet engine as well.
Alfresco utilizes JBoss caching ability to distribute and maintain data caches, making it possible to build large-scale systems that outperform traditional Enterprise Content Management systems. Alfresco also utilizes the clustering, failover and load balancing facilities of the JBoss application server, in order to increase scalability. Alfresco's business process management features are powered by JBoss jBPM tool.
If you have already invested in JBoss, then Alfresco provides complementary industry-leading Enterprise Content Management technology to the JBoss enterprise middleware system suite.
You can go with a portal of your choice; if you already have an enterprise portal then you can integrate Alfresco with it. If you do not have a portal in place and you would like to leverage the portal framework, then you can consider using either the JBoss portal or the Liferay portal. Both of these are based on J2EE technology; both of them are open source and open standards based, and both of them have Alfresco's built-in support.
JBoss Portal provides an open source platform for hosting and serving a portal's web interface, publishing and managing its content, and customizing its experience. Whereas most packaged portal frameworks help enterprises to launch portals more quickly, only JBoss Portal delivers the benefits of a zero-cost, open source license combined with a flexible and scalable underlying platform.
Liferay is the most downloaded and popular open source portal with 40,000 downloads per month. It runs on top of any J2EE servlet, such as Tomcat, so a full installation of JBoss is not required. However, it can be run against most full application-servers out of the box including JBoss, JRun, BEA, WebLogic and Orion. It has full set of web service interfaces to the portal. Liferay supports 800+ portlets (products) and has wider adoption in the market.
You need to make the best choice of software to install Alfresco. If you do not have any specific requirements, you might consider a complete open source stack for production usage, and go with Alfresco Enterprise Edition on the Linux operating system with the MySQL database running on the JBoss application server with a Liferay Portal.
The examples in this book were created and tested with the following choice of Alfresco installation:
In our earlier section, you may have noticed that the repository application server is the default deployment option chosen. This means that the out of the box Alfresco installation is a typical web application, where the web application server becomes the host for an embedded repository and is accessible through the HTTP protocol. In this section, we will discuss the requirements and procedures for the two flavors of installation of Alfresco, Full Installation and Installation of Alfresco Tomcat Bundle.
The default installation of Alfresco software requires installing the Windows enterprise version, Alfresco-Enterprise-<version>-Full-Setup.exe,
downloaded from the SourceForge project location (http://sourceforge.net/project/showfiles.php?group_id=143373). Alfresco is hosting its own community download area, so you can also download this from http://www.Alfresco.com/products/ecm/enttrial/. Select the download package, and you will be asked for the user name and password of the Alfresco content community.
At the time of writing this book, the latest version was Alfresco Enterprise 3.0.1 and installer file Alfresco-Enterprise-3.0.1-Full-Setup.exe is approximately 350 MB in size.
To install and run Alfresco, you need at least 500 MB disk space and at least 512 MB RAM on the desktop or server.
The following steps are a simple way of installing all of the software and components required to run Alfresco, through the installation wizard:
English
from Language Selection dialog. You will see this welcome screen:
C:Alfresco
. Please note that you have the option to browse and select another folder by clicking on the Browse button. Once you are done with the folder selection, click on Next.MySQL
. This should be installed and running already on your machine. Click on Next.Alfresco
. Click on Next.C:Alfresco omcatlib
folder.Readme
file, as it contains information about using CIFS , along with some troubleshooting tips.alf_start.bat
file, which is available at C:Alfresco
. Wait a few seconds to allow Tomcat to start, and then fire up your web browser and browse to http://localhost:8080/Alfresco
. Since this is the first time that you are using Alfresco, use admin as your username and password.This section provides the installation pre-configured Tomcat bundle for Alfresco, which requires JDK to already be installed on your machine.
The very first step for installing Alfresco is to install the Java SE Developer kit. Alfresco requires Java 1.5 or higher. If you already have JDK then you can skip this section.
To Install Java SDK, carry out the following steps:
C:> java
–version from the command prompt.JAVA_HOME
environment variable to set the path of Java SE Developer Kit.For
convenience, Alfresco provides the bundle of Alfresco with Tomcat. This bundle includes a pre configured Tomcat server, together with the Alfresco web application archive (Alfresco.war
) file, the Alfresco Share web application archive (share.war
), batch files, database setup scripts, a sample extension folder, and so on.
To download the Apache Tomcat bundled with Alfresco application, carry out the steps shown below:
.
Alfresco-enterprise-tomcat-<version>.zip
.To install the Apache Tomcat bundled with Alfresco application, use the following steps:
C:
c:Alfresco,
with unzipped files.webapps
folder (C:Alfresco omcatwebapps
).Alfresco
.This section describes the installation of the Alfresco components.
If you have installed Alfresco by using the full setup, then this support will already be there. Otherwise, follow the steps below to add SharePoint protocol support.
To download Apache vti-module.amp
and ROOT.war
, use the following steps:
vti-module.amp
, Connector functionality for Microsoft SharePoint Protocol support, from http://process.Alfresco.com/ccdl/?file=build-1342/vti-module.amp&a=y&s=n&t=y. ROOT.war
, the Microsoft SharePoint Protocol support servlet that forwards Office requests to the main web application, from http://process.Alfresco.com/ccdl/?file=build-1342/ROOT.war&a=y&s=n&t=yTo install SharePoint support, carry out the following steps:
vti-module.amp
to the <Alfresco_installation_folder>amps
folderapply_amps.bat
file, which is available at <Alfresco_installation_folder>
ROOT.war
in <Alfresco_installation_folder> omcatwebapps
folderAlfresco
and ROOT
folders in webapps
, if they exist.If you want to use Alfresco Enterprise edition, you require a license file. Alfresco Enterprise edition comes up with a 30 day evaluation license. If you don't provide a license file then you can evaluate Alfresco for 30 days. After that it, will be expired and you will only have 'read only' access to the repository.
To download the Alfresco license file, proceed with the following steps:
Alfresco-enterprise-<version>-customer-unlimited.lic,
or partner license, Alfresco-enterprise-<version>-partner-unlimited.lic
.To install the license file, use the following steps:
<Alfresco_installation_folder> omcatsharedAlfrescoextensionlicense
After the successful installation of this license, the suffix '.installed' will be appended to the file name and you can begin to utilize the terms of your license immediately.
As mentioned earlier in this chapter, the content in Alfresco is stored in persistent back-end systems, such as a database and a file system. So for the persistence of metadata, we need a database. Alfresco, by default, uses MySQL to persist the metadata.
If you have already installed MySQL on your machine, you can skip this section.
To install MySQL, use the following steps:
setup.exe
file to automatically start the installation. mysql –u root –p
To set up the MySQL Database for Alfresco, carry out the following steps:
<Alfresco_installation_folder>extrasdatabasesmysql.
db_setup.bat
file.db_setup
fails, this may either be because the MySQL service is not running, or because the MySQL command cannot be found. Either correct this or set up the Alfresco database and user manually, by loading the db_setup.sql
file into MySQL, for example, mysql -u root -p <db_setup.sql>
.
mysql -u root –p
command.
show databases
. You will find the database created as Alfresco.To configure the MySQL Database for Alfresco, you need to make the following outlined changes:
To convert
the default installation to MySQL, we simple need to modify two files in the <Alfresco_installation_folder> omcatsharedclassesAlfrescoextension
folder that are set to use default database. The files are custom-repository.properties
and custom-hibernate-dialect.properties
.
In the custom-repository.properties
file, make the following changes:
In the custom-hibernate-dialect.properties
file, make the following changes:
Copy the Database Connector lib has following 2 steps involved:
<Alfresco-root> omcatlib
.For transforming documents such as office to PDF, OpenOffice is used. This is basically a cross-platform office application suite. OpenOffice is an optional installation that provides access to a range of document transformations in Alfresco.
To Install OpenOffice, follow the steps shown below:
OpenOffice.org.writer
module, which is the only module used by Alfresco; all others are not required for Alfresco. Change the installation folder to <Alfresco_installation_folder>OpenOffice
by clicking on Change button, and then click on Next.<Alfresco_installation_folder> omcatsharedclassesAlfrescoextensionootstrap
openoffice-startup-context.xml.sample
file to openoffice-startup-context.xml
, or:soffice "-accept=socket,host=localhost,port=8100; urp;StarOffice.ServiceManager" -nologo -headless
Image Magick
is a software suite that can read, convert, and write images in a variety of formats. Alfresco leverages the power of Image Magick for image transformations. Alfresco already has an executable for this, which is, imconvert.exe,
which available in the <Alfresco_installation_folder>in
folder. To implement Image Magick on the Windows operating system, you are required to add the imconvert.exe
file to the system path, or you can copy this file to the C:WindowsSystem32
folder.
Alfresco
supports the virtual file system via CIFS Interface. It already has win32netbios.dll
available in the <Alfresco_installation_folder>in
folder. To implement CIFS it on Windows operating system, you need to add the file win32netbios.dll
to the system path, or you can copy this file to the C:WindowsSystem32
folder.
To download Alfresco WCM, carry out the following steps:
To install the Alfresco application on a bundled Apache Tomcat use the following steps:
Alfresco-enterprise-wcm-<version>.zip
file into the C:Alfresco
folder.wcm-bootstrap-context.xml
file from the C:Alfresco
folder to the C:Alfresco omcat sharedclassesAlfresco
extension folder.To download the Microsoft Office Add-ins, carry out the following steps:
Alfresco-enterprise-office2003-addins-<version>.zip.
This contains the office installer for all three Add-ins: Microsoft Word, Excel, and Power Point.Alfresco-enterprise-word2003-addin-<version>.zip
, Alfresco-enterprise-excel2003-addin-<version>.zip
, or Alfresco-enterprise-powerpoint2003-addin-<version>.zip
.To install the Microsoft Office Add-ins, carry out the following steps:
setup.exe
file.http://localhost:8080/Alfresco/
in the Web Client URL area.webdev/
to the web client URL in the area for the WebDev URL.Installing the Flash player is optional, but if you are using Alfresco Share, then it is advisable to install this, as Alfresco Share uses the Flash player for viewing Flash previews. It is also used when you want to make use of its Multi File upload facility.
To install Flash player, carry out the following steps:
For previewing PDF files, Alfresco Share uses the pdf2swf utility of the SWFTools. This generates one frame per page of fully formatted text inside a Flash movie. Installing SWFTools is optional.
To install SWFTools, carry out the following steps:
Let's take a peek into the installation folder <Alfresco_installation_folder>,
to look at the folders:
Alfresco
: All of the shortcuts for installing, uninstalling, starting, and stopping Alfresco, are present in this folder as Windows services. In addition, restarting, stopping, and starting of Alfresco, are present as a normal console application. We can access this folder from the Start menu of Windows.alf_data
: All of the Alfresco content and Lucene indexes are stored in this folder.Amps
: All of the AMP extensions files that are required are in here, and then they use the apply_amps script to perform the updates. bin
: This folder contains the sub-installations of Alfresco. The main installation scripts in the Alfresco
folder calls the sub-scripts in this folder in order to start the sub Alfresco Tomcat
component of the installation, creating and setting up the permissions for the Alfresco MySQL database. This folder is very useful for people opting for the manual installation, rather than using an installer.extras
: This folder contains additional files, such as the space template for record management file plans, which can be imported into the Alfresco repository.java
: As is evident by the name, this folder contains the Java Development Kit. All of the Alfresco development is done by using Java as the core programming language.licenses
: This folder contains the licenses for Alfresco, MySQL, and Apache along with licenses for the other third party applications used inside Alfresco.tomcat
: Once again, as evident from the name, this folder holds the Tomcat installation, where the Alfresco application is deployed as a WAR file. You can see the Alfresco.war and share.war
files in the webapps
sub-folder of this folder.Openoffice
: This folder contains the entire portable office suite installation that is used for word processing, spread sheet processing, and so on. virtual-tomcat
: This folder contains the customized Tomcat, which is used for previewing files in WCM.README
: README
files provide information about using CIFS, and some troubleshooting tips.You can uninstall any program by double-clicking on the uninstall.exe
file.
The options for starting and stopping Alfresco as a console application can be viewed by selecting Start | All Programs | Alfresco Enterprise. The options are as shown in the following screenshot:
The options there are discussed below:
Alternatively, you can always start, stop, and restart the Tomcat application server, and the MySQL database server, manually, by going to their respective folders. This gives more control to the user. However, the console option provides batch files to perform the start and stop procedures in a consolidated way, relieving the user of any unwanted errors.
You can also configure Alfresco as a Windows service in a standard Alfresco/Tomcat Installation. With the default installation, Alfresco is bundled as a web application that launches within Tomcat. To configure Alfresco to run as a Windows service, you need to set up Tomcat to run as a Windows service.
To configure Alfresco as a Windows service, carry out the following steps:
<Alfresco_installation_folder>
/tomcat/bin folder.service.bat install Alfresco
tomcat5.exe //US//Alfresco
:-DisplayName "Alfresco Server"tomcat5.exe //US//
Alfresco:-JvmMs=256 --JvmMx=512 --JvmSs=64tomcat5.exe //US//
Alfresco:-JavaHome<Alfresco_installation_folder>/java
tomcat5.exe //US//
Alfresco:-Environment ALF_HOME=<Alfresco_installation_folder>
/tomcat5.exe //US//
Alfresco:-Environment PATH=<Alfresco_installation_folder>
/bin;%PATH%tomcat5.exe //US//
Alfresco:-StartPath <Alfresco_installation_folder>
--Startup autoTo uninstall the service, go to the <Alfresco_installation_folder>/tomcat/bin
and enter the following command: service.bat uninstall Alfresco.
To edit your service settings, go to the <Alfresco_installation_folder>/tomcat/bin
and enter the following command: tomcat5w.exe //ES//Alfresco
To start the service, locate the service named Alfresco Server in your Windows Service control panel, and start Alfresco from this control panel.
Alfresco
provides a nice package that includes all of the programs you need for using Alfresco on your Linux machine. Download this package from the customer or partner's portal by selecting the latest version of the Alfresco-<version>-linux-community.bin
file.
This installer file contains Tomcat, Open Office and Alfresco. Make sure that you have permissions to execute the installer. Make sure that you have JDK 5 or higher installed on your machine before installing Alfresco.
Use the following command to change the permissions on the installer so that it can be executed:
> chmod a+x ./Alfresco-<version>-linux-community.bin
Become the root (super) user, in order to install, by executing the following command (for some platforms that have the super user account disabled by default, you might require "su –s").
> su
Next, execute the installer directly on the command prompt as follows.
./Alfresco-<version>-linux-community.bin
Follow the instructions presented by the installer:
/opt/Alfresco-<version>
will be selected. If you want to change it, /usr/local/Alfresco-<version>
will often be another good choice.alf_start.sh
file, which is available in the Alfresco root folder. Wait a few seconds to allow Tomcat to start, and then fire up your web browser and browse to http://localhost:8080/Alfresco
. Because this is the first time that you are using Alfresco, use the username and password admin.Alfresco provides extensions as AMP files, which we can install with the help of the Module Management Tool in Alfresco. The Module Management Tool supports the installation of AMP modules, including upgrades to later versions, enabling and disabling of installed modules, uninstallation of installed modules, and listing of currently installed modules.
To install any AMP module in Alfresco, please refer to the following steps:
.amp
extension.<extension-module>.amp
file to
<Alfresco_installation_folder>amps
apply_amps.bat
file, which is available at <Alfresco_installation_folder>
. This will install the particular module.Some of the extension modules available within Alfresco are Alfresco-blog-integration.amp
for Blog Publishing, Alfresco-fb-doclib.amp
for FaceBook integration and Alfresco-recordsmanagement.amp
for Records Management sample functionality.