The beauty of Alfresco lies in the way it can be included in your preferred environment. It does not ask for a change in your existing setup. The pre-requisites for installing Alfresco are basic. It supports a broad technology stack. This chapter is aimed at enabling you to understand and carry out various aspects of the Alfresco Share installation and configuring various components around it.
A basic understanding of Alfresco architecture, various installation options, and the key terminologies used are all a part of this chapter. The Alfresco development environment needs to be set in place before we can work with the tools.
The installation procedures can also vary depending on the kind of system you have in place to set up and configure Alfresco. First, we will go through the installation procedures for a Microsoft Windows-based system. Linux and Mac-based systems also follow similar steps. We will go into the details of the same, later in the chapter.
At the end of this chapter, you will have learned the following:
Pre-requisites for the installation
Configuring the Alfresco setup
Setting up the Alfresco development environment
Alfresco is a 100 percent open source software developed using open standards. It can be operated on various operating systems, relational databases, application servers, web browsers, portals, and it supports various languages.
Alfresco currently provides two types of product download options: community and enterprise. The latest release of Alfresco has an Enterprise Edition, as well as a Community Edition.
Both the options have the same code base and features, and are 100 percent open source. For both the options, you can use Alfresco documentation (wiki), community support (forums), and community contributed add-on products. Alfresco Community Lab Network is free. Alfresco Enterprise Network includes the 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 releases Early and Often and renders a daily build, offering the latest functionality. It doesn't provide scalability, high availability certifications. I would recommend this to 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.
If you are implementing Alfresco for a Major Corporation, financial, insurance, government or healthcare organization, I would recommend you go for Alfresco Enterprise Network support. The primary benefit is that with the support of Alfresco, and its certified partners, you would get a stable, reliable, certified, and supported application with a warranty and indemnity. Your Alfresco version will be certified on all available stacks such as Linux, Windows, MySQL, Oracle, and so on. You will 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.
We have used Alfresco Enterprise Version 3.4.3 for the purpose of this book. You can download the community version of Alfresco 3.4.3 from the following URL:
http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco.
You can download the enterprise version on Alfresco 3.4.3 from the following URL:
Choosing an operating system to run Alfresco will be based on various factors. For some companies, it depends on in-house expertise. For example, if you have administrators and IT staff who can easily manage business applications running on 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 the existing systems.
If you do not have any preferences, I would recommend you go with the Linux operating system for production use. The Linux source code is freely distributed. Tens and 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 as follows:
If the Microsoft Windows operating system is the OS of choice, then the natural choice for you could be the MS SQL Server. If you already have an Oracle license, then the Oracle database is also an option. Alfresco now comes bundled with, and supports, the PostgreSQL database.
Alfresco has started using Apache iBATIS. It also is no longer using Hibernate from Version 3.4 onwards. The use of iBATIS allows a better level of control over the data access layer. This ensures scalability and support for large repositories and large deployments which Alfresco handles.
If you do not have any database preference, it is recommended that you go with the PostgreSQL database which is bundled with the Alfresco you procure.
Alfresco runs on any J2SE 5.0 compliant 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. Therefore, there is no dependency on JBoss or any other application server which provides the EJB container. 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 Tomcat might be a good option. Apache 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 must consider using the JBoss application server, which has the highest market capture (more than 35 percent) in 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 cache's 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 to increase scalability. Alfresco's business process management features are powered by the JBoss JBPM tool.
If you have already invested in JBoss, then Alfresco provides a complementary industry-leading enterprise content management technology to the JBoss enterprise middleware system suite.
It is optional for you to go with a portal of your choice; if you already have an enterprise portal 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 the Alfresco built-in support.
The 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. While most packaged portal frameworks help enterprises launch portals more quickly, only the 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, but can run against most full application-servers out-of-the-box including JBoss, JRun, BEA, WebLogic, and Orion. It has a complete set of web service interfaces to the portal. Liferay supports 800+ portlets (products) and has a wider adoption in the market.
No installation or configuration is required for the Alfresco user interface. Any number of web browsers can connect to the application without prior client installation costs. The out-of-the-box installation comes with Alfresco Share and the Alfresco Share web client where you can connect to the Alfresco Repository through web-based applications.
Apart from these applications, Alfresco out-of-the-box installation supports various client applications to access the Alfresco content with web services or protocols such as FTP, WebDAV, CIFS:
File Transfer Protocol (FTP): It is useful to transfer files from your local file system to the remote server.
WWW Distributed Authoring and Versioning (WebDAV): It is primarily designed for editing and managing files on remote web servers in a structured way. For example, an application like Adobe Photoshop can directly open and edit a file in the Alfresco content repository. This gives you the flexibility of using your own favorite editor to edit the content on the Alfresco server.
Common Internet File System (CIFS): It maps the Alfresco content as your local file system folder.
Web Services: Most of the ECM products, in the market-store content are in a proprietary format, which is like a "black box". The Alfresco content is stored as per the JCR (Java Content Repository‑JSR 170) open standards. Any JCR-compliant client application can read the content which 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 could connect to the Alfresco Repository from your applications through web services or JCR integration.
Depending on your system, you can install Alfresco by using one of the following methods:
Using an installation wizard, which contains the required software and components you need
Using a standard WAR
file to deploy on an existing application server
There are a number of different installation options available to you, each of which you can choose, depending on what is already installed on your system. By choosing an installation file that contains only the necessary components, this lets you reduce your download time. For example, if you already have a JDK installed, you can download an installation file that does not contain JDK. The following is the list of software you need on your machine before you install Alfresco:
Component |
Recommendation |
---|---|
Java SE Development Kit (JDK) |
The |
Application server |
Alfresco runs within an application server. Alfresco runs within Tomcat. An Alfresco-Tomcat bundle is also available for the installation. Alfresco can also be installed on other application servers such as JBoss, WebLogic, and WebSphere. If you wish to install Alfresco within another application server, use the Alfresco WAR file. |
Database |
Alfresco comes preconfigured with the PostgreSQL database. You also have the option of using one of the supported databases. |
OpenOffice.org |
Alfresco uses OpenOffice for transforming documents from one format to another, for example, a text file to a PDF file. If you do not install OpenOffice, you will not have access to the transformation functionality. Use the latest (stable) version of OpenOffice.org. |
ImageMagick |
Alfresco uses ImageMagick for image previews. |
Flash Player |
Flash Player Version 10.x is required to upload multiple files and view Flash previews. If Flash is not installed, then the bulk upload option will not be visible. |
SWF Tools |
If you do not install SWF Tools, you will not see PDF previews. Alfresco Share uses the PDF2SWF utility for previewing PDF files. |
Let's take a look at the architecture on which Alfresco will run, and also for verifying the production environment prior to installing Alfresco.
Carry out the following steps:
Check if your preferred environment is supported by Alfresco. A support stack list is available on www.alfresco.com.
Validate the hardware in terms of the CPU and I/O subsystems. This will help ensure a good response time.
Tune your database. Alfresco does not provide support to tune and maintain your database. It will have to be carried out by the Database Administrator at your end.
Ensure your OS is on the Alfresco Support Stack list.
Tune JVM and verify that it is certified to be used with your Alfresco.
Carry out the following steps:
Check that the server host name can be resolved in DNS.
Validate the listening ports and the JVM Version. JVM 1.6 is the required version.
Check the directory names for spaces.
Check the read and write properties of the directory that will be the Alfresco Repository.
Verify the database connections. Validate that the character encoding for the Alfresco database is UTF-8.
Ensure that the MySQL storage engine for Alfresco is InnoDB.
If you plan to install third-party tools such as OpenOffice and ImageMagick separately, ensure that you have the appropriate versions. OpenOffice needs Version 3.1 or newer and ImageMagick Version 6.2 or newer.
There are a number of installation files available to choose from, based on your preference depending on what is already installed on your system.
The setup wizard's option installs all the components you need for running Alfresco. All the recommended software is installed and the configurations are set. When you install Alfresco using the setup wizards, it runs within an instance of the Tomcat application server. Use this file if no Alfresco component is installed on your system.
If you want to install Alfresco within an existing Tomcat or another application server, use the Alfresco WAR file. If you use the WAR file to install Alfresco, you must install the required additional components manually.
This is the easiest way to install Alfresco. The wizard installs all the software and components that you require for running Alfresco.
Let's take a look into the installation directory<alfresco_installation_folder>
to look at the folders:
alfresco:
All the shortcuts to installing, uninstalling, starting and stopping Alfresco as a Windows service, and restarting, stopping and starting of Alfresco as a normal console application, from the Start menu of Windows points to this folder.
alf_data:
All the Alfresco content and Lucene indexes are stored in this directory.
amps:
All the AMP extension files are required to be put here and then use the apply_amps script to perform the update.
bin:
This directory contains the sub-installations of Alfresco. The main installation scripts in the alfresco
directory calls the subscripts in this folder to start the sub Alfresco Tomcat
component of the installation, creating, and setting up the permissions for the Alfresco PostgreSQL database. This folder is very useful for people going for the manual installation rather than using an installer.
extras:
Contains additional files such as space template for the records management file plan which can be imported into the Alfresco Repository.
java:
As is evident by the name, it contains the Java Development Kit. All the Alfresco development is done using Java as the core programming language.
licenses:
This directory contains the licenses for Alfresco, PostgreSQL, Apache, and licenses for the other third-party applications used inside Alfresco.
tomcat:
Again, as evident from the name, this directory 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
subfolder of this directory.
Postgresql:
This directory contains the scripts and other essential database related files and folders.
openoffice:
This directory contains the entire portable office suite installation that is used for word processing, spreadsheet processing, and so on.
virtual-tomcat:
This folder contains the customized tomcat, which is used for previewing the files in WCM.
The README
file gives information about using CIFS and some troubleshooting tips.
You can uninstall the program by clicking on the uninstall.exe
application.
This installation wizard installs Alfresco and additional software, including OpenOffice, JDK, SWFTools, ImageMagick, and Tomcat. The following steps are based on the assumption that this is the first Alfresco installation on your machine.
You can choose to download one of the following installation files:
For 32-bit systems: alfresco-enterprise-3.4.3-installer-win-x32.exe
For 64-bit systems: alfresco-enterprise-3.4.3-installer-win-x64.exe
Now you can carry out the following steps:
Double-click on the downloaded file. Under the Setup Alfresco Enterprise window, click on Next.
Select the installation language, as shown in the following screenshot. This sets the language to be used for the remainder of the installation wizard:
In the Installation Type window, you can choose either of the following options:
Easy: Installs Alfresco with the default configuration settings
Advanced: Installs Alfresco with configurable server ports and service properties
The default installation type option is Easy; click on Next, as shown in the following screenshot:
In the Select Components window, select the components that you want to install. You can select from the following list of components:
SharePoint
Records Management
Web Quick Start
Web Project Management (AVM)
Quickr Connector Support
OpenOffice
These are depicted in the following screenshot:
The following components are installed by default and you cannot deselect them:
PostgreSQL
Java
Alfresco
Once you have selected the options to install, click on Next.
C:Alfresco
. Alternatively, click on the icon to choose another location.
In the Database Installation window, you can choose to use the bundled PostgreSQL database, which is installed with Alfresco, or use an existing database instance. Choose the bundled PostgreSQL database, and then click on Next.
In the PostgreSQL Credentials window, type a root password for the bundled PostgreSQL database. Confirm the password.
In the Admin Password window, type a password. Repeat the password, and then click on Next. This sets the password for the Alfresco Administrator user account (admin), as shown in the following screenshot:
If you are installing the Quickr Connector Support component, the Quickr Content Services window will be displayed. Enter the host and port details for your Quickr server, and then click on Next. For example, the default is localhost
and the port number is 6060
. These settings are added to the configuration file for Quickr. This is optional.
Under the Ready to Install window, click on Next; the Installing window is displayed showing the progress of the installation.
Under the Completing the Alfresco Enterprise Setup Wizard window, click on Finish, as shown in the following screenshot. By default, when you click on Finish, the Readme
file will be displayed, click on OK:
Log on to Alfresco Share as the admin user. Enter the password that you specified in the Admin Password window. The Alfresco server is launched automatically as a Windows service.
In order to manage the server, open the Control Panel Services window. The services that must be running for Alfresco are as follows:
alfrescoPostgreSQL
alfrescoOpenOffice
alfrescoTomcat
If you did not automatically launch Alfresco at the end of the installation wizard, to start Alfresco you need to start all three services. Use the servicerun start
script in the installation directory. Alternatively, select All Programs | Alfresco Enterprise | Alfresco Enterprise Service | Start Alfresco Enterprise Service.
In order to stop Alfresco completely, you must stop all three services. Use the scripts in the installation directory to start or stop the services: servicerun start
and servicerun stop
.
The installation wizard for Red Hat Linux installs the software and components that you require for running Alfresco. Here, we have assumed that you are installing Alfresco for the first time. If you have already installed Alfresco and the server is running, you may be prompted to enter alternative port numbers for the components and services that you install, when you run this installation wizard again.
Go to the Downloads area, and download the following installation file: alfresco-enterprise-3.4.3-installer-linux-x64.bin
. Execute the downloaded file, and carry out the following steps:
On the Setup Alfresco Enterprise window, click on Next.
On the Installation Type window, choose how you want to use the setup wizard. There are two types of installation in the setup wizard: Easy, with the default options and configurations; and Advanced, where you can set the ports and choose the components to be installed, and configure service properties. For the Easy setup:
On the Installation folder window, click on Next to accept the default location.
On the Admin Password window, enter a password for the administrator user (admin). Repeat the password, and then click on Next.
Click on Next through the remaining windows in the setup wizard.
Click on Finish to complete the installation. Go to the step for the Completing the Alfresco Enterprise Setup Wizard window and launching Alfresco Share.
In order to complete the Advanced setup wizard, select Advanced, and then click on Next. Follow the steps mentioned here to complete the installation with the Advanced option.
On the Select Components window, select the components that you want to install. Deselect the components that you do not want to install.
You can select from the following components:
Java
PostgreSQL
SharePoint
Records Management
Web Quick Start
Web Project Management (AVM)
Quickr Connector Support
OpenOffice
You cannot deselect the Alfresco component because it is installed by default; click on Next.
The Database Server Parameters window prompts you to enter a port number for your database.
Under the Tomcat Port Configuration window, enter the following Tomcat configuration parameters:
Web Server Domain
Tomcat port
Tomcat Shutdown port
Tomcat SSL Port
Tomcat AJP Port
Default values for each of these are given.
Now enter the port number for the Alfresco FTP server, RMI service.
To set the password for the Alfresco Administrator user account, on the Admin Password window, type a password. Repeat the password, and then click on Next.
Optionally, if you are installing SharePoint Protocol Support, Quickr Connector Support component, or the OpenOffice component, enter the relevant details of the ports and servers.
On the Service Startup Configuration window, you are presented with two options for starting up the Alfresco services. These are:
Manual: Sets the services to be started manually.
Auto: Sets the services to start up automatically when you start your machine.
Select the services start up option, and then click on Next.
Click on Next under the Ready to Install window. The Installing window displays, showing the progress of the installation.
On the Completing the Alfresco Enterprise Setup Wizard window, click on Finish. By default, when you click on Finish, the Readme
file will be displayed; click on OK.
The Alfresco server starts and then Alfresco Share launches in your default browser.
Log on to Alfresco Share as the admin user. Enter the password that you specified in the Admin Password window.
The Alfresco server is launched automatically as a service named alfresco
. This service comprises the following individual services:
postgresql
tomcat
If you did not automatically launch Alfresco at the end of the setup wizard, to start Alfresco, you need to start all the services. Manually start the Alfresco server: service alfresco start
. To start only the Tomcat service: service alfresco start tomcat
.
In order to fully stop Alfresco, you must stop all the services: service alfresco stop
.
If you have an existing Tomcat application server that you want to use to install Alfresco, you can use the Web Archive (WAR) bundle to install Alfresco. This can be used for any platform. For this type of an installation, you must ensure that the required software, a JDK, a supported database, an application server, and the additional Alfresco components are installed on the machine.
In this section, we will help you understand how to install an instance of Tomcat 6.0.26 manually and modify it to use the correct directory structure and files for Alfresco.
These steps describe the installation directory for Tomcat as<TOMCAT-HOME>
. It is recommended that you name the required directories as shared/classes
and shared/lib
because these are the path names used within full Alfresco installations. You can substitute alternative names for these directories.
Now carry out the following steps:
Download the Tomcat Version 6.0.26 from http://tomcat.apache.org. Install Tomcat by following the instructions included in the release.
Create the directories required for an Alfresco installation:
Create the shared/classes
directory
Create the shared/lib
directory
Open the<TOMCAT-HOME>/conf/catalina.properties
file and change the value of the shared.loader
property to the following:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
If you have used alternative names for the directories, you must specify these names in the shared.loader
property.
Copy the JDBC drivers for the database you are using to lib/
.
Edit the<TOMCAT_HOME>/conf/server.xml
file. Set the character encoding to UTF-8 on the Tomcat connector. By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs that are received from a browser. This may cause problems when creating, uploading, and renaming files with international characters.
Locate the Connector section, and then add the URIEncoding="UTF-8"
property, as follows:
<Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8" connectionTimeout="20000" redirectPort="8443" />
Save the server.xml
file.
Here we will see the settings to be done in the PostgreSQL configuration wizard. These will enable the PostgreSQL instance to work with Alfresco.
Configuration wizard Window |
Setting |
---|---|
Server type |
This will also determine the memory allocation. Select Dedicated PostgreSQL Server Machine. |
Database usage |
Choose Transactional Database Only. This creates a database. InnoDB is the storage engine in this case. |
InnoDB tablespace |
Select the default drive and path |
Concurrent connections |
Select Decision Support (DSS) OLAP. This sets the number of concurrent connections to the server. |
Networking and strict Mode |
Accept the default networking options Enable TCP/IP networking, Port Options Number 3306, and the Enable Strict Mode, which will be the default server SQL mode. |
Character set select |
Best Support for Multilingualism sets the default character set to be UTF-8. |
Security options |
Select Modify Security Settings. Type the root password |
The Alfresco WAR file will distribute a set of files, JavaServer Pages, servlets, Java classes, XML files, tag libraries, and static web pages that will constitute it. It also has additional commands, configuration files, and licenses for a manual installation. If you already have installed JDK, a supported database, an application server, and the additional Alfresco components, you can use this method of Alfresco installation:
Browse to the Alfresco Enterprise download area, and download the alfresco-enterprise-3.4.3.zip and specify a location for the download.
Extract the WAR file. The WAR bundle will extract into the following directory structure:
bin
licenses
web-server
The WAR bundle also contains the README.txt
file. The following table shows files that are contained within the suggested subdirectories for the Tomcat application server:
File |
Description |
---|---|
|
Required for CIFS |
|
Required for CIFS on 64-bit Windows |
|
Required for CIFS |
|
Required for CIFS on 64-bit Windows |
|
The JCR Benchmarking toolkit |
|
The Alfresco Module Management Tool (MMT) |
|
The Windows batch file for the Tomcat application server installs, used to apply all AMP files in the |
|
The Linux script file for the Tomcat application server installs, used to apply all AMP files in the |
|
The Windows batch file for cleaning out temporary application server files from previous installations |
|
The Linux script for cleaning out temporary application server files from previous installations |
The /licenses
directory contains the following structure: 3rd-party. This directory contains the third-party license files.
The web-server
directory contains the following structure:
File |
Description |
---|---|
|
Used to define property settings for Tomcat |
|
Used to define context element settings for Tomcat for controlling certain behaviors for the application and the JNDI settings |
|
Used to define server configuration elements for Tomcat |
File |
Description |
---|---|
|
The global properties file, which is used for Alfresco configuration properties |
|
Contains the Alfresco directory structure for the configuration override files, including the |
File |
Description |
---|---|
|
The Alfresco WAR file |
|
The Alfresco Share WAR file |
Move the alfresco.war
file and share.war
files to the appropriate location for your application server. For Tomcat, move the .war
files to the<TOMCAT_HOME>/webapps
directory.
Edit the /shared/classes/alfresco-global.properties.sample
file with your configuration settings.
Save the file without the .sample
extension.
Move the alfresco-global.properties
file to<classpathRoot>
. In case of using the Tomcat server,<TOMCAT_HOME>/shared/classes
.
You can run Share on a separate Tomcat instance. This section talks about the same. These instructions are for Windows deployments. Linux deployments also follow these steps.
Install a new Tomcat instance.
Modify the /conf/server.xml
file for the new Tomcat instance as follows:
Change the port number in the line:
<Server port="<server port number>" shutdown="SHUTDOWN">
Change the port number in the section:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="<connector port number>">"...>
Move the share.war
file from the original Tomcat webapps
directory to the new Tomcat /webapps
directory.
Start the original Tomcat using the Alfresco supplied batch files.
Check that a copy of the commons-el.jar
file is in the Share Tomcat lib
directory.
If you are running the Share Tomcat on a separate machine, modify the override file in the Share Tomcat web-extension
directory, as follows:
Open the share-config-custom.xml
file
Change any instance of the server and port to the correct name or IP address of the Alfresco server. http:// <Server name>:<server port>
Save the file without the .sample
extension.
Start the new Share Tomcat. You can use copies of the Alfresco supplied batch files, or your own methods.
This section describes how to install components that integrate with Alfresco. If you choose Install by Components, then you can select and install the components. These can be installed any time before or after installing Alfresco. This section will take you through the installation of these components.
Within Alfresco, you can transform a document from one format to another; for example, a text file to a PDF file. In order to have access to these transformation facilities in Alfresco, you must install OpenOffice. This is optional, and can be done any time after Alfresco is installed. If you installed Alfresco using an installation wizard, OpenOffice may already be installed.
Download the latest (stable) version of OpenOffice for your platform from http://download.openoffice.org.
When prompted, specify a download destination. Browse to the location of your downloaded file, and install the application.
A wizard guides you through the installation.
Accept the license agreement, and then click on Next.
Enter customer information as appropriate, and then click on Next.
Select Setup type as Custom, and then click on Next, as shown in the following screenshot:
Change the installation directory to:
Windows: c:AlfrescoOpenOffice
Linux: /opt/alfresco/OpenOffice
Optionally, select the files for which you want OpenOffice to be the default application, and then click on Next, as shown in the following screenshot:
Start one of the OpenOffice programs for the initial registration, and then close the program.
Modify the ooo.exe
property in the<classpathRoot>/alfresco-global.properties
file to point to the OpenOffice binary office.exe
.
For Windows, set the path using the \
separator or use the forward slash (/) Unix path separator. For example: c:\Alfresco\OpenOffice\soffice.exe
, or c:/Alfresco/OpenOffice/soffice.exe
.
For Solaris, ensure that the<configRoot>/classes/alfresco/subsystems/OOoDirect/default/openoffice-transform-context.xml
file can start.
Remove the quotes from the connection string values:<value>-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager</value><value>- env:UserInstallation=file:///${ooo.user}</value>
.
If the Alfresco server is running, [stop and start], or restart the server.
In order to enable image manipulation in Alfresco, you must install and configure ImageMagick. Alfresco uses ImageMagick to manipulate images for previewing. If you installed Alfresco using one of the installation wizards, ImageMagick will already be installed:
Verify if ImageMagick is already installed on your system by running the convert
command, which is part of ImageMagick and usually located in /usr/bin
(on Linux).
If ImageMagick is not installed on your system, browse to the ImageMagick download site and install the appropriate package for your platform.
Modify the img.root
and img.exe
properties in the<classPathRoot>/alfrescoglobal.properties
file to point to the ImageMagick root directory. For example, on Windows:
Set the img.root
property to img.root=C:/Alfresco/ImageMagick
Set the img.exe
property to img.exe=C:/Alfresco/ImageMagick/bin/convert.exe
For Linux:
Set the img.root
property to img.root=/ImageMagick
Set the img.exe
property to img.exe=/ImageMagick/bin/convert.exe
Ensure that you do not include a slash (/) at the end of the path, for example, /ImageMagick/
.
This section describes how to install Alfresco add-ins for Microsoft® Office applications, such as Word, Excel, and PowerPoint. The Alfresco add-ins have been designed with Microsoft Office 2003 in mind, however, they are also compatible with Microsoft Office 2007. Before you start, make sure that:
The .NET Programmability Support option is installed for each of the Office applications that you are installing the add-ins (such as Word, Excel, and PowerPoint). To find these options, run the Office setup program and expand the list of available options for each application. You may require your original Office 2003 install media to add these required components.
The installing user has Windows administrator privileges.
Any Microsoft Office applications on your system are NOT running, including Outlook if you use Word as an e-mail editor. If you are running Office 2007 on Windows Vista, note that Microsoft has rewritten the WebDAV parts of Vista which means you will experience READ ONLY access to the Alfresco Repository over WebDAV. This is a known problem with Vista and affects many applications, including Microsoft's own SharePoint server. There is no known workaround at the time of writing. CIFS access is unaffected and works as it does with Windows XP. Therefore, use CIFS to obtain read/write access to Alfresco using Windows Vista.
Now carry out the following steps:
Browse to the Alfresco Community Edition download area.
Run the Microsoft setup file: alfresco-community-office2003-addins-3.2.zip
.
This example refers to the Office installer that installs all three Add-ins. You can also use individual installers to add Alfresco to one of the three Office applications. These individual installers are as follows:
alfresco-community-word2003-addin-3.2.zip
alfresco-community-excel2003-addin-3.2.zip
alfresco-community-powerpoint2003-addin-3.2.zip
Run setup.exe
.
If required, the setup program will download the required components from the Microsoft website. These components are .NET 2.0 framework, and Visual Studio 2005 Tools for Office Second Edition runtime. The setup is complete.
Run the Office application, for example, Word.
A Welcome window with configuration options displays. You can return to the configuration options at any time using the link at the bottom of the Add-In window.
In the Web Client URL field, enter the location of Alfresco Explorer, for example, http://server:8080/alfresco/
.
In the WebDAV URL field, append webdav/
to the Alfresco Explorer URL, for example, http://server:8080/alfresco/webdav/
.
In the CIFS Server field, enter the path to the CIFS server. The add-in will try to autocomplete this value, but you should verify it for the correct address, for example, \server_aalfresco or \serveraalfresco
.
If you intend to use the CIFS interface to save documents through the add-in, it is very important that you are authenticated automatically. Limitations in the Microsoft Office APIs mean that an error is shown instead of an authentication dialog box, if the Alfresco CIFS interface rejects your connection attempt. If you are not in an enterprise environment, where it may not be possible to configure automatic authentication, you can map a network drive to the Alfresco CIFS interface instead.
In the Authentication area, enter your Alfresco username and password.
The add-in will always try to automatically log you into Alfresco in order to present your checked out documents (that were checked out) and your assigned tasks. If you are using the CIFS interface, authentication is usually automatic. However, sometimes the add-in needs to present your Alfresco username and password for authentication. It is recommended that you enter, and save, your Alfresco credentials. All values are stored in the Windows registry and your password is encrypted against casual hacking attempts.
Click Save Settings.
Alfresco Share uses the Flash Player for viewing Flash previews, and also when you use the multi-file upload facility. This is optional and may be installed after you have installed Alfresco. Carry out the following steps:
Browse to the Adobe Flash Player download website: http://www.adobe.com/products/flashplayer.
Download the latest (stable) version of Flash Player for your platform.
Browse to the location of your downloaded file and install the application. A wizard guides you through the installation.
When the installation is complete, click Close.
Alfresco Share uses the PDF2SWF utility of the SWF Tools for previewing PDF files. The PDF2SWF utility generates one frame per page. In the flash movie, the text is completely formatted. To install the PDF2SWF utility, you must install the complete SWF Tools.
This section describes the steps used to install the SWF Tools on Windows:
Download the latest (stable) version of the SWF Tools for your platform. The Windows version is designated with the suffix .exe
. Download a version post 0.8.1 from 2007 because it does not support a few functionalities which Alfresco needs to render the preview.
Browse to the location of your downloaded file and install the application. A wizard guides you through the installation.
Accept the license agreement and click on Next.
Select the installation directory. Select whether you want to install the SWF Tools for all users or only for the current user. Click on Next to begin the installation process.
By default, the options to Create start menu and Create desktop shortcut are selected, click on Finish.
Modify the swf.exe
property in the alfresco-global.properties
file. This will point to the SWF Tools root directory. Make sure that you do not include a slash (/) at the end of the path.
For Linux, there is no binary version, so you need to compile a development snapshot. You can download and install all of the required packages using the following command:
yum install zlib-devel libjpeg-devel giflib-devel freetype-devel gcc gcc-c++
Carry out the following steps:
Download the latest version of the SWF Tools for your platform. The Unix version is designated with the suffix .tar.gz
. Download a version post 0.8.1 from 2007-02-28 because it (previous versions do not) does not support a few functionalities which Alfresco needs to render the preview. The following version has been tested and verified by Alfresco as being fully functional: http://www.swftools.org/swftools-2008-10-08-0802.tar.gz.
Unpack the tar.gz
file. The install file contains detailed instructions on how to compile and install the SWF Tools.
Change to the directory containing the source code.
Type the following command to configure the package for your system:
./configure
If you see a message on Red Hat Linux that states your operating system is unknown, then use the following setting:
./configure build=x86_64-pc-linux-gnu
If you have an issue on Solaris with the lame libs, you can disable the making of portions of SWF Tools that use lame. Use the following setting to do this:
./configure -disable-lame
Type the following command to compile the package:
make
Type the following command to install the programs, data files, and documentation:
make install
By default, the files are installed to the /usr/local/bin
directory.
Modify the swf.exe
property in the alfresco-global.properties
file to point to the SWF Tools root directory. Ensure that you do not include a slash (/) at the end of the path.
The language pack is supplied in the default Alfresco install. This is used for translations. This includes English, Catalan, Croatian, Czech, Danish, German, Spanish, Greek, Finnish, French, Italian, Japanese, Dutch, Polish, Portuguese, Portuguese (Brazilian), Russian, Swedish, Turkish, Simplified Chinese.
The language used switches according to the browser locale. If you have a translation that is not provided with Alfresco, then you must add the appropriate TinyMCE language pack for the translation to work correctly. If you installed Alfresco using one of the installation wizards, the default language packs are already installed.
Browse to the TinyMCE website: http://tinymce.moxiecode.com/download_i18n.php and download the required TinyMCE language pack.
Unpack the language file:
For Share, unpack to:<TOMCAT_HOME>/webapps/share/modules/editors/tiny_mce
For Explorer, unpack to:<TOMCAT_HOME>/webapps/alfresco/scripts/tiny_mce
An Alfresco Module Package (AMP) is used to distribute the additional functionality for Alfresco. It consists of a bundle of code, content model, content, and the directory structure. This section describes how to install an AMP in an Alfresco WAR using the Module Management Tool (MMT). The MMT is used to install and manage AMP files, and it is included in the Alfresco installers. The MMT is also available as a separately downloadable JAR file from the Alfresco release download area (alfresco-enterprise-3.4.4.zip)
.
For Tomcat, alternatively, run the apply_amps.bat
command, which is in the root Alfresco directory. This batch file applies to all the AMP files that are located in the amps
directory.
Browse to the /bin
directory:
Windows: C:Alfrescoin
Linux: /opt/alfresco/bin
Run the following command:
java -jar alfresco-mmt.jar install <AMPFileLocation> <WARFileLocation>[options]
Please specify the option in the preceding command as per the details mentioned in the following table. The various options for the same are also listed:
Option |
Description |
---|---|
|
The location of the AMP file that you want to install. |
|
The location of the WAR file for your Alfresco installation. |
|
Install command [options]. Enables detailed output containing what is being updated and to where it is being copied. |
|
Install command [options]. Indicates that the AMP file location specified is a directory. All AMP files found in the directory, and its subdirectories, are installed. |
|
Install command [options]. Forces installation of AMP regardless of the currently installed module version. |
|
Install command [options]. Previews the installation of AMP without modifying the WAR file. It reports the modifications that will occur on the WAR without making any physical changes, for example, the changes that will update existing files. It is good practice to use this option before installing the AMP. |
|
Indicates that the WAR will not be backed up before the AMP is installed. |
This command installs the files found in the AMP into the Alfresco WAR. If the module represented by the AMP is already installed and the installing AMP is of a higher release version, then the files for the older version are removed from the WAR and replaced with the newer files. The following commands show examples of how to install the example-amp.amp
, and assumes that the AMP file is in the same directory as the WAR file:
java -jar alfresco-mmt.jar install example-amp.amp alfresco.war - preview
Review the modification to check the changes that will update any existing files.
The following example will install the AMP file:
java -jar alfresco-mmt.jar install example-amp.amp alfresco.war - verbose
The modified Alfresco WAR can then be redeployed back into your application server. On restarting the application server, the console will show that the custom class was initialized during the startup.
Verify that the AMP is installed using the MMT list command. For example:
java -jar alfresco-mmt.jar list <WARFileLocation>.
This command provides a detailed listing of all the modules currently installed in the WAR file specified. When the repository is now started, the installed module configuration will be detected. The repository will now be bootstrapped to include the new module functionality and data. It is not recommended that you overwrite an existing file in an AMP unless necessary.
The MMT makes a backup copy of the updated file and stores it in the WAR. When an update of the module occurs and the old files are removed, this backup will be restored prior to the installation of the new files. The alfresco.war
file is backed up and the copy is stored in a new file named alfresco.war.bak
in the same directory as that of the original .war
file.
The Firefox extension allows access to the network folder for an Alfresco space from the Firefox browser. To access the network folder for a space in the Firefox browser, you must install the Alfresco Firefox extension through the following steps:
Go to the URL: http://sourceforge.net/projects/alfresco. Click on Download to display the available Alfresco Content Management downloads.
Locate Firefox extension and click on Download. Click on the link alfrescoext-0.91.xpi.
In the list of download sites, click on Download for the site nearest to you. Allow permission to install the extension.
The Microsoft Office SharePoint Protocol Support offers Microsoft users a greater choice by providing a fully-compatible SharePoint repository that allows the Microsoft Office Suite applications to interact with Alfresco as if it was SharePoint. This enables your users to leverage the Alfresco Repository directly from Microsoft Office.
You can also use Microsoft Office SharePoint Protocol Support to enable the online editing for Office documents within Alfresco Share. It enables your users to modify Office files without checking them in and out. Alfresco locks the file while it is being modified, and releases the lock when the file is saved and closed. This feature is, however, available once the Microsoft SharePoint Protocol Support is installed. The following diagram shows the architecture of the SharePoint Protocol Support in relation to an Alfresco installation:
The SharePoint Protocol Support architecture embeds a Jetty Web Server within the Alfresco Repository. The Microsoft Office clients communicate directly with the Jetty server using WebDAV-like calls with proprietary extensions and on a different port number from Alfresco Share. This port number can be configured in the SharePoint Protocol Support properties files.
The SharePoint Protocol support functionality is installed from an Alfresco AMP. If you use the Windows or Linux installers to install Alfresco, the SharePoint Protocol Support is installed by default. These instructions describe how to install the SharePoint Protocol Support into the Alfresco WAR. When you install this file, it responds to the SharePoint requests from Office and, therefore, allows Alfresco to appear as the SharePoint server.
Note: If you installed Alfresco using an installation wizard, the SharePoint protocol may already be installed.
Browse to the download area and download the vti-module.amp
file.
Move the file to the amps
directory.
Install the vti-module.amp
file into the alfresco.war
file using the Module Management Tool (MMT). The vti-module.amp file holds the functionality for the SharePoint connector. For Tomcat, alternatively, run the apply_amps.bat
command, which is in the root Alfresco directory. This batch file applies to all the amps that are located in the amps
directory.
Start your Alfresco server to expand the directory structure.
Verify that you have applied the SharePoint AMP to Alfresco by checking that you have the following directory:
/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context.
The SharePoint Protocol Support functionality uses the properties in the default configuration file named vti.properties
in<TOMCAT_HOME>/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context
.
Custom properties and overrides can be set in the alfresco-global.properties
file. Ensure that you have applied the SharePoint Protocol Support AMP:
Open the alfresco-global.properties
file.
2 Add the following properties:
vti.server.port=7070 vti.alfresco.deployment.context=/alfresco vti.alfresco.alfresoHostWithPort=http://your-host:8080 vti.share.shareHostWithPort=http://your-share-host:8080
The following table describes the properties:
Property |
Description |
---|---|
|
Use this property to configure on which port the SharePoint server listens. The default port number is |
|
Use this property to specify the URL that you enter in the Microsoft Office Shared Workspace. The default is set to |
|
Use this property to specify the IP address, or the hostname of the Alfresco server. Replace your host with the location of your Alfresco server. |
|
Use this property to specify the Share instance. Replace your-share-host with the location of your Share instance. This property includes the prefix |
The vti.properties
file in <TOMCAT_HOME>/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context
contains the full list of properties.
Do not change the properties in this file; use only the alfresco-global.properties
file.
Save the alfresco-global.properties
file.
Restart your Alfresco server. The Microsoft SharePoint Protocol Support functionality is installed and configured.
Alfresco can be extended to develop the required functionality. The alfresco-global.properties
file in the Alfresco bundle has the customizations required to carry out the extension.
The alfresco-global.properties
file has sample settings for running Alfresco. Details such as index and content data locations, database connection and driver properties, third-party software locations, and so on are all contained in the file.
Based on your selected method of installation, the alfresco-global.properties
file is modified automatically or manually. Installation by using the WAR file requires the file to be modified manually and installing using the wizard automatically modifies the settings.
Let's now take a look at how to modify the alfresco-global.properties
file to carry out customizations to extend Alfresco.
If you are using a Windows-based system, replace the path separator character with \
or /
(forward slash), to edit the alfresco-global.properties file. You will also need to use folder names such as My_Home
instead of My Home
by manually escaping the space.
Go to the<classpathroot>
directory.
Open the alfresco.global.properties.sample
file. To make modifications, remove the comment character #.
Include a root location for storing content binaries and index files in the dir.root
property, for example, dir.root=C:/Alfresco/alf_data
.
Now set the database connection properties.
Property |
Description |
---|---|
|
The username will be the name of the main user of the Alfresco database and it will be used to authenticate with the database. |
|
This will be the password for the above user and will also be used to authenticate with the database. |
Other database properties can also be configured. The other tools and software that are configured with Alfresco also need to have their location specified. This can also be done in the alfresco-global.properties
file.
Property |
Description |
---|---|
|
It specifies the OpenOffice installation location. |
|
It specifies if using the Direct OpenOffice subsystem. |
|
It specifies the location of the OpenOffice installation for Remove the # before |
|
The port numbers used by each |
|
It specifies if using the |
|
It specifies the ImageMagick installation location. |
|
It specifies the SWF tools installation location. |
The properties for the database are grouped into sections for various databases such as MySQL, Oracle, SQL Server, and PostgreSQL.
Uncomment the db.driver
and db.url
properties for the database that you require.
Select a JDBC driver used with the connection type.
Now add the global custom configurations.
Save your file without the .sample extension.
Restart your Alfresco server for the configuration changes to take effect.
This section describes how to start and stop the following:
Alfresco server
Alfresco Share
Note: Before running Alfresco, you may need to modify the configuration settings. If you have installed Alfresco using one of the installation wizards, the configuration is set for you.
The options for starting and stopping Alfresco as a console application can be viewed by clicking on Start | All Programs | Alfresco Enterprise, as shown in the following screenshot:
These options are discussed as follows:
Alfresco Enterprise Service: This option is used to start and stop Alfresco. It also starts and stops the PostgreSQL server and the Tomcat application server.
Alfresco Enterprise Virtual Server: This option is used to start and stop the Alfresco Virtual server. It also starts and stops the Virtual Tomcat application server.
Alfresco Explorer: This option is used to open the Alfresco Web Client in the browser.
Alfresco Share: This option is used to open Alfresco Share in the web browser.
Alfresco Website: This option is used to open the Alfresco website in the web browser.
Alternatively, you can always start, stop, and restart the Tomcat application server, and the PostgreSQL database server, manually by going to their respective directories. It gives more control to the user. However, the console option gives batch files to perform the start/stop procedures in a consolidated way relieving the user of any unwanted errors.
Once you have installed Alfresco, you can test the installation by starting the server.
Browse to C:alfresco
and double-click on alf_start.bat
Alternatively, if you installed Alfresco using the installer, from the Start menu, select All Programs | Alfresco Community Edition | Start Alfresco Server
A command prompt opens with a message indicating that the server has started.
INFO: Server startup in nnnn ms
.
For Linux: Browse to /opt/alfresco/
and run alfresco.sh
start.
The default shell is sh
. You can edit the alfresco.sh
file to change to your preferred shell.
Once you have installed Alfresco, you can start Alfresco Share by using a browser.
Browse to the location of your Alfresco installation.
If you installed Alfresco on your local machine:
Browse to http://localhost:<server ip port>/share
; in Windows, alternatively, you can click on the Start menu and select All Programs | Alfresco Community Edition | Alfresco Share. Alfresco Share opens.
Log in using admin as the default user name and password.
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. In order to configure Alfresco to run as a Windows service, you need to ensure that Alfresco and JDK 6 are installed on your machine.
Open a command prompt.
To install Alfresco as a Windows service, enter the following commands (we assume here that Alfresco is installed at c:alfresco
for Tomcat 6):
cd c:alfresco omcatin
service.bat install alfresco
tomcat6 //IS//Tomcat6 --DisplayName="Alfresco Server"
--Install="C:Program FilesTomcatin omcat6.exe" -Jvm=auto
--StartMode=jvm --StopMode=jvm
--StartClass=org.apache.catalina.startup.Bootstrap -- StartParams=start
--StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop
To edit your service settings, enter the following commands (for Tomcat 6):
cd c:alfresco omcatin
tomcat6w.exe //ES//alfresco
Locate the service named Alfresco Server in the Services panel.
Start the Alfresco Server service. You can uninstall the service using the following commands:
cd c:alfresco omcatin
service.bat uninstall 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 can be installed using a number of different methods, as per your preference. You can install Alfresco as a standard Web Archive (WAR) file to deploy on your existing application server, or as a bundle that includes a preconfigured Tomcat server, the Alfresco WAR (alfresco.war), batch files, database setup scripts, and a sample extensions folder.
The various flavors of installations mentioned in this chapter are aimed to help you select the best suited for your purpose and optimize your development experience with Alfresco WCM.
3.14.252.56