System install on Ubuntu 14.04

Here is a quick guide to set up the System Requirements on Ubuntu 14.04. This guide will help you to install all the packages and modules needed for Akeneo PIM, then configure it to match your local installation.

System installation

PHP installation


Since Akeneo PIM 1.6, the minimal PHP version is PHP 5.6. Ubuntu 14.04 default PHP version is PHP 5.5, you need to upgrade it.

  • To upgrade to PHP 5.6, add this repository:
$ sudo add-apt-repository ppa:ondrej/php
  • You can now install PHP 5.6 and the needed libraries:
$ sudo apt-get update
$ sudo apt-get install php5.6
$ sudo apt-get install php5.6-xml php5.6-zip php5.6-curl php5.6-mongo php5.6-intl php5.6-mbstring php5.6-mysql php5.6-gd php5.6-mcrypt php5.6-cli php5.6-apcu
$ sudo php5enmod mcrypt
  • Check that PHP 5.6 is now your current PHP version with:
$ php -v

Base installation

  • Install Apache, MySQL, then the dedicated modules for Akeneo PIM:
$ sudo apt-get install apache2 libapache2-mod-php5.6
$ sudo apt-get install mysql-server
$ sudo a2enmod rewrite
$ sudo service apache2 restart


PHP 5.5 provided in Ubuntu 14.04 comes with the Zend OPcache opcode cache. Only the data cache provided by APCu is needed.

Choosing the product storage

Depending on your data volume (number of products, number of attributes per product, number of basic, localized or scopable attributes, number of locales, number of scopes, etc.) you will have to choose a strategy to store your products, which will determine your database server configurations:

  • Full SQL database with MySQL. All your data will be stored in MySQL.
  • Hybrid SQL storage with MySQL and MongoDB. Your product related data will be stored in MongoDB. The other data will still remain in MySQL.

To make an educated choice you should try to find out how many product values your database will store. For example, for one product:

  • A simple attribute will generate only one product value
  • A localized attribute will generate as many product values as you have locales enabled
  • A scopable attribute will generate as many product values as you have channels
  • A localizable and scopable attribute will generate: (number of enabled locales * number of channels) product values

We consider that MySQL can store up to 5 million product values. Here is the complete formula to check if you have more product values than the recommended threshold that MySQL can manage alone:

N products * (
    N simple attributes
    + ( N localized attributes * N enabled locales )
    + ( N scopable attributes * N existing channels )
    + ( N scopable AND localizable attributes * N enabled locales * N existing channels )
) > 5 Million

Based on this formula, either you need a MongoDB Installation (optional), either you can directly go to the System configuration section.

MongoDB Installation (optional)

  • Install MongoDB server and PHP driver


Akeneo PIM will not work with MongoDB 3.*. The supported versions are 2.4 and 2.6.

$ sudo apt-get update
$ sudo apt-get install mongodb
$ sudo apt-get install php5-mongo

System configuration

You now have a system with the right versions of Apache, PHP and MySQL. The next step is to configure them to be able to run an Akeneo PIM instance.


  • Create a dedicated MySQL database and a dedicated user (called akeneo_pim) for the application
$ mysql -u root -p
mysql> CREATE DATABASE akeneo_pim;
mysql> GRANT ALL PRIVILEGES ON akeneo_pim.* TO akeneo_pim@localhost IDENTIFIED BY 'akeneo_pim';
mysql> EXIT


  • Setup Apache php.ini file /etc/php5/apache2/php.ini


If you have several php versions on your server, these files can be located in /etc/php/x.x/apache2/php.ini and /etc/php/x.x/cli/php.ini.

$ sudo vim /etc/php5/apache2/php.ini
memory_limit = 512M
date.timezone = Etc/UTC
  • Setup CLI php.ini file /etc/php5/cli/php.ini
$ sudo vim /etc/php5/cli/php.ini
memory_limit = 768M
date.timezone = Etc/UTC


Use the time zone matching your location, for example America/Los_Angeles or Europe/Berlin. See for the list of all available timezones.


Setting up the permissions

To avoid spending too much time on permission problems between the CLI user and the Apache user, an good practice is to use the same user for of them.


This configuration is aimed to easily set up a development machine. It is absolutely not suited for a production environment.

  • Get your identifiers
$ id
uid=1000(my_user), gid=1000(my_group), ...

In this example, the user is my_user and the group is my_group.

  • Stop Apache
$ sudo service apache2 stop
  • Open this file /etc/apache2/envvars with your favorite text editor:
$ sudo vi /etc/apache2/envvars
# replace these environment variables:
export APACHE_RUN_USER=my_user
export APACHE_RUN_GROUP=my_group

$ sudo chown -R my_user /var/lock/apache2


On the default installation, Apache run user and Apache run group are www-data. You have to replace these variables:

  • APACHE_RUN_USER=www-data by APACHE_RUN_USER=my_user
  • APACHE_RUN_GROUP=www-data by APACHE_RUN_GROUP=my_group
  • Restart Apache
$ sudo service apache2 start

Creating the virtual host file

The next step is to create a virtual host for Apache to point to the installation folder of the Akeneo PIM. First, create the file /etc/apache2/sites-available/akeneo-pim.local.conf

<VirtualHost *:80>
    ServerName akeneo-pim.local

    DocumentRoot /path/to/installation/pim-community-standard/web/
    <Directory /path/to/installation/pim-community-standard/web/>
        AllowOverride All
        Require all granted
    ErrorLog ${APACHE_LOG_DIR}/akeneo-pim_error.log

    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/akeneo-pim_access.log combined


  • Replace /path/to/installation by the path to the directory where you want to install the PIM.
  • Replace pim-community-standard by pim-enterprise-standard for enterprise edition.
  • Don’t forget to add the web directory of your Symfony application.

Enabling the virtual host

The Apache configuration is done, you need to enable it:

$ sudo apache2ctl configtest
# This will return 'Syntax OK'

$ sudo a2ensite akeneo-pim.local
$ sudo service apache2 reload

Adding the virtual host name

The last step is to edit the file /etc/hosts and add the following line:    akeneo-pim.local