Serverinstallation for Pimcore with Apache PHP FPM and MariaDB

we will walk you through the full server installation on a debian WSL instance. With this base you should be able to install this on any debian based server and with some small changes on any linux based system.

First Update the system

it is always recommended to update your repositories and system for that matter before you begin. Execute these simple commands:

sudo apt update
sudo apt upgrade

Install the Apache Server

The apache2 package is available in the repository and can be installed with these commands:

sudo apt install apache2 apache2-utils
sudo systemctl start apache2
sudo systemctl enable apache2

You can check if you installed apache correctly with this command:

sudo apache2 -v

You might also want to check iptables or any other firewall you might have installed so that port 80 and 443 is not blocked.

Also make sure that the owner and rights are set correctly in your html folder with the following command:

sudo chown www-data:www-data /var/www/html/ -R

Install MariaDB

MariaDB is also available in the repository and can be installed quite similarily:

sudo apt install mariadb-server mariadb-client
systemctl status mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

You might also want so secure your database installation for production servers by executing this command and follow the instructions:

sudo mysql_secure_installation

Install PHP with FastCGI

Now we install PHP as well a necessary modules for php and also FastCGI to get the best performace out of our installation: For newer PHP versions change version number accordingly if already available in the repositories.

sudo apt install php7.3 libapache2-mod-php7.3 php7.3-mysql php-common php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-readline php7.3-fpm

Next we enable the fcgi module and the php-fpm configuration

sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.3-fpm

sudo systemctl restart apache2

You can check your php-cli version with this command:

php --version

Install more necessary and recommended modules and programms for Pimcore

This command includes most of Pimcores recommended PHP Modules. For newer PHP versions change version number accordingly

sudo apt install php7.3-curl php7.3-gd php7.3-imagick php7.3-imap php7.3-intl php7.3-memcache php7.3-sqlite php7.3-redis php7.3-bz2 php7.3-ldap php7.3-xml php7.3-mbstring php7.3-zip php7.3-bcmath

At last some cli tools Pimcore uses for its processing

sudo apt install bzip2 unzip memcached ntpdate libxrender1 libfontconfig1 imagemagick libssl-dev rcconf autoconf libmagickwand-dev pngnq pngcrush xvfb cabextract libfcgi0ldbl poppler-utils rsync xz-utils xfonts-75dpi jpegoptim pigz libtext-template-perl mailutils redis-server git-core curl locales-all webp
Comments (0)
  • No Comments
If you want to participate in the discussions. Please log in or consider registering