Reading list Switch to dark mode

    How to setup Akeneo V2 with PHP7.1

    Updated 16 July 2021

    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

    Searching for an experienced
    Akeneo Company ?
    Find out More

    Mysql            5.7

    My Installation directory is  /var/www/akeneo

    Install all necessary packages(LAMP and php extensions)

    sudo su
    apt install mysql-server
    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
    apt install apache2
    a2enmod rewrite proxy_fcgi
    systemctl restart apache2

    Install Elastic Search (5.5+)

    apt install apt-transport-https
    wget -O - | apt-key add -
    echo "deb 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

    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 | bash -
    apt-get install -y nodejs

    Install Yarn

    curl -sS | apt-key add -
    echo "deb 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 #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

    Rewrite apache module and restart apache service.

    a2enmod rewrite
    service apache2 restart

    Make host entry in /etc/hosts    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.

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*

    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home