Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

How to install PIMCore on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install PIMCore on Ubuntu 20.04 using Apache as web server.

According to Wikipedia:

Pimcore is an open-source enterprise PHP software platform for product information management (PIM), master data management (MDM), customer data management (CDP), digital asset management (DAM), content management (CMS), and digital commerce.

So, we are in the presence of a complete framework for the content management of a company.

It must be said that this software has won many awards and thus the trust of large companies worldwide.

So let’s go for it.

Install Apache, PHP 8 and MariaDB on Ubuntu 20.04

- Advertisement -

Pimcore requires an efficient and battle-ready LAMP platform. The only caution is that the minimum PHP version is 8. So let’s go for it.

First, completely upgrade your server.

sudo apt update
sudo apt upgrade

Then install a package needed to add the repository where we will install PHP 8

sudo apt install software-properties-common
- Advertisement -

Add the PHP 8 repository

sudo add-apt-repository ppa:ondrej/php

Refresh APT

sudo apt update

Now install Apache, PHP 8 and MariaDB by running

sudo apt install apache2 mariadb-server php8.0 libapache2-mod-php8.0 php8.0-mysql php8.0-curl php8.0-xml php8.0-zip php8.0-mbstring php8.0-intl php8.0-opcache php8.0-imagick php8.0-gd php8.0-cli php8.0-fpm libapache2-mod-fcgid

When the installation is finished, we have to configure some things in PHP.

Open the PHP-fpm configuration file.

sudo nano /etc/php/8.0/fpm/php.ini

And modify these parameters

memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 100M

You can use CTRL + W to search for each of the parameters. Save the changes and close the editor.

Then, enable the necessary modules and the new PHP-fpm configuration.

sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php8.0-fpm

Apply the changes by restarting Apache.

sudo systemctl restart apache2

Create a new database and user for PIMcore

After you have run the mysql_secure_installation script to set the root password and secure the installation, you will need to create a new database and user for PIMCore.

Access the MariaDB console

sudo mysql -u root -p

Create the new database with the name of your choice.

CREATE DATABASE pimcoredb charset=utf8mb4;

Then, create the new user along with its password. It should be a strong password and not the one I have put.

CREATE USER 'user'@'localhost' IDENTIFIED BY 'pss';

Give this new user permissions on the new database.

GRANT ALL ON pimcoredb.* TO 'user'@'localhost' WITH GRANT OPTION;

Apply the changes and close the console.

FLUSH PRIVILEGES;
exit;

Install Composer

To install PIMCore we first need to have Composer on the system. So let’s go for it.

Make sure you have the necessary packages like curl and git installed.

sudo apt install curl git unzip wget

Now download and install Composer by running this command

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Install PIMCore on Ubuntu 20.04

Access the directory where we are going to install.

cd /var/www/

Thanks to Composer, do the installation of PIMCore

sudo composer create-project pimcore/skeleton pimcore

After the process is finished, access the folder that has been generated.

cd /var/www/pimcore

And now run the script to complete the configuration parameters.

sudo ./vendor/bin/pimcore-install

During the execution of the above command, you will have to create the admin user along with the previously defined database parameters.

After this, the installation is complete.

Make Apache the owner of the folder with the necessary permissions.

sudo chown www-data:www-data -R /var/www/pimcore/
sudo chmod -R 755 /var/www/pimcore/

Create a new virtualhost for PIMCore

sudo nano /etc/apache2/sites-available/pimcore.conf

Add the following

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/pimcore/public
    ServerName example.com

     <Directory /var/www/pimcore/public/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

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

Remember to change the value of ServerName to your domain value

Save the changes and close the editor.

Then, enable the rewrite module, the new virtualhost and restart Apache.

sudo a2enmod rewrite
sudo a2ensite pimcore.conf
sudo systemctl restart apache2

Access to the PIMCore web interface

Now, using a web browser of your choice, you can access the PIMCore interface. For example, if you access your domain, you will see this screen.

1.- PIMCore screen
1.- PIMCore screen

If you want to access the dashboard, then go to http://yourdomain/admin to log in first. Remember that you created the login credentials in the previous step.

2.- PIMCore login page
2.- PIMCore login page

And now you can access the control panel.

3.- PIMCore on Ubuntu 20.04
3.- PIMCore on Ubuntu 20.04

Now it is your turn to use this tool. Come on, you can.

Conclusion

This post helped you to learn how to install PIMCore on Ubuntu 20.04 using a LAMP stack. I hope you liked it.

Thank you.

PIMCore website

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook