≡ Menu

12 Steps to Install and Configure Alfresco on UNIX / Linux

Alfresco is the best open source content management system. This has a rock solid document management foundation, with several functionality built on top of it. Alfresco provides web based content management, collaboration platform, Content Management Interoperability Services (CMIS), records management and image management.

Alfresco has enterprise edition and free community edition.  See the difference between them here. If you have an in-house IT team, just go with the Alfresco community edition. It is straight-forward to install and configure Alfresco.

In this article, let us review how to install and configure alfresco community edition on UNIX / Linux platform using 12 easy steps.

1. Install Alfresco Community Tomcat Bundle

Download Alfresco from the community edition download page.

# cd ~

# wget -O alfresco-community-tomcat-3.3.tar.gz http://dl.alfresco.com/release/community/build-2765/alfresco-community-tomcat-3.3.tar.gz?dl_file=release/community/build-2765/alfresco-community-tomcat-3.3.tar.gz

# mkdir /opt/alfresco/

# cd /opt/alfresco/

# tar xvfz ~/alfresco-community-tomcat-3.3.tar.gz

2. Modify Alfresco Global Properties

alf_data parameter identifies the location of alfresco data store, where all the documents will be stored. Make sure this is pointing to an absolute path as shown below. Initially this directory will not be present. This alf_data directory will be created when we start the alfresco for the 1st time.

# vi /opt/alfresco/tomcat/shared/classes/alfresco-global.properties
dir.root=/opt/alfresco/alf_data

# ls -l /opt/alfresco/alf_data
ls: /opt/alfresco/alf_data: No such file or directory

3. Verify MySQL connector is installed

Just double-check to make sure the mysql connector is installed in the proper location, as shown below.

# ls -l /opt/alfresco/tomcat/lib/mysql-connector-java-5.1.7-bin.jar
-rwxr-xr-x 1 root root 709922 Jan 12 11:59 /opt/alfresco/tomcat/lib/mysql-connector-java-5.1.7-bin.jar

4. Create the Alfresco MySQL databases

If you don’t have MySQL, install it as using yum groupinstall, or based on LAMP install article, or based on mysql rpm article.

After installing MySQL, create the alfresco database using the db_setup.sql script as shown below.

# cd /opt/alfresco/extras/databases/mysql

# mysql -u root -p <db_setup.sql
Enter password:

# ls -l /var/lib/mysql/alfresco/
total 4
-rw-rw---- 1 mysql mysql 54 May  7 11:25 db.opt

5. Verify that Alfresco MySQL databases got created

# mysql -u root -p
Enter password:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| alfresco           |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql>

6. Update the db.url in the global property files

Update the db.url parameter in the alfresco-global.properties file to point to localhost:3306 as shown below.

# vi /opt/alfresco/tomcat/shared/classes/alfresco-global.properties
db.url=jdbc:mysql://localhost:3306/alfresco

7. Start Alfresco Server

Start the alfresco server. This will start the tomcat application server that was bundled with the alfresco.

# cd /opt/alfresco

# ./alfresco.sh start
Using CATALINA_BASE:   /opt/alfresco/tomcat
Using CATALINA_HOME:   /opt/alfresco/tomcat
Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp
Using JRE_HOME:       /usr/java/jdk1.6.0_18

While the alfresco tomcat server is starting up, check the /opt/alfresco/alfresco.log for any possible issues.

When alfresco.sh is executed for the 1st time, it will do some database setup, and you’ll see following messages in the alfresco.log (only the 1st time).

  • Executing database script /opt/alfresco/tomcat/temp/Alfresco/*.sql
  • All executed statements: /opt/alfresco/tomcat/temp/Alfresco/*.sql
  • Applied patch – [org.alfresco.repo.admin.patch.PatchExecuter]

Look for the line in the log file where it says “Alfresco started”, which indicates that Alfresco was started successfully.

Following are few sample lines from alfresco.log.

# tail -f /opt/alfresco/alfresco.log
21:29:25,431 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-3892772511531851057.sql (Copied from classpath:alfresco/dbscripts/create/3.3/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoCreate-3.3-RepoTables.sql).
21:29:27,245 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] All executed statements:  /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-All_Statements-4724137490855924607.sql.
=== Applied patch                 ===
ID: patch.db-V3.0-0-CreateActivitiesExtras
RESULT:
Script completed
=====================================
21:30:03,756 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_21-b06; maximum heap size 910.250MB
21:30:03,756 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.3.0 (2765) schema 4009 - Originally installed version 3.3.0 (2765) schema 4009

8. Verify the alf_data directory creation

When you start the alfresco for the 1st time, it will create the alfresco data repository as shown below.

# ls -l /opt/alfresco/alf_data
total 32
drwxr-xr-x 2 root root 4096 Mar 25 16:26 audit.contentstore
drwxr-xr-x 2 root root 4096 Mar 25 16:26 contentstore
drwxr-xr-x 2 root root 4096 Mar 25 16:26 contentstore.deleted
drwxr-xr-x 3 root root 4096 Mar 25 16:26 lucene-indexes

9. Verify that Alfresco Server is Running

Make sure alfresco server is running successfully. View the alfresco.log file to make sure there are no errors.

# ps -ef | grep -i alf
root      9280     1 51 16:25 pts/0    00:00:30 /usr/java/jdk1.6.0_18/bin/java -Xms128m -Xmx512m -XX:MaxPermSize=160m -server -Dalfresco.home=. -Dcom.sun.management.jmxremote -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/alfresco/tomcat/conf/logging.properties -Djava.endorsed.dirs=/opt/alfresco/tomcat/endorsed -classpath :/opt/alfresco/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/alfresco/tomcat -Dcatalina.home=/opt/alfresco/tomcat -Djava.io.tmpdir=/opt/alfresco/tomcat/temp org.apache.catalina.startup.Bootstrap start

# tail -f /opt/alfresco/alfresco.log

10. Login to Alfresco Explorer or Alfresco Share

Alfresco has two ways to access the application — Alfresco Explorer and Alfresco Share.

Go to http://localhost:8080/alfresco – to launch the Alfresco explorer
Go to http://localhost:8080/share – to launch the Alfresco share

Default alfresco administrator uid/pwd is admin/admin. Change it immediately after you login.

11. Change the default password for the alfresco database

Use the mysql update command to change the password for the alfresco user as shown below.

# mysql -u root -p mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> UPDATE user SET password=PASSWORD('donttellanybody') WHERE user='alfresco';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2  Changed: 2  Warnings: 0

mysql>

12. Modify the configuration file to reflect the new alfresco password.

Update the db.password parameter in the alfresco-global.properties file as shown below.

# vi /opt/alfresco/tomcat/shared/classes/alfresco-global.properties
db.name=alfresco
db.username=alfresco
db.password=donttellanybody

After this, stop/start MySQL database and restart Alfresco Tomcat server. As a final step, make sure to take a backup of alfresco mysql database using mysqldump or mysqlhotcopy and /opt/alfresco directory.

# service mysqld restart

# /opt/alfresco/alfresco.sh stop

# /opt/alfresco/alfresco.sh start
Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

Comments on this entry are closed.

  • m June 12, 2010, 7:53 am

    The first wget command fails — file not found I believe. Considering the howto is less than a month old, I am guessing alfresco changes things rather rapidly.

    Also note that downloading the community bundle (http://dev.alfresco.com/downloads/nightly/dist/) and following your instructions results in a JAVA_HOME env variable missing error.

    I got it all up and running, however, I would recommend you update your howto, or, make the steps generic enough where they are not dependent solely on copy/paste commands.

    You are spoon feeding far too much.

  • Vijayalakshmi June 24, 2010, 3:32 am

    I am trying to install Alfresco3.3 in linux server. When i use the first command:
    # wget -O alfresco-community-tomcat-3.3.tar.gz http://process.alfresco.com/ccdl/?file=release/community/build-2765/alfresco-community-tomcat-3.3.tar.gz
    it saves a file “alfresco-community-tomcat-3.3.tar.gz ” in my current directory. But when i check for its file type, it is a HTML document text. Hence when i execute the following command,
    # tar xvfz /usr/save/alfresco-community-tomcat-3.3.tar.gz
    i end up in error. Please let me know the right way of downloading the file from command line.

  • Joel February 9, 2011, 10:07 am

    thank you a lot for this tutorial !

  • SriRam October 1, 2013, 3:09 am

    Hi I had installed the alfresco as per the documentation above but alfresco is not creating the alf_data dir and i dont see any errors on alfresco logs or tomcat out logs.

    Any help will be appreciated.

    alfresco log

    13:55:16,727 INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 225 Web Scripts (+0 failed), 232 URLs
    13:55:16,729 INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)
    13:55:16,729 INFO [org.springframework.extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)
    13:55:16,923 INFO [org.springframework.extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 4220.6357ms)
    13:55:17,075 INFO [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
    13:55:17,263 INFO [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
    13:55:17,412 INFO [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
    13:55:17,444 INFO [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
    13:55:17,668 INFO [org.springframework.extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
    13:55:17,705 INFO [org.springframework.extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js

    catalina.out

    13:55:17,075 INFO [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
    13:55:17,263 INFO [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
    13:55:17,412 INFO [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
    13:55:17,444 INFO [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
    13:55:17,668 INFO [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl
    13:55:17,705 INFO [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js
    Oct 01, 2013 1:55:20 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Oct 01, 2013 1:55:20 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 95584 ms

  • Ashok December 5, 2013, 3:30 am

    Hi,

    I have configured alfresco on centos and working but we are not able send mail when i invite to anybody.

    Please help me how can send mail vai alfresco

  • Omkar February 7, 2015, 3:31 am

    The best site I ever came across. Extremely simple explanation that lead to successful installation.

    Thank you so much Ramesh.