How To Install Akeneo PIM on Ubuntu 18.04 LTS

Introduction

Akeneo is an open-source Product Information Management (PIM) platform for conducting business. This free platform is based on the Symfony2 framework and can be easily customized.

Akeneo also features an easy to use interface that allows for easier collaboration and automation to improve customer and partners engagement experiences across multiple devices. With this tool, you can easily edit your data, complete product sheets, define the key attributes you need, add media files, translate information into different languages, and track any modifications made in a product.

In this tutorial, we are going to take you through the process of installing Akeneo product management system (PIM) on Ubuntu 18.04 LTS.

Prerequisites

  • A server running on Ubuntu 18.04
  • A non-root user with sudo privileges

Step 1- Installing Apache Server

Before you begin, you need to install Apache, MariaDB, and PHP to your system.

We shall start with Apache and MariaDB.

Run the command below to update your system:

$ sudo apt update

To install Apache2 on Ubuntu, run the following command:

$ sudo apt install apache2

Once Apache is installed, disable the directory listing by running the command below:

$ sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf

Next, you should start and enable Apache2 service to ensure it always starts when the server boots.

$ sudo systemctl start apache2.service
$ sudo systemctl enable apache2.service

Step 2 - Installing MariaDB Database

Akeneo requires a database server to work properly and MariaDB is a good database server to start with. Run the command below to install it.

$ sudo apt-get install mariadb-server mariadb-client

Once you have installed MariaDB, use the command below to start and enable the newly installed MariaDB service and ensure it start every time the server boots.

$ sudo systemctl start mariadb.service
$ sudo systemctl enable mariadb.service

Once you’re done, run the command below to secure the MariaDB service.

$ sudo mysql_secure_installation

You will be prompted to answer a few questions as shown below:

Enter current password for root (enter for none): Since you just installed MariaDB and no password is set, Press Enter.

Set root password? [Y/n]: Press Y

New password: Enter password

Re-enter new password: Repeat the password

Remove anonymous users? [Y/n]: Y

Disallow root login remotely? [Y/n]: Y

Remove test database and access to it? [Y/n]:  Y

Reload privilege tables now? [Y/n]:  Y

Now restart the MariaDB server

$ sudo systemctl restart mysql.service

Step 3 - Installing PHP Modules

You may not find PHP 7.1 on default repositories on Ubuntu 18.04. So, to install this service, you have to download it from third-party repositories.

To add a third party repository (Ondrej PHP repository), run the following commands:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php

Now, update the settings and upgrade the service to PHP 7.1.

$ sudo apt update

To install PHP 7.1 and it’s related modules, run the following commands:

$ sudo apt install php7.1 libapache2-mod-php7.1 php7.1-apcu php7.1-bcmath php7.1-common php7.1-mbstring php7.1-xmlrpc php7.1-soap php7.1-gd php7.1-xml php7.1-intl php7.1-mysql php7.1-cli php7.1-mcrypt php7.1-ldap php7.1-zip php7.1-curl

Once PHP is installed, open the default file for Apache2 PHP using the following commands:

$ sudo nano /etc/php/7.1/apache2/php.ini

Now, make the following changes by editing the lines in the file then save.

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 30
max_input_vars = 1500
date.timezone = America/Chicago

Step 4 - Creating Akeneo Database

After installing all the necessary packages, go ahead and configure the servers. Start by creating a blank database for Akeneo.

Run the following command to login to the database server in MariaDB.

$ sudo mysql -u root -p

Next, create a new database known as akeneo.

CREATEDATABASE akeneo;

Also, create another database by the name akeneouser and a new password.

CREATEUSER'akeneouser'@'localhost'IDENTIFIEDBY'new_password_here';

Make sure you grant the user complete database access access.

GRANT ALL ON akeneo.* TO'akeneouser'@'localhost'IDENTIFIEDBY'user_password_here'WITHGRANTOPTION;

Now save the changes then exit.

FLUSHPRIVILEGES;
EXIT;

Step 5 - Downloading AkeneoLatest

By now, the stage is set and its should be easy to install and configure Akeneo PIM. Go to Akeneo official site and search for the latest version.

Here, you will find two options:

Options 1: Community Edition- Make sure you replace the line pim-community-standard-v2.2-latest-icecat.tar.gz  with the actual location and name of the file you have download from the sitehttps://www.akeneo.com/download

Option 2: Enterprise Edition -For this version, make sure you replace the line pim-community-standard-v2.2-latest-icecat.tar.gz with the actual location and name of the file you have already downloaded from Partner portal.

Alternatively, you can download and extract these files into Akeneo root file by running the following commands:

$cd /tmp && wget wget http://download.akeneo.com/pim-community-standard-v2.2-latest-icecat.tar.gz
$ sudo tar -xvzf pim-community-standard-v2.2-latest-icecat.tar.gz -C /var/www/html/akeneo

Now, let’s try if Akeneo is working.

Step 6 - Initializing Akeneo

Once you have extracted your files, change them in the Akeneo directory then run the following command:

$cd /var/www/html/akeneo/pim-community-standard
$ sudo php -d memory_limit=3G ../composer.phar install --optimize-autoloader --prefer-dist
$ sudo php bin/console cache:clear --no-warmup --env=prod
$ sudo php bin/console pim:installer:assets --symlink --clean --env=prod

Now, set the right permissions to ensure Akeneo is functioning properly using the commands below:

$ sudo chown -R www-data:www-data /var/www/html/akeneo/
$ sudo chmod -R 755 /var/www/html/akeneo/

Next, let’s configure Apache2.

Step 7 - Configuring Apache2 for Akeneo

The last step is to create an Apache2 virtual host file for Akeneo. Run the following commands:

$ sudo nano /etc/apache2/sites-available/akeneo.conf

Now, add the following lines to your file then save it. Enter your domain name and root location for your directory in the highlighted line.

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/akeneo/pim-community-standard/web
     ServerName example.com
     ServerAlias www.example.com

     <Directory /var/www/html/akeneo/pim-community-standard/web/>
        Options +FollowSymlinks
        AllowOverrideAll
        Requireall granted
     </Directory>

     ErrorLog${APACHE_LOG_DIR}/error.log
     CustomLog${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Then, save and exit once you’re done.

Then enable Akeneo virtual host file and rewrite module using the following commands:

$ sudo a2ensite akeneo.conf
$ sudo a2enmod rewrite

Now restart Apache service to apply these changes:

$ sudo systemctl restart apache2.service

The next step is to go to your browser and type your server domain name with the URL http://example.com  then complete the necessary steps to install Akeneo.

Conclusion

Congratulations! You have successfully installed Akeneo PIM on Ubuntu 18.04 LTS. Now try it out. If you run into problems during the installation process, contact us for further help.

Check out these top 3 Linux hosting services

Was this article helpful?