Step by step installation on developement workstation¶
This document provides a step by step instruction to install the PIM on development workstations based on Ubuntu 12.10 or Ubuntu 13.10.
The following instructions has been tested on fresh installations of Ubuntu 12.10 and Ubuntu 13.10. The main difference between the distribution is the PHP version used (PHP 5.4 for Ubuntu 12.10 and PHP 5.5 for Ubuntu 13.10).
Note
Even if the instructions apply to Ubuntu 12.10 and 13.10, the same process and requirements can be used for any PHP 5.4 or PHP 5.5 bases Linux distribution
Note
Support of MongoDB, introduced in Akeneo 1.1, still require you to have a working MySQL database.
The choice of using an hybrid ORM/ODM solution has been made for several reasons. First of all, we do not believe it makes sense to store everything (users, categories, families, attributes, products, etc.) as documents. Those data will always have strong associations between them, it would not make sense to denormalize (compare to the performance drawback of synchronizing denormalized data) or use document references in those cases. Furthermore, complex SQL requests are performed to calculate completeness for example. Maintaining two identical versions of this requests (in SQL and Mongo) would require extra effort that we don’t consider necessary for now. That’s why we chose to only store products as documents when you activate the MongoDB support.
Prerequisite¶
In order to install Akeneo, you will have to download the Akeneo PIM Standard Edition archive file from http://www.akeneo.com/download/
System installation¶
Installing MongoDB¶
Following is optional, to execute only if you want use the MongoDB storage
1 2 3 4 | $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
$ sudo echo deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen \> /etc/apt/sources.list.d/mongodb-10gen.list
$ sudo apt-get update
$ sudo apt-get install mongodb-10gen
|
Installing PHP¶
Ubuntu 12.10 & 13.10
1 2 | $ sudo apt-get install libapache2-mod-php5 php5-cli
$ sudo apt-get install php5-mysql php5-intl php5-curl php5-gd php5-mcrypt
|
Ubuntu 13.10
1 2 3 | $ sudo apt-get install php5-json
$ sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available/
$ sudo php5enmod mcrypt
|
Following is optional, to execute only if you want use the MongoDB storage
1 2 3 | sudo apt-get install php-pear build-essential php5-dev
sudo pecl install mongo
sudo echo "extension=mongo.so" > /etc/php5/conf.d/mongo.ini
|
Installing PHP opcode and data cache¶
Ubuntu 12.10
1 | $ sudo apt-get install php-apc
|
Ubuntu 13.10
1 | $ sudo apt-get install php5-apcu
|
Note
In case of PHP 5.5 on Ubuntu 13.10, the Zend OPcache opcode cache is installed and enabled by default. Only the data cache provided by APCu is needed.
System configuration¶
MySQL¶
- Creating a MySQL database and user for the application
Ubuntu 12.10 & 13.10
1 2 3 4 | $ 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
|
PHP¶
- Setting up PHP Apache configuration
Ubuntu 12.10 & 13.10
1 2 3 | $ sudo gedit /etc/php5/apache2/php.ini
memory_limit = 256M
date.timezone = Etc/UTC
|
- Setting up PHP CLI configuration
Ubuntu 12.10 & 13.10
1 2 3 | $ sudo gedit /etc/php5/cli/php.ini
memory_limit = 768M
date.timezone = Etc/UTC
|
Note
Use the time zone corresponding to our location, for example America/Los_Angeles, Europe/Berlin. See http://www.php.net/timezones for the list of available timezones.
Apache¶
To avoid spending too much time on rights problems between the installing user and the Apache user, an easy configuration is to use same user for both processes.
Get your idenfiers¶
Ubuntu 12.10 & 13.10
1 2 | $ id
uid=1000(my_user), gid=1000(my_group), ...
|
In this example, the user is my_user and the group is my_group.
Use your identifiers for Apache¶
Ubuntu 12.10 & 13.10
1 2 3 4 | $ sudo service apache2 stop
$ sudo gedit /etc/apache2/envvars
export APACHE_RUN_USER=my_user
export APACHE_RUN_GROUP=my_group
|
Installing Akeneo PIM¶
Extracting the archive¶
1 2 | $ cd /path/to/installation
$ tar -xvzf /path/to/pim-community-standard-version.tar.gz
|
Note
Replace the /path/to/installation by the path to directory where you want to install the PIM.
Replace the /path/to/pim-community-standard-version.tar.gz by the location and name of the archive you have downloaded from http://www.akeneo.com/download.
Warning
After the extraction, a new directory usually called pim-commuity-standard-version is created inside the /path/to/installation directory.
It will be our PIM root directory and will be refered as /path/to/pim/root in the following instructions.
Installing Akeneo¶
1 2 3 | $ cd /path/to/pim/root
$ php app/console pim:install --env=prod
$ php app/console cache:clear --env=prod
|
Following is optional, to execute only if you want use the MongoDB storage, must be run before the pim:install command
Copy and uncomment the mongodb_* parameters from app/config/parameters.dist.yml to app/config/parameters.yml
In app/config/config.yml, switch ‘pim_catalog.storage_driver’ to “doctrine/mongodb-odm”
Install the require dependency:
1 | $ php composer.phar require "doctrine/mongodb-odm-bundle: 3.0.*@dev"
|
In app/AppKernel.php, uncomment the following line (this will enable DoctrineMongoDBBundle and will load and enable the MongoDB configuration):
1 | new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
|
Configuring the virtualhost¶
Creating the vhost file¶
Ubuntu 12.10
1 | $ sudo gedit /etc/apache2/sites-available/akeneo-pim.local
|
Ubuntu 12.10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <VirtualHost *:80>
ServerName akeneo-pim.local
DocumentRoot /path/to/pim/root/web/
<Directory /path/to/pim/root/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/akeneo-pim_error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/akeneo-pim_access.log combined
</VirtualHost>
|
Ubuntu 13.10
1 | $ sudo gedit /etc/apache2/sites-available/akeneo-pim.local.conf
|
Ubuntu 13.10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <VirtualHost *:80>
ServerName akeneo-pim.local
DocumentRoot /path/to/pim/root/web/
<Directory /path/to/pim/root/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/akeneo-pim_error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/akeneo-pim_access.log combined
</VirtualHost>
|
Note
The difference in Virtual Host configuration between Ubuntu 12.10 and Ubuntu 13.10 is the result of the switch from Apache 2.2 to Apache 2.4. See https://httpd.apache.org/docs/2.4/upgrading.html for more explanation.
Enabling the virtualhost¶
Ubuntu 12.10 & Ubuntu 13.10
1 2 3 | $ sudo a2ensite akeneo-pim.local
$ sudo apache2ctl -t
$ sudo service apache2 restart
|
Testing your installation¶
Go to http://akeneo-pim.local/ and log in with admin/admin.
If you can see the dashboard, congratulations, you have successfully installed Akeneo PIM !
You can as well access the dev environment on http://akeneo-pim.local/app_dev.php
If you have an error, it means that something went wrong in a previous step. So please check all error output of all instructions.