Installing Alfresco on Ubuntu Linux

Installing Alfresco

  1. Use
    netstat -tln

    to check the following ports are not used: 1) Tomcat Server Port 8080 2) Tomcat Shutdown Port 8005 3) Tomcat SSL Port 8443 4) Tomcat AJP Port 8009

  2. Install packages required by Alfresco:
    $ apt-get install -y openssh-server apache2 xvfb xfonts-base ghostscript imagemagick
  3. Download the binary from either direct from Alfresco or SourceForge
  4. Make the binary executable

    chmod +x alfresco-community-4.2.e-installer-linux-x64.bin
  5. Run the binary
    sudo ./alfresco-community-4.2.e-installer-linux-x64.bin
    or run in text mode:
     sudo ./alfresco-community-4.2.e-installer-linux-x64.bin --mode text
  6. Follow the installation wizard. It is worth mentioning some of the non-default answers that we used during the installation:
    [1] Easy - Installs servers with the default configuration
    [2] Advanced - Configures server ports and service properties.: Also choose optional components to install.
    Please choose an option [1] : 2
    Java [Y/n] : Y
    PostgreSQL [Y/n] :n
    Alfresco : Y (Cannot be edited)
    SharePoint [Y/n] :Y
    Web Quick Start [y/N] : y
    Google Docs Integration [Y/n] :Y
    LibreOffice [Y/n] :Y
    JDBC URL: [jdbc:postgresql://localhost/alfresco]: jdbc:mysql://localhost:3306/alfresco
    JDBC Driver: [org.postgresql.Driver]:
    Web Server domain: []:
    Launch Alfresco Community Share [Y/n]: n

    Make sure that Alfresco is not started once the installation is complete. We will need to apply some custom configurations, as in the next section.


Configuring Alfresco

1. Create a symlink to simplify the Alfresco path:

$ ln -s /opt/alfresco-4.2.e /opt/alfresco

2. Download the MySQL connector for Java from MySQL Connector download site and install it into Tomcat library:

$ wget
$ tar -xzf mysql-connector-java-5.1.28.tar.gz
$ cd mysql-connector-java*
$ cp mysql-connector-java-5.1.28-bin.jar /opt/alfresco/tomcat/lib/

3. Create a database named alfrescoCreate a user named alfresco. Set the new user’s password to alfresco using the following steps:

  • Create a file db_setup.sql with the following contents:
    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;
  • Log into your MySQL server as root using the MySQL client:
    mysql -u root -p                                 
  • Run your script to set up the database for Alfresco:
    source db_setup.sql                        

    This will create the Alfresco database (alfresco) and user/pwd (alfresco/alfresco).

4. Increase the maximum connections setting in the MySQL configuration file.

  • Locate the configuration file:
    • Linux: /etc/my.cnf
    • Windows: c:\Users\All Users\MySQL\MySQL Server 5.6\my.ini
  • In the mysqld section, add or edit the max_connections property:
    max_connections = 275
  • Restart the database. /etc/mysql# service mysql restart

5. Navigate to the <ALFRESCO_HOME>/alf_data/ directory and empty the <contentstore> directory.

This is because the content store must be consistent with the database. Since, we have created an empty database in Step 2, we must empty the content store.

6. Open the <classpathRoot>/ file.

7. Edit the following line with an absolute path to point to the directory in which you want to store Alfresco data.

For example: dir.root=C:/Alfresco/alf_data

Uncomment the following properties:

8. Set the other database connection properties.
Note:Ensure that these database connection properties are not commented out.

9. Copy the keystore directory from the alf_data directory at the old location to the alf_data directory at the new location, which is specified in Step 7.

10. (Optional) Enable case sensitivity.

The default, and ideal, database setting for Alfresco is to be case-insensitive. For example, the user name properties in the<configRoot>\classes\alfresco\ file are:

# Are user names case sensitive?

If your preference is to set the database to be case-sensitive, add the following line to the file:

11. Save the file without the .sample extension.

12. Start Alfresco service:

$ service alfresco start

Wait until the bootstrapping process completes. You can monitor the process by examining the Tomcat process log file at /opt/alfresco/tomcat/logs/catalina.out.

If you receive JDBC errors, ensure the location of the MySQL JDBC drivers are on the system path, or add them to the relevant lib directory of the application server.

Open the Alfresco page at and login using default username “admin” with specified password during the installation process. You should see the Alfresco dashboard similar to the screenshot below:


admin has written 55 articles