How to install Pimcore on Debian Latest

Pimcore is an open-source, powerful, and feature-rich content management system based on PHP. In this tutorial, we will show you how to install Pimcore on Debian latest.

Requirements

Step 1: Update and Upgrade Server

Before installing any package or software, it is recommended to update your system packages to the latest version. So, let's update and upgrade the server.

apt update && apt upgrade -y

Step 2: Install Apache, MySQL, and PHP

Pimcore requires Apache, MySQL and PHP to be installed on the system. Run the following command to install Apache, MySQL, and PHP along with some required extensions.

apt install -y apache2 php mysql-server php-mysql php-gd php-xml php-imagick php-curl php-zip php-mbstring unzip

Step 3: Configure MySQL

After installing MySQL, secure the MySQL installation by running the following command,

mysql_secure_installation

This will take you through a series of prompts to configure MySQL. We recommend enabling all of the prompts for the best MySQL security.

Now, log in to MySQL to create a new user and database for Pimcore.

mysql -u root -p

Then create a new database and user for Pimcore,

CREATE DATABASE pimcoredb;
CREATE USER 'pimcoreuser'@'localhost' IDENTIFIED BY 'pimcorepassword';
GRANT ALL PRIVILEGES ON pimcoredb.* TO 'pimcoreuser'@'localhost';
FLUSH PRIVILEGES;

Step 4: Download and Install Pimcore

Now, let's download and install Pimcore. First, navigate to the Apache document root directory,

cd /var/www/html/

Then, download the latest stable release of Pimcore from their official website,

wget https://www.pimcore.org/download/pimcore-latest.zip

Extract the downloaded file,

unzip pimcore-latest.zip

Rename the extracted folder to pimcore,

mv pimcore* pimcore

Now, set the correct permissions for the pimcore directory,

chown -R www-data:www-data /var/www/html/pimcore
chmod -R 775 /var/www/html/pimcore

Step 5: Configure Apache for Pimcore

To configure Apache for Pimcore, create a new Apache configuration file for Pimcore,

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

Add the following configuration to the file and save.

<VirtualHost *:80>

     ServerAdmin webmaster@localhost
     DocumentRoot /var/www/html/pimcore/web
     
     <Directory /var/www/html/pimcore/web>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride All
          Order allow,deny
          allow from all
          Require all granted
     </Directory>

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

</VirtualHost>

Enable the newly created virtual host and other required Apache modules using the following command.

a2ensite pimcore.conf
a2enmod rewrite

Now, restart the Apache service using the following command.

systemctl restart apache2

Step 6: Access Pimcore

Now, access the Pimcore installation using your web browser by navigating to your server's IP address.

http://SERVER_IP_ADDRESS/

Follow the installer and provide the required database details (created in Step 3).

Finally, delete the install folder from Pimcore installation directory once the installation is complete.

rm -r /var/www/html/pimcore/install

Conclusion

In this tutorial, we have shown you how to install Pimcore on Debian Latest. You can now start creating and managing content on your new Pimcore installation!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!