How can we help you today?

How to install Akeneo 5 on Hypernode

Created by: Reggy Almeida

Modified on: Wed, 21 Apr, 2021 at 4:03 PM


Akeneo 5 preferably requires a Hypernode Professional M hosting plan or larger. You can either choose to install it on a seperate Hypernode instance or on the same Hypernode as your Magento or Shopware installation. If you choose the latter you have to make sure that you have enough resources (disk space, memory and CPU) left. Furthermore you need to make sure that you are already using MySQL 8.0, PHP 7.4 and Elasticsearch 7.x, so it won’t affect your shop negatively. Installing Akeneo version 5.x may take up to 15 minutes.


TABLE OF CONTENTS


Enable managed_vhosts

All new Hypernodes (from April 2020) will automatically be booted with Hypernode Managed Vhosts. If you already have an older Hypernode, then you need to enable Hypernode Managed Vhosts by running the following command:

hypernode-systemctl settings managed_vhosts_enabled True

Create a Managed_vhost for a (Sub)Domain

If your Magento or Shopware installation already points to example.hypernode.io, you can create a managed_vhost for your Akeneo installation on a subdomain, for example akeneo.example.hypernode.io. The command below will also install Let’s Encrypt and force your domain to use HTTPS.

hypernode-manage-vhosts akeneo.example.hypernode.io --type akeneo4 --https --force-https

The file server.akeneo.conf will be created and the nginx configuration will look like this:

root /data/web/akeneo_public;
include /etc/nginx/handlers.conf;

location / {
    # If the requested page is a file that doesn't exist, serve
    # index.php instead, and let it be executed using phpfpm.
    try_files $uri /index.html /index.php;

    location ~ \.php$ {
        echo_exec @phpfpm;
    }
}

Upgrade to MySQL 8.0

Important: After an update to MySQL 5.7 or 8.0, it’s not possible to switch back to MySQL 5.6.

It's important to follow these steps in order since you cannot upgrade straight from MySQL 5.6 to MySQL 8.0.

First you’ll have to to upgrade MySQL 5.6 to 5.7 by running the commando:

hypernode-systemctl settings mysql_version 5.7

After that upgrade from MySQL 5.7 to MySQL 8.0

hypernode-systemctl settings mysql_version 8.0

Upgrade Your PHP Version to 7.4

Before installing Akeneo, make sure your PHP version is changed to PHP 7.4.

hypernode-systemctl settings php_version 7.4

Enable PHP-APCU

hypernode-systemctl settings php_apcu_enabled True

Configure and Enable Elasticsearch v7.x

hypernode-systemctl settings elasticsearch_version 7.x
hypernode-systemctl settings elasticsearch_enabled True


Download and Install Akeneo 5 Manually Using the Command Line

If you don't want to use the pre-install image, than follow the steps below to manually download and install Akeneo in /data/web/akeneo


Install Node.js v12.20

cd /tmp
wget https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-x64.tar.xz
tar xvfJ node-v12.20.0-linux-x64.tar.xz
mv node-v12.20.0-linux-x64 ~/.node
rm node-v12.20.0-linux-x64.tar.xz
mkdir -p ~/.local/bin
for f in ~/.node/bin/*; do ln -s $f ~/.local/bin/`basename $f`; done
source ~/.profile

After Node.js has been installed you can check if it’s correctly set by running node -v. This should output v12.20.0.

Install the Latest Version of Yarn

cd /tmp
wget https://yarnpkg.com/latest.tar.gz
tar zvxf latest.tar.gz
mv yarn-v* ~/.yarn
rm latest.tar.gz
ln -s ~/.yarn/bin/yarn ~/.local/bin/yarn
ln -s ~/.yarn/bin/yarnpkg ~/.local/bin/yarnpkg
source ~/.profile

Download Akeneo 5

mkdir ~/akeneocd ~/akeneo 
COMPOSER_MEMORY_LIMIT=-1 composer2 create-project akeneo/pim-community-standard

Create a Database

mysql -e "create database akeneo_pim;"

Composer update

cd ~/akeneo/pim-community-standardrm composer.lock
composer2 update

Configure Your .env File

Edit the values of your MySQL user, password, host and Elasticsearch host in /data/web/akeneo/pim-community-standard.env

sed -i "s/APP_DATABASE_PASSWORD=akeneo_pim/APP_DATABASE_PASSWORD=$(cat ~/.my.cnf | grep password | awk '{print$NF}')/" /data/web/akeneo/pim-community-standard/.env
sed -i "s/APP_DATABASE_USER=akeneo_pim/APP_DATABASE_USER=$(cat ~/.my.cnf | grep user | awk '{print$NF}')/" /data/web/akeneo/pim-community-standard/.env
sed -i "s/APP_DATABASE_HOST=mysql/APP_DATABASE_HOST=mysqlmaster/" /data/web/akeneo/pim-community-standard/.env
sed -i "s/APP_INDEX_HOSTS=elasticsearch:9200/APP_INDEX_HOSTS=localhost:9200/" /data/web/akeneo/pim-community-standard/.env

Launch Akeneo 5

NO_DOCKER=true make prod

Create an Administrator User

Fill in the form with a Username, Password, First name, Last name, Email and local code.

bin/console pim:user:create
ln -s /data/web/akeneo/pim-community-standard/public /data/web/akeneo_public

Configure Your Akeneo Crons

Configure your crons by adding these scripts to your crontab file as recommended by Akeneo:

30 1 * * * php /data/web/akeneo/pim-community-standard/bin/console pim:versioning:refresh
30 2 * * * php /data/web/akeneo/pim-community-standard/bin/console pim:versioning:purge –more-than-days 90
1 * * * * php /data/web/akeneo/pim-community-standard/bin/console akeneo:connectivity-audit:update-data
20 0 1 * * php /data/web/akeneo/pim-community-standard/bin/console akeneo:batch:purge-job-execution
0 1 * * * php /data/web/akeneo/pim-community-standard/bin/console pim:asset:send-expiration-notification
30 4 * * * php /data/web/akeneo/pim-community-standard/bin/console pim:volume:aggregate
* * * * * php /data/web/akeneo/pim-community-standard/bin/console akeneo:batch:job-queue-consumer-daemon








R
Reggy is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.