Installing Alfresco
Before directly delving into installation, it is important for you to understand the architecture behind Alfresco and various installation options available to you. This will help you to make good decisions in selecting the suitable software for your business application.
Out of the box installation architecture
The out of the box deployment of Alfresco is a typical web application architecture consisting of different layers as shown in the following diagram. This new architecture is basically N-tier and delivers more scalability without massive hardware and software investment. It also accommodates 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.
Client applications layer
The client applications layer contains the actual application as a web browser on the user's machine; basically the presentation layer. Out of the box Alfresco provides two client applications: Alfresco Explorer and Alfresco Share. Alfresco Explorer is pure document management web application whereas Alfresco Share is Web 2.0 application which 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 the support for CIFS, FTP, WebDAV, Microsoft Office, and so on. Refer to Chapter 9, Integrating External Applications with Alfresco, for more information on the different client applications integrated to leverage the services provided by Alfresco.
Repository services layer
The repository services layer consists of Alfresco components and services. This new architecture has 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 SharePoint protocol support offers Microsoft users greater choice by providing them with the first open source fully-compatible SharePoint repository. Companies can leverage existing investments in Linux, Java as well as Microsoft .NET connection software to significantly reduce their SharePoint total cost of ownership and maximize their hardware and software investments. 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.
Data storage layer
The data storage layer stores the data in a relational database and filesystem.
There is a reason for using both database and filesystem 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 and XML) to images, audios, and videos. The actual content and its related versions are stored as binary files in the filesystem. Storing content on a filesystem has its own advantages. It allows for very large content, random-access streaming, and options for different storage devices. It is important to note that Alfresco is agnostic with respect to the filesystem it utilizes. It is possible to configure Alfresco to use a vast diversity of filesystems.
Alfresco uses Lucene and Solr, popular open source search engines, to provide metadata search and full-text search capabilities of the content. Apart from the actual binary content, indexed files are also stored on the file system.
The content metadata consists of information which includes elements such as:
- The format of the content
- Date created
- Language
- Security settings, which are stored in the relational database
Components of Alfresco applications
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 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 the user specific requirements. The out of the box web client gives you a 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 adept knowledge worker UI; the current JSF client will still be available and unchanged.
How can you access the application
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 costs.
The out of the box installation comes with Alfresco Share and 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 Alfresco content with web services or protocols such as FTP, WebDAV, and CIFS:
- File Transfer Protocol (FTP): It is useful to transfer files from your local filesystem 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 such as 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 Alfresco content as your local filesystem folder.
- Web services: Most of the ECM products, in the market-store content, are in a proprietary format, which is like a "black box". 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.
- CMIS: Alfresco supports Content Management Interoperability Services (CMIS) for interoperability between ECM systems. It specifies a domain model and protocol bindings for web services (SOAP) and AtomPub. If you want to use CMIS in Java-based application, you can use the Apache Chemistry implementation of OpenCMIS. It provides bindings for both the AtomPub and SOAP protocols. You can see the example of using Alfresco repository in Liferay using CMIS in Chapter 9, Integrating External Applications with Alfresco.
Which installation option is suitable for you
Alfresco is 100 percent open source software, 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 the choices and determine which option is right for you.
Enterprise and Community editions
Alfresco currently provides two types of product download options:
- Alfresco Community Edition
- Alfresco Enterprise 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 Edition is free. Alfresco Enterprise Edition includes per-CPU license fee.
The Alfresco Community Edition is an unsupported product and is mainly designed for developers and technical enthusiasts in non-critical environments. Alfresco Community Edition releases early, often, and renders a daily build, offering the latest functionality. It doesn't provide scalability and high availability certifications. Community editions are not updated with the latest bug fixes; those are provided in the Enterprise editions. A feature such as JMX tools support is also not available with the Community Edition.
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 major corporations, financial, insurance, government, or healthcare organizations, I would recommend you to go for Alfresco Enterprise Edition 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 warranty and indemnity. Your Alfresco version will be certified on all available stacks such as Linux, Windows, MySQL, and Oracle. You will benefit from Alfresco support which includes problem resolution, compatibility advice, and migration advice and upgrade support. You will receive 24 x 7 support from Alfresco experts for mission critical applications. You can know more about Alfresco support stack by going to http://www.alfresco.com/services/subscription/supported-platforms.
Operating systems – Windows, Linux, UNIX, and MacOS
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 to go with the Linux operating system for production use. 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 listed as follows:
- The best technical support available
- No vendor lock-in
- Runs on a wide range of hardware
- Exceptionally stable
- Supports many tools and applications you need
- Interoperates with many other types of computer systems
- Low total cost of ownership
Databases – MySQL, Oracle, MS SQL Server, and PostgreSQL
The data access layer of Alfresco is implemented using an open source software component and ORM (Object Relational Mapping) tool called MyBatis. If you have already chosen the Microsoft Windows operating system, then the natural choice for you could be MS SQL server. If you already have Oracle license, then Oracle database is the best choice for you. You will get PostgreSQL by default with the Alfresco installation.
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 it is consistent, and also because of its fast performance, high reliability, and ease of use. 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.
Application servers – Tomcat and JBoss
Alfresco runs on any J2SE 5.0 complaint servlet container. Hence there are no application server specific dependencies. However it is important to make a choice of the application server before moving into production.
Alfresco uses the Spring framework and not the Enterprise Java Beans (EJB) framework. So 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 servlet container in the market.
On the other hand, you must consider using JBoss application server, which has the highest market capture (> 35 percent) in J2EE-based application servers in the world. JBoss internally uses Tomcat and hence you get the benefits of Tomcat servlet engine as well.
Alfresco application is implemented in a way to utilize 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 uses JBOSS jBPM tool and Activiti for business process management features.
If you have already invested in JBoss, then Alfresco provides complementary industry-leading enterprise content management technology to the JBoss enterprise middleware system suite.
Portals (optional) – JBoss Portal and Liferay
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 JBoss portal or 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 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 JBoss portal delivers the benefits of a zero-cost, open source license combined with a flexible and scalable underlying platform. The JBoss community portal project no more exists. It's been managed by JBoss community and GateIn. The new portal introduced with their combined effort is known as the GateIn Portal framework. You can read more about this from http://www.jboss.org/gatein.
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 it can run against most full application servers out of the box including JBoss, JRun, BEA WebLogic, and Orion. It has a full set of web service interfaces to the portal. Liferay supports more than 800 portlets (products) and has wider adoption in the market.
Choosing the suitable software for your installation
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 the Alfresco Enterprise Edition on the Linux operating system, with MySQL database running on the JBoss application server with the Liferay portal.
The examples in this book were created and tested with the following choice of Alfresco installation:
- Alfresco Enterprise 4.1.2
- Operating System: Windows XP
- Database: MySQL 5.5
- Application server: Tomcat 6
- JDK 6
- Portal: None
Installing on Microsoft Windows
In our earlier section, you 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 discuss the requirements and procedures for the two flavors of installation of Alfresco: Full installation and installation of Alfresco Tomcat bundle.
Full installation
The default installation of Alfresco software requires installing the windows enterprise version alfresco-enterprise-<version>-installer-win-x64.exe
downloaded from the SourceForge project location (http://wiki.alfresco.com/wiki/Download_and_Install_Alfresco). Now Alfresco is hosting its own community download area. 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 4.1.2 and installer file alfresco-enterprise-4.1.2-installer-win-x64.exe
is approximately 470 MB in size.
This installer will install:
- Java Development Kit (JDK) [If no JDK is installed on your machine]
- Apache Tomcat 6.0.32
- Portable OpenOffice 3.2
- Alfresco Explorer web application, packaged as a Web Archive (WAR)
- Alfresco Share web application, packaged as a Web Archive (WAR)
- SharePoint protocol support
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 software and components required to run Alfresco through the installation wizard:
- Start the installation of Alfresco by double-clicking on the Alfresco installer. Select the language English from the Language Selection dialog.
- Now the installation wizard launches. You will see the welcome screen.
- After you click on Next, it will ask you for the type of setup. You will have two options, Easy and Advance. The Easy option will install everything including Default Component, PostgreSQL, Java, and OpenOffice. Whereas with the Advance option, you can select the custom components for installation. For full installation, choose Easy and click on Next.
- You will see the option to choose the installation folder. Let us install it in the default folder given by the installer,
C:\alfresco
. Please note that you have the option to browse and select your chosen folder by clicking on the icon. Once you are done with the folder selection, click on Next. - On the next screen, select the port for the PostgreSQL database. The setup will install PosgreSQL and run as service along with Alfresco on your machine. Click on Next.
- On the next screen, provide the credential for Alfresco admin user and click on Next.
- Now the setup is ready to unpack installation files on your machine. Click on Next.
- Now the setup is ready to copy installation files on your machine. On clicking Next, it will open the dialog and start copying files.
- Once you are done with the installation, the final installation screen will appear. Do not forget to read the contents of the
Readme
file, as it contains information about using CIFS and some troubleshooting tips. - Run the
startup.bat file
available atC:\Alfresco\tomcat\bin\
. Wait a few seconds to allow Tomcat to start and fire up your web browser and then browse tohttp://localhost:8080/alfresco
. Use the password you provided for the admin use during installation to login into Alfresco.
Installing the Alfresco bundle on Tomcat
This section contains the installation steps to configure Alfresco on Tomcat. Alfresco requires JDK to be already installed on your machine.
Installing Java SE Developer Kit
The very first step for installing Alfresco is to install Java SE Developer Kit. Alfresco requires Java 1.5 or higher. If you already have JDK, then skip this.
To Install Java SDK, follow the given steps:
- Download the JDK 6u33 update from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u33-oth-JPR.
- After downloading, double click on this file to automatically proceed the installation.
- Accept the license agreement. Click on Next.
- In the next window for custom setup, choose defaults. Click on Next.
- In the next window, choose the desired browsers to install Java [optional]. Click on Finish.
- Test your installation by typing the
C:\> java –version
command on the command prompt. - Create the
JAVA_HOME
environment variable to set the path of the Java SE Developer Kit.
Installing Alfresco bundled on Tomcat
For convenience, Alfresco provides the bundle of Alfresco to install on Tomcat. This bundle includes a configuration file for the Tomcat server, together with the Alfresco web application archive (alfresco.war
) file, the Alfresco Share web application archive (share.war
), batch files, sample extension folder, and so on.
Steps to install Apache Tomcat
In order to install Alfresco on Tomcat, you first need to install Tomcat. The latest version of Alfresco uses Tomcat 6. The following steps describe the process to install the Alfresco bundle on Tomcat.
- Download Tomcat 6.0.26 (http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.26/bin/).
- Unpack the Tomcat bundle in
C:\Alfresco\tomcat
. - Create the following directories required for the Alfresco extension:
<TOMCAT-HOME>/shared/classed
<TOMCAT-HOME>/shared/lib
- Edit the
<TOMCAT-HOME>/conf/catalina.properties
file to add entry for the directories created in step 3. In case you created different directory names, use them in the following statement:configuration.shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
- Copy the JDBC drivers to the
<TOMCAT-HOME>/lib
folder. If you are using the MySQL database, copy the connector JAR file. - Make changes in the
<TOMCAT-HOME>/conf/server.xml
file to set the character encoding UTF-8 on the Tomcat connector. By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs that are received from a browser. Reach to the connector section inserver.xml
and make the change as follows:<Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8" connectionTimeout="20000" redirectPort="8443" />
Steps to deploy Alfresco on Apache Tomcat
To install Alfresco on Tomcat, you need to download the Alfresco enterprise package from http://support.alfresco.com/. This bundle contains the required files to deploy Alfresco in Tomcat. Download the Alfresco enterprise zip package as mentioned:
- Browse to the Alfresco support portal.
- Log in to the support portal with the credentials you have, browse to Online resources | Downloads | Alfresco Enterprise <version> (from left navigation) | Click on "<version> Alfresco Enterprise zip package".
You will get the
alfresco-enterprise-<version>.zip
file.Within this file, you will get the following files and folders:
Bin
: This folder contains batch file / shell scripts and JAR files for the Alfresco module management. It also contains DLL files to support CIFS.Licenses
: This folder contains the structure to copy Alfresco and third-party license files.web-server
: Under this folder you will receive library files, web archive files for Alfresco and Share, and directory structure with files to extent Alfresco.readme.txt
: This file contains information regarding the bundle file.
Let's talk about how you will deploy the previous files to configure Alfresco on Tomcat.
- Stop the Tomcat server if it is already running.
- Copy the
alfresco.war
andshare.war
files from theweb-server/webapps
folder to the<TOMCAT-HOME>/webapps/
folder. - Replace the
<TOMCAT-HOME>/shared
folder from theweb-server/shared
folder and renamealfresco-global-properties.sample
toalfresco-global-properties
file. - Start the Tomcat server to deploy.
Installation of other Alfresco components
Alfresco uses various open source components for different purposes. You can install and configure them based on your business requirements. In this section we will see how to install those components and configure it with Alfresco.
Installing SharePoint protocol support
If you have installed Alfresco using full setup then this support will already be there. Otherwise follow the given steps to add the SharePoint protocol support:
Download the alfresco-enterprise-spp-<version>.zip
connector functionality for Microsoft SharePoint protocol support from https://support.alfresco.com/ics/support/DLRedirect.asp?fileID=34833.
To install SharePoint support, follow the given steps:
- To install this module, copy
alfresco-enterprise-spp-<version>.zip
in<alfresco_installation_folder>\amps
. - Run the
apply_amps.bat
file available at<alfresco_installation_folder>\bin
. - Start your Alfresco server to deploy the newly created
alfresco.war
file by AMP. - Verify that your SharePoint AMP is applied properly to Alfresco by checking the
/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.module.vti/context
path directory.
Installing the Alfresco license file
If you want to use the Alfresco Enterprise edition, you require a license file. Alfresco Enterprise edition comes with a 30 day evaluation license. If you don't provide any license file, then you can evaluate it for 30 days. After that it will expire and you will only have read-only access to the repository.
Steps to download the Alfresco license file
- Browse to the support portal and click on Request Support on the menu bar to submit a ticket.
Use the following information to the create ticket:
- Issue type: I need a license key from the list.
- Select the Alfresco Enterprise version: The version for which you want the license key from the drop-down list
- Select a priority: Question/how-to/enhancement (it's very important to provide appropriate severity to the ticket as the license retrieval process is automated and will be counterproductive if higher severities are set to the ticket)
- Fill up the Subject and Problem Description fields
- Submit the ticket and note down the ticket number. You will receive the license via e-mail.
To install the license file
- Shut down Alfresco if it's already running.
- Browse to the
<alfresco_installation_folder>\tomcat\shared\alfresco\extension\license
directory. - Drop the downloaded
.lic
extension file into this directory. - Restart the Alfresco server.
After the successful installation of this license, .installed
will be appended to the file name and it begins to utilize the terms of your license immediately.
Installing and configuring the MySQL database
As mentioned earlier in this chapter, the content in Alfresco is stored in persistent back-end systems such as a database and filesystems. So for the persistence of metadata, we need some database. Alfresco by default uses PostgreSQL to persist the metadata. You can change the default database configuration to MySQL by following simple steps:
Steps to install MySQL
Note
If you already have installed MySQL on your machine, you can skip this section.
- Download the MySQL package from http://dev.mysql.com/downloads/. Alfresco requires MySQL 5.5 or higher.
- After downloading, navigate to your download location and unzip the package.
- Double-click on the
setup.exe
file to automatically start the installation. - You will see the welcome message screen. Click on Next.
- Select the typical setup in the next screen and choose the default selected options for the next screens.
- Once that wizard completes, you will have an option to configure MySQL server instance. Select Configure the MySQL Server now and click on Finish.
- Now you will see the welcome screen for the MySQL server configuration wizard window. Click on Next.
- Choose the default selected options for the next screens.
- Select UTF8 Character set when asked.
- Accept the Windows option: Install it as a Windows service as shown in the following screenshot. Click on Next.
- In the next step, provide the password for the root user. Click on Next.
- In the next screen, click on execute to start the configuration.
- Open the MySQL command-line client from All Programs | MySQL| MySQL Server 5.0 | MySQL Command Line Client and provide the root password.
- Now to test your installation, type the following command:
mysql –u root –p
Steps to set up the MySQL database for Alfresco
- Login to MySQL. Create a database for the Alfresco instance with the database name as
alfresco
. Create a user calledalfresco
with password asalfresco
and grant all permissions to it. See the following code snippet for creating a database:create database alfresco default character set utf8; grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option; grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
Once done with previous step, a MYSQL database will be created with the following credentials:
- Database name:
alfresco
- Database username:
alfresco
- Database password:
alfresco
- Database name:
- To confirm the database is created, login to MySQL with the
mysql -u root –p
command. - At the MySQL prompt, execute the command,
show databases;
you will find the database created as Alfresco.
Steps to configure the MySQL database for Alfresco
To convert the default installation to MySQL, we simply need to modify one file in the <alfresco_installation_folder>\tomcat\shared\classes
directory that is set to use default database. The file is alfresco-global.properties
. To change the Alfresco installation to MySQL database, the following changes need to be made in alfresco-global.properties
:
- Comment out the PostgreSQL connection lines using
#
. - Add the following lines to set host, port, and name to the location of your MySQL JDBC driver. Change the host and port if you have installed MySQL on a different machine.
db.username=alfresco db.password=alfresco db.name=alfrescodb.driver=org.gjt.mm.mysql.Driver db.url=jdbc:mysql://localhost:3306/${db.name}?useUnicode=yes&characterEncoding=UTF-8
- Copy the Database Connector lib.
- Download the MySQL database connector JAR
(mysql-connector-java-5.x.x-bin.jar
) file. - Copy the
mysql-connector-java-5.x.x-bin.jar
file in<alfresco_installation_folder>/tomcat/lib
. - Restart the Alfresco server.
Installing OpenOffice
For the document transformations such as office to PDF, OpenOffice is used, which is basically a cross-platform office application suite. OpenOffice is an optional installation that provides access to a range of document transformations in Alfresco. The following installation steps could be helpful, if you have not selected the OpenOffice option during Alfresco installation:
Steps to install OpenOffice
- Download the latest stable version of OpenOffice from http://download.openoffice.org.
- Install the downloaded file, the wizard will start.
- Click on Next on the welcome screen of the installation wizard.
- Leave the installer location as is and click on Unpack.
- Fill up the customer information and click on Next.
- Choose the
OpenOffice.org.Writer
module, which is the only module used by Alfresco, the others are not required for Alfresco. Change the installation directory to<alfresco_installation_folder>/OpenOffice
by clicking on the Change button. Click on Next. - Optionally, select the files for which you want OpenOffice to be the default application for, and click on Next.
Steps to configure OpenOffice as a headless service
- Open
<alfresco_installation_folder>/tomcat/shared/classes/ alfresco-global.properties
. - Uncomment the following two lines and change value of
ooo.enabled
tofalse
and save the file:ooo.enabled=false jodconverter.enabled=true
- Restart the Alfresco server to reflect above changes.
Installing Flash Player
Installing 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 the multi-file upload facility.
Steps to install Flash Player
- To install Flash Player, download the latest version of Flash Player from the Adobe's Flash Player download site (http://www.adobe.com/products/flashplayer).
- Follow the wizard steps to install it.
Installing SWFTools
Installing SWFTools is optional. For previewing the 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.
Steps to install SWFTools
- To install SWFTools, download the latest version from its website (http://www.swftools.org).
- Follow the installation wizard steps to install it.
Installation folder structure
Let's take a peek into the installation directory <alfresco_installation_folder>
to look at the folders:
alfresco
: All the shortcuts to installing, uninstalling, starting, and stopping Alfresco as 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 extensions files are required to be put in this folder and then use theapply_amps
script to perform the update to Alfresco explorer.amps_share
: Similar to theamps
folder, all the AMP extensions files for Alfresco share are required to be put here and then use theapply_amps
script to perform the update to Alfresco explorer.bin
: This directory contains scripts for applying AMP files and cleaning the Tomcat folder after applying the AMP file. It also contains the module management package JAR file, which is used for applying AMP files to Alfresco through scripts.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, MySQL, and 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 Alfresco application is deployed as a WAR file. You can see thealfresco.war
andshare.war
files in thewebapps
subfolder of this directory.openoffice
: This directory contains the entire portable office suite installation that is used for word processing, spread sheet processing, and so on.imagemagick
: This folder contains installation files of the ImageMagic module.README
: This file gives information about using CIFS and some troubleshooting tips.
You can uninstall the program by clicking on the uninstall.exe
application.
Starting and stopping Alfresco as a console application
The options for starting and stopping Alfresco as console application can be viewed by navigating to Start | All Programs | Alfresco Enterprise | Alfresco Enterprise Service as shown in the following screenshot:
The options are as follows:
- Stop Alfresco Enterprise Server: This option is used to stop Alfresco. It stops the MySQL server and the Tomcat application server.
- Start Alfresco Enterprise Server: Use this option to start Alfresco as a console application. This will start the MySQL server and the Tomcat server.
- Alfresco Explorer: This option is used to open Alfresco web client in the browser.
- Alfresco Share: This option is to open Alfresco Share in the web browser.
- Alfresco Website: This option is to open the Alfresco's website in the web browser.
Alternatively, you can always start, stop, and restart the Tomcat application server, and the MySQL 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.
Configuring Alfresco as a Windows service
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.
Steps to configure Alfresco as a Windows service
- Open a command prompt.
- Go to the
<alfresco_installation_folder>/tomcat/bin
directory. - Use the following commands:
service.bat install alfresco tomcat6 //IS//Tomcat6 --DisplayName="Alfresco Server" \ --Install="<alfresco_installation_folder>/Tomcat/bin/tomcat6.exe" -- Jvm=auto \ --StartMode=jvm --StopMode=jvm \ --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start \ --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop service.bat install alfresco tomcat5.exe //US//alfresco --DisplayName "Alfresco Server" tomcat5.exe //US//alfresco --JvmMs=256 --JvmMx=512 --JvmSs=64 tomcat5.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 auto
- To uninstall the service, go to the
<alfresco_installation_folder>/tomcat/bin
directory and enter the following command:service.bat uninstall alfresco
- To edit your service settings, go to the
<alfresco_installation_folder>/tomcat/bin
directory 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.
Installing TinyMCE language packs
Alfresco supports the German (de), English (en), Spanish (es), French (fr), Italian (it), Japanese (ja), and Dutch (nl) language packs in translations. On complete Alfresco installation, all the language packs get installed by default. If you want translation support which is not supplied with Alfresco installation, then you need to install the TinyMCE language pack. Use the following steps to install the language pack manually:
- Download the desired language pack from the TinyMCE website (http://tinymce.moxiecode.com/download_i18n.php).
- Unpack the language file:
- For Share, unpack the ZIP file to
<alfresco_installation_folder>/tomcat/webapps/share/modules/editors/tiny_mce
- For Explorer, unpack the ZIP file to
<alfresco_installation_folder>/tomcat/webapps/alfresco/scripts/tiny_mce
- For Share, unpack the ZIP file to
- Clean your browser cache before testing the newly installed language pack.
Installing on Linux
Alfresco provides a nice package that includes all of the programs you need for using Alfresco on your Linux machine. Download it from the customer or partner's portal by selecting the latest version of the alfresco-enterprise-<version>-installer-linux-x64.bin
file.
This installer file contains Tomcat, OpenOffice, and Alfresco. Make sure you have permissions to execute the installer. Make sure that you have JDK 6 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-enterprise-<version>-installer-linux-x64.bin
Become root (super) user to install by executing the following command (for some platforms that have the super user account disabled by default might require su –s
):
> su
Now execute the installer directly on the command prompt as follows.
./alfresco-enterprise-<version>-installer-linux-x64.bin
Follow the instructions presented by the installer:
- You will be asked for the language in the Language Selection prompt. Select English by pressing 1 and press Enter.
- In the next option, you will be prompted for Setup Type. Select Easy and press Enter.
- You will be asked for a location to install the software in the option. If you want to keep the default location, press Enter or provide your desired path to install Alfresco. If you are root, the default of
/opt/alfresco-<version>
will be selected. If you want to change it,/usr/local/alfresco-<version>
will often be another good choice. - In next options, the installer will ask for providing port number to insert for database, web server domain, Tomcat server, shutdown port, SSL port, AJP port for Tomcat, and Alfresco RMI port. If you want to keep the default port keep pressing the
Enter
key or provide your desire port information. - Now in the next prompt, the installer will ask the admin user for the password. Provide your desire password and press the Enter key.
- As discussed earlier at the beginning of this chapter, Alfresco provides support for SharePoint protocol to access the Microsoft document and update it directly in the repository from office software. Provide the port number for SharePoint protocol support and press the Enter key. The default port for SharePoint is 7070.
- Provide port number for OpenOffice. Alfresco uses OpenOffice to transform a word document to PDF. Provide a port number if you want to change the default port or press the Enter key.
- Now the setup is ready to install. It will ask for a confirmation. Press the Y key and then the Enter key to continue with installation process.
- Once the installation part is done, the installer prompts to view the
Readme
file. Do not forget to read the contents of theReadme
file, as it contains information about using CIFS and some troubleshooting tips.
Installing extensions with the AMP installation script
Alfresco provides extensions as an AMP file, 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, deinstallation of installed modules, and listing of currently installed modules.
Using the Module Management Tool with a script
For installing any AMP module in Alfresco, please refer to the following steps:
- Download the particular AMP file with the
<extension-module>.amp
extension. - Copy the
<extension-module>.amp
file to<alfresco_installation_folder>\amps
. - Stop the Alfresco server if it is already running before applying the AMP file. Run the
apply_amps
command available at<alfresco_installation_folder>\bin
, which will install the particular module. - Delete the
alfresco
folder inwebapps
if it exists and restart the server.
Using the Module Management Tool from the command prompt
You can apply the module file to alfresco.war
using the command prompt. You can use the following command to apply the AMP file:
java -jar alfresco-mmt-2.1.jar [args]
In order to use this command you need to set some JAR files on the class path. Run the <alfresco_installation_folder>/scripts/setenv.sh
file before running the previous command to set JAR files on the class path. You will also have to set the ALF_HOME
and CATALINA_HOME
environment variables.
Let's understand the commands you can get with the MMT tool.
install
: You can use this command to install files found in the AMP file to thealfresco.war
file. See the following example that demonstrates the use of theinstall
command:java -jar alfresco-mmt-2.1.0.jar install /opt/alfresco-recordsmanagement-2.1.0.amp /opt/alfresco/tomcat/webapps/alfresco/alfresco.war
list
: You can use this command to list the details about all modules currently installed in the WAR file. Check the following command:java -jar alfresco-mmt-2.1.0.jar list /opt/alfresco/tomcat/webapps/alfresco/alfresco.war
You can use MMT with Maven as well. You can visit http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven for more information.
Some of the extension modules available with Alfresco are alfresco-enterprise-spp.amp
for SharePoint protocol support, alfresco-fb-doclib.amp
for Facebook integration and alfresco-recordsmanagement.amp
for Records Management sample functionality.
Tip
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.