Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Alfresco 3 Cookbook

You're reading from   Alfresco 3 Cookbook Over 70 recipes for implementing the most important functionalities of Alfresco

Arrow left icon
Product type Paperback
Published in Jul 2011
Publisher Packt
ISBN-13 9781849511087
Length 380 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Toc

Table of Contents (21) Chapters Close

Alfresco 3 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started 2. Creating and Organizing Contents FREE CHAPTER 3. Securing and Searching Contents 4. Rules—the Smart Spaces 5. Alfresco Administration Console 6. Customizing Alfresco Web Client 7. Alfresco Content Model 8. Alfresco JavaScript API 9. FreeMarker Templates 10. Web Scripts 11. Working with Workflows 12. Integrating with MS Outlook and MS Office 13. Configuring Alfresco E-Mail and File Servers 14. Building Alfresco Index

Installing Alfresco on Linux


You can install Alfresco in the Linux platform with these two methods:

  • Using the Alfresco packaged installer

  • Deploying the Tomcat or JBoss bundle

The first approach will install Alfresco in Linux along with JDK (optionally). It will create the Alfresco database automatically and is often capable of configuring and starting Alfresco as a Linux init script.

The second approach is more manual. You will have the downloaded Tomcat or JBoss bundle of Alfresco. Manually configure a few things and you are ready to go.

As in the case of windows, in this book, we will demonstrate the second option. And, we will also use the Tomcat bundle of Alfresco, not the JBoss one.

Getting ready

  1. 1. Download the Alfresco community edition from the Alfresco download site. http://wiki.alfresco.com/wiki/Community_Edition_file_list_3.3.

  2. 2. In Individual Components and Custom Installs section, download the Alfresco-community-tomcat-3.3.tar.gz file. Or you can directly use this URL http://process.alfresco.com/ccdl/?file=release/community/build-2765/alfresco-community-tomcat-3.3.tar.gz and use standard download.

  3. 3. You will need the following prerequisite programs already installed in your machine:

    • JDK 1.6.x

    • MySQL database server

  4. 4. Once these programs are installed and after downloading the Alfresco Tomcat bundle, we are ready to go.

How to do it...

Carry out the following steps to install the Alfresco Tomcat bundle on your machine.

  1. 1. Download the compressed archive from the above URL.

  2. 2. Untar the bundle and move it to a suitable location, say /usr/local/Alfresco

    # tar -zxf Alfresco-xxx.tar.gz
    # mv Alfresco-xxx /user/local/
    
  3. 3. You need to give proper permission to the moved folder.

    # chmod -R 755 /usr/local/Alfresco-xxx
    
  4. 4. You need to set the JAVA_HOME environment variable to make the Tomcat server understand where your JDK or JRE is installed.

  5. 5. Check whether the JAVA_HOME environment variable is already set or not.

    # echo $JAVA_HOME
    
  6. 6. If the JAVA_HOME variable is already defined, validate whether it is containing the correct value.

  7. 7. If not, create a new file named java.sh under the /etc/profile.d directory and set the JAVA_HOME variable with the value to the directory where JDK or JRE is installed.

    # touch /etc/profile.d/java.sh
    # chmod 755 /etc/profile.d/java.sh
    # echo "JAVA_HOME=/usr/local/jdk1.6.x" >> /etc/profile.d/ java.sh
    # source /etc/profile.d/java.sh
    
  8. 8. You also need to check whether Java runtimes are properly added in your PATH variable.

    # echo $PATH
    
  9. 9. If not, set the PATH variable to the value of the bin directory of the desired JDK package.

    # echo "PATH=$PATH:/usr/local/jdk1.6.x/bin" >> /etc/profile.d/ java.sh
    # source /etc/profile.d/java.sh
    
  10. 10. Assuming that you have properly created a database named Alfresco in your local MySQL server, and created a user with the name Alfresco (as in previous recipe), you can start your Tomcat server now. Run the startup.sh file and the Tomcat server should have started.

    # cd /usr/local/Alfresco/tomcat-6.0.18/bin
    # ./startup.sh
    
  11. 11. You can check out the log file for any unexpected error.

    # tail -f /usr/local/Alfresco/tomcat-6.0.18/logs/catalina.out
    

How it works...

The first time the Alfresco Tomcat server starts, the web application files (.WAR files) are exploded in the tomcat\webapps folder.

Similarly, the deployer also populates the MySQL database and creates the required database objects (tables, and so on ) into it.

Alfresco uses some third-party tools and applications for several purposes. When the Tomcat server starts, Alfresco connects with these applications and performs the necessary actions later on as required.

  • Open Office is used by Alfresco in order to convert or transform documents into the portable document format (PDF).

  • ImageMagick converter is used to generate thumbnail images of documents.

  • PDF2SWF tool is used to convert PDF documents into flash movies.

There's more...

Sometimes you may need to configure the JAVA_OPTS variable as well, in case you are facing any memory issues while running the application—memory issues like Java Heap Space, Perm Gen error, and so on.

For setting up JAVA_OPTS, you have to follow the same procedure as in setting up the JAVA_HOME variable in your environment variable list.

There is no ideal and fixed value for JAVA_OPTS; it depends on your application load. However, in a standard developer machine, it should be something like

-Xms256m -Xmx1024m -XX:MaxPermSize=512m

in a machine having 2 to 4 GB of physical memory.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image