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
sudo apt-get install sun-java6-jdk
2. set environment variable for JAVA_HOME
verify if it has been set
echo $JAVA_HOME
if not,
sudo nano /etc/environment
append to a new line
JAVA_HOME=/usr/lib/jvm/java-6-sun/
3. install mysql server
sudo apt-get install mysql-server
4. create alfresco database
login to mysql database and perform the following
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
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
cd /opt/alfresco
sudo tar xvf alfresco-community-tomcat-3.2r2.tar.gz
7. configuring alfresco installation
modify alfresco global properties file
cd /opt/alfresco/tomcat/shared/classes
sudo nano alfresco-global.properties
locate dir.root and set to
dir.root=/opt/alfresco/alf_data
set mysql database settings
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
8. start alfresco
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 top command.
9. browse alfresco and alfresco share
open web browser and point to http://[your server ip]:8080/alfresco or 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 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.
#3 by Hugo Serrano on February 25, 2010 - 5:50 pm
Hi.
To get the file by wget:
wget http://dl.alfresco.com/release/community/build-2440/alfresco-community-tomcat-3.2r2.tar.gz?dl_file=release/community/build-2440/alfresco-community-tomcat-3.2r2.tar.gz
#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?