Introduction
Pimcore is an open source platform which allow us to manage digital data and manage customer experience . It allow to fast application development .
Development on Pimcore is easy because of its API based application development . So integrate in any It environment and for any developer it is easy to develop solution.
Some key features of Pimcore is data management, personalize digital experience ,web content management ,multi channel delivery ,personalization, analytics and print publishing for product catalog.
Product offer by Pimcore are – PIM,MDM,DAM,CDP,DXP
In this article we will cover how to install Pimcore. For the article we have deploy it on AWS instance but you can use same process on any ubuntu 20.04 on any platform like Baremetal ,vulture, ESXi, Linode , etc.
Prerequisites:
- Ubuntu 20.04 – We assume you have installed OS
- Internet connection on ubuntu for package download
- ssh enable to work remotely or if you have local console that is also fine
- A user with sudo access
Install required package :
Update :
$ sudo apt update
$ sudo apt upgrade
Configure repo and install packages:
Then install a package needed to add the repository where we will install PHP 8
$ sudo apt install software-properties-common
Add the PHP 8 repository
$ sudo add-apt-repository ppa:ondrej/php
Refresh APT
$ sudo apt update
Now install Apache, PHP 8 , MariaDB and other supporting packages by below command
$ 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
This should be complete without any error and please check below screenshot for reference. If it not match need to check your internet connection or space issue.
Configure PHP for Pimcore
When the installation is finished, we have to configure PHP parameter for Pimcore. Open the PHP-fpm configuration file.
$ sudo vi /etc/php/8.0/fpm/php.ini
Modify these parameters as shown in screenshot
memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 100M
Save changed press esc key then :wq! Press enter
Enable module of PHP
Then, enable the necessary modules and the new PHP-fpm configuration.
$ sudo a2enmod proxy_fcgi setenvif
$ sudo a2enconf php8.0-fpm
Apply all 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.
Below is method to install mysql securely
$ sudo systemctl enable mysql
$ sudo mysql_secure_installation
Answer the questions when prompt – Setup VALIDATE PASSWORD plugin? N and others press Y
Access the MariaDB console
$ sudo mysql -u root -p
Create the new database with the name of your choice. we are using pimcoredb
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 assigned . It is only for article purpose. user = user , password = pss
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 need to configure Composer on the system. So let’s go for it.
Make sure you have wget,zip curl,git packages installed.
$ sudo apt install curl git unzip wget
Now download and install Composer by running below command:
$ sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Install PIMCore on Ubuntu 20.04
Go to the directory where we are going to install.
$ cd /var/www/
Now install PIMcore using composer . This will make your installation very easy. It may prompt some options to proceed then choose yes, if not then just let it finish .
$ sudo composer create-project pimcore/skeleton pimcore
After completion screen should be like this
Should complete without error.
After the process is finished, go to the folder that has been generated.
$ cd /var/www/pimcore
$ ls
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. Note down this admin and password will required to login to dashboard.
Please check below reference screenshot.
Please check there should be no error after installation .After this, the installation is complete.
Configure Apache for PIMcore
Make Apache the owner of the folder with the necessary permissions.
Related Article: how to change ownership in linux ?
$ sudo chown www-data:www-data -R /var/www/pimcore/
$ sudo chmod -R 755 /var/www/pimcore/
Create a new virtual host for PIMCore
sudo vi /etc/apache2/sites-available/pimcore.conf
Add below configuration in file
<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>
Check if there any syntax error in apache configuration file
$ apachectl -t
Remember to change the value of Server Name and ServerAdmin to your domain value
Then, enable the rewrite module, the new virtual host and restart Apache.
$ sudo a2enmod rewrite
$ sudo a2ensite pimcore.conf
$ sudo systemctl restart apache2
Configure Firewall
$ sudo ufw allow 80
$ sudo ufw allow 443
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.
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 PIMcore installation step.
And now you can access the control panel.
Now you have successfully installed PIMcore .