How to setup Akeneo V2 with PHP7.1

We already have an article related to What is Akeneo and how can we set up with Ubuntu14.04.2 and php7? 

In this article, we are going to setup Akeneo v2. We can install Akeneo using 2 ways, using Docker or using manual installation. Here, we use manual

Ubuntu          16.04

Apache2        ≥ 2.4

Php                7.1

Mysql            5.7

My Installation directory is  /var/www/akeneo

Install all necessary packages(LAMP and php extensions)

sudo su
#Mysql
apt install mysql-server
#PHP
add-apt-repository ppa:ondrej/php
apt update
apt install php7.1-apcu php7.1-bcmath php7.1-cli php7.1-curl php7.1-fpm php7.1-gd php7.1-intl php7.1-mcrypt php7.1-mysql php7.1-soap php7.1-xml php7.1-zip
#Apache
apt install apache2
a2enmod rewrite proxy_fcgi
systemctl restart apache2

Install Elastic Search (5.5+)

apt install apt-transport-https
wget -O - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list
apt update
apt install openjdk-8-jre-headless
apt install elasticsearch
# You will probably need to increase the MAX_MAP_COUNT Linux kernel setting
sysctl -w vm.max_map_count=262144
echo "vm.max_map_count=262144" | tee /etc/sysctl.d/elasticsearch.conf
systemctl restart elasticsearch
# service elasticsearch restart

Notes related to Elastic Search installation
1. Elastic should be installed/ running else tables will not create properly and setup will not work.
2. If memory issue is coming then we need to create/ increase swap memory (in case of low memory).
3. If you are facing some kind of issue at time of installation (apt install openjdk-8-jre-headless) then you can try this link to install java http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/

Php configuration
Configure timezone and memory limit  in  /etc/php/7.1/cli/php.ini

sudo vim /etc/php/7.1/cli/php.ini
memory_limit = 1024M
date.timezone = Etc/UTC

Database configuration

#Login to your mysql root
#create user and database for akeneo. 
#please use the username and database given below or the installation will not work.
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

Install Node

curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs

Install Yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update && apt-get install yarn

Now our system is ready to setup Akeneo.

Install Akeneo Community Edition

wget https://download.akeneo.com/pim-community-standard-v2.0-latest-icecat.tar.gz #for icecat version
# Define your installation path here, I already have /var/www/akeneo
# mkdir -p /path/to/installation
# tar -xvzf pim-community-standard-v2.0-latest-icecat.tar.gz -C /path/to/installation/
# The PIM will be extracted in the folder /path/to/installation/pim-community-standard
tar -xvzf pim-community-standard-v2.0-latest-icecat.tar.gz -C /var/www/akeneo
cd /var/www/akeneo/pim-community-standard
php -d memory_limit=3G ../composer.phar install --optimize-autoloader --prefer-dist
yarn install
php bin/console cache:clear --no-warmup --env=prod
php bin/console pim:installer:assets --symlink --clean --env=prod
bin/console pim:install --force --symlink --clean --env=prod
yarn run webpack

Virtual Host configuration

<VirtualHost *:80>
ServerName pim.pim # your website name
DocumentRoot /var/www/akeneo/pim-community-standard/web
CustomLog /var/log/apache2/akeneo_access.log combined
ErrorLog  /var/log/apache2/akeneo_error.log
   <Directory /var/www/akeneo/pim-community-standard/web>
        Require all granted
        AllowOverride all
   </Directory>
</VirtualHost>

Rewrite apache module and restart apache service.

a2enmod rewrite
service apache2 restart

Make host entry in /etc/hosts

127.0.0.1    pim.pim # Your website name

Open pim.pim (Your website) in the browser. If you see this page then you have successfully installed Akeneo.

 

Log in using username “admin” and password “admin” and explore Akeneo. If you have any doubts regarding installation, you can ask me in the comment.

 

Resources: All documents are available at Akeneo doc site.

. . .

Ask a Feature