installing alfresco 3.2r2 on ubuntu 9.10 karmic koala


had some free time on my hands and thought i’d use it to practice more on linux and stuff. so, here i’m going to share what i did to have alfresco up and running. it’s pretty straightforward actually.

first off, alfresco requirements:

  • alfresco installation files with pre-configured tomcat bundle
  • sun java jdk (jdk6 required)
  • mysql database server

the requirements i listed above are the least, which means you can get alfresco up and running by having only those three. also note that i did this on a fresh ubuntu installation.

1. install sun java jdk

1
sudo apt-get install sun-java6-jdk

2. set environment variable for JAVA_HOME

verify if it has been set

1
echo $JAVA_HOME

if not,

1
sudo nano /etc/environment

append to a new line

1
JAVA_HOME=/usr/lib/jvm/java-6-sun/

3. install mysql server

1
sudo apt-get install mysql-server

4. create alfresco database

login to mysql database and perform the following

1
2
3
4
CREATE DATABASE alfresco DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL PRIVILEGES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';
GRANT SELECT,LOCK TABLES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';
FLUSH PRIVILEGES;

take note of the database name, username and password, it’ll be needed in the alfresco configuration later on.

5. download alfresco installation files

create alfresco directory

1
sudo mkdir /opt/alfresco

download alfresco community 3.2r2 with pre-configured tomcat bundle and store it in the above directory. wget doesn’t work on this so i had to download it on my host machine and transferred it using winscp.

6. extract alfresco installation files

1
2
cd /opt/alfresco
sudo tar xvf alfresco-community-tomcat-3.2r2.tar.gz

7. configuring alfresco installation

modify alfresco global properties file

1
2
cd /opt/alfresco/tomcat/shared/classes
sudo nano alfresco-global.properties

locate dir.root and set to

1
dir.root=/opt/alfresco/alf_data

set mysql database settings

1
2
3
4
5
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306

8. start alfresco

1
2
cd /opt/alfresco
sudo bash alfresco.sh start

note that this start/stop script can also be added as an init script, so you’ll have something like /etc/init.d/alfresco start. verify if java process has been started by using the

1
top

command.

9. browse alfresco and alfresco share

open web browser and point to

1
 http://[your server ip]:8080/alfresco

or

1
http://[your server ip]:8080/share

whala! alfresco repository site should load by now, as well as alfresco share. you can login as admin/admin. this installation is very basic, and other modules may be installed to extend the features of alfresco. i’ll see if i can also experiment on installing other alfresco modules.

next goal, apply this on our new alfresco server. :)

, , , , , , , , , , , ,

  1. #1 by j on February 19, 2010 - 4:27 am

    Thanks for this tutorial! it works! It took me forever to get this working before finding this.
    There is one thing I notice, I guess it was just my old test PC, it took a while for alfresco to start the service.

    • #2 by shane on February 19, 2010 - 11:39 pm

      you’re welcome j! i’m glad that it helped.

      if it’s the first time to start the app, then it should take a while, since it has to create the necessary files and database tables.

  2. #4 by Patrick on March 6, 2010 - 4:10 am

    Thank you for this awesome guide, I am mostly a complete beginner and I was able to almost get everything going.

    I don’t think I have everything working though.. When I try to browse to my alfresco server it gives me a 404 error.

    Do you have any idea what I might have done wrong?

    • #5 by shane on March 14, 2010 - 4:26 am

      cool.

      you sure you have the right url?

      first thing you should look at are the logs. if there were any thing wrong with the installation, it should show up on the logs.

      • #6 by Marc on June 12, 2010 - 3:28 am

        Thanks for the tutorial…

        I have the same problem. Am new to Ubuntu… where do I find the logs??

        /Marc

        • #7 by Marc on June 12, 2010 - 4:41 am

          Found the logs. Maybe this will help others.
          http://forums.alfresco.com/en/viewtopic.php?f=9&t=15525

          • #8 by Marc on June 13, 2010 - 6:03 am

            Thought I would add one more comment. On my system, when I stop alfresco, it doesn’t stop. The java process keeps running. I am new to linux, so I am not sure of the exact problem, but I think the tomcat server doesn’t stop. When I start alfresco again, it has a problem with the ports since there is already one alfresco process running on tomcat. I need to kill the PID of the java process and then restart. Then my system works…

            Maybe this will help some other people having the same problems as I was..

            /Marc

    • #9 by Scar lette Rosacea on May 11, 2011 - 10:19 pm

      Thanks for this tutorial, great help indeed!

  3. #10 by dwud31 on March 14, 2010 - 3:15 am

    Great post. I tried previously to install Alfresco on CentOS, but that failed. Used your instructions and was up within an hour. Thank you.

    • #11 by shane on March 14, 2010 - 4:27 am

      great work!

      you’re welcome. :)

  4. #12 by Chris H on April 6, 2010 - 10:12 am

    Wonderful post, I’m in the process of finishing up my install now, hopefully everything works. I’d like to transcribe your article to the Alfresco Wiki, hopefully your down for that.

    And for the non mysql users, you need to login to mysql by typing mysql -u root -p for step 4.

  5. #13 by Chris H on April 6, 2010 - 10:36 am

    Here’s my issue. echo $JAVA_HOME returns the correct info, but when I go to start alfresco I get this: JRE_HOME: /usr

    • #14 by ryall on April 13, 2010 - 5:47 am

      Sudo resets the environment variables. Run sudo with the -E switch to preserve the environment:

      sudo -E bash alfresco.sh start

  6. #15 by Janez on April 9, 2010 - 4:12 pm

    Thank you, Ubuntu 10.4 alpha an Alfresco Community 3.3 are working happy together. I have follow your guide and after 20 minutes I’m done. Thank you again!

  7. #16 by William Diaz on April 18, 2010 - 5:34 pm

    Hello,

    Thank you for your work, this work finally.

  8. #17 by Nestooo on September 2, 2010 - 4:11 pm

    Thank you !!!
    Now can you help me if i want to configure alfresco authentication with a Active Directory?

  9. #18 by Gargoyle Statues on October 6, 2010 - 11:41 pm

    Good luck getting people behind this one. Though you make some VERY fascinating points, youre going to have to do more than bring up a few things that may be different than what weve already heard. What are trying to say here? What do you want us to think? It seems like you cant really get behind a unique thought. Anyway, thats just my opinion.

  10. #19 by james on March 16, 2011 - 12:06 am

    Next month 11.04 Ubuntu comes out!

  11. #20 by Chaser Cruz on June 1, 2011 - 11:29 pm

    What a brilliant mind the author have, You give alfresco the real meaning and its importance. This tutorial will be a great help.

  12. #21 by Zamora Lanz on June 17, 2011 - 10:21 am

    Thanks a lot for this well organized way of installing alfresco. The information that you have given is very clear and easy to follow. Great job here. It will be easy for us to use the information that shared.

(will not be published)