Home » PHP » Pimcore » Install Pimcore CMS On Ubuntu With Apache2, MariaDB, PHP

Install Pimcore CMS On Ubuntu With Apache2, MariaDB, PHP

Pimcore

Pimcore combines Product Information Management (PIM), Master Data Management (MDM), Content Management System (CMS) and eCommerce. This open source platform based on the Zend Framework might be very useful for your business. We can install it on ubuntu 16.04 / 17.10 / 18.04.

Step 1: Install Apache2 HTTP Server on Ubuntu

Run the below commands on ubuntu terminal-

sudo apt update
sudo apt install apache2
sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

Step 2: Install MariaDB Database Server

Run the below commands on ubuntu terminal-

sudo apt-get install mariadb-server mariadb-client

Run these on Ubuntu 16.04 LTS

sudo systemctl stop mysql.service
sudo systemctl start mysql.service
sudo systemctl enable mysql.service

Run these on Ubuntu 17.10 and 18.04 LTS

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter

 Set root password? [Y/n]: Y
 New password: Enter password
 Re-enter new password: Repeat password
 Remove anonymous users? [Y/n]: Y
 Disallow root login remotely? [Y/n]: Y
 Remove test database and access to it? [Y/n]:  Y
 Reload privilege tables now? [Y/n]:  Y
 Restart MariaDB server

To test if MariaDB is installed, type the commands below to logon to MariaDB server

sudo mysql -u root -p

Step 3: Install PHP 7.1 and Related Modules

Run the below commands on ubuntu terminal-

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

Then update and upgrade to PHP 7.1

sudo apt update

sudo apt install php7.1 libapache2-mod-php7.1 php7.1-common php7.1-mbstring php7.1-xmlrpc php7.1-soap php7.1-gd php7.1-xml php7.1-intl php7.1-mysql php7.1-cli php7.1-zip

sudo nano /etc/php/7.1/apache2/php.ini

Make the below changes in the file

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

Step 4: Restart Apache2

Run the below commands on ubuntu terminal to restart apache2

sudo systemctl restart apache2.service

Run the localhost URL http://localhost.

Step 5: Create Pimcore Database

Run the below commands-

sudo mysql -u root -p
CREATE DATABASE pimdb;
CREATE USER 'user'@'localhost' IDENTIFIED BY 'new_password';
GRANT ALL ON pimcoredb.* TO 'user'@'localhost' IDENTIFIED BY user_password_here' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Step 6: Download PimCore Latest Release

You can choose a package to install. Otherwise it’s continue with demo part i.e my-project. Run the below command on the terminal-

  1. Skeleton Package (only for experienced Pimcore developers)
    COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton my-project
  2. Basic Demo Package (PHP Templates)
    COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic my-project
  3. Basic Demo Package (Twig Templates)
    COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic-twig my-project
  4. Advanced Demo Package (E-Commerce, PIM, MDM, DAM, …)
    COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-ecommerce my-project

sudo mkdir /var/www/html/my-project
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic-twig my-project

sudo chown -R www-data:www-data /var/www/html/my-project/
sudo chmod -R 755 /var/www/html/my-project/

Step 7: Configure Apache2

Finally, configure Apahce2 site configuration file for Pimcore. Run the below command on the ubuntu terminal-

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

ServerAdmin admin@example.com
DocumentRoot /var/www/html/my-project
ServerName example.com
ServerAlias www.example.com

 <Directory /var/www/html/my-project/web/>
    Options +FollowSymlinks
    AllowOverride All
    Require all granted
 </Directory>

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

Save the file and exit.

Step 8: Enable the Pimcore and Rewrite Module

Run the below commands on ubuntu terminal-

sudo a2ensite pimcore.conf
sudo a2enmod rewrite

Step 9: Restart Apache2

Run the below commands on ubuntu terminal-

sudo systemctl restart apache2.service

Check Also

Pimcore

Top Pimcore 5 Interview Questions And Answers

Top Pimcore 5 Interview Questions And Answers Part 1

One comment

  1. I’ve been browsing online more than 2 hours today, yet I never found any interesting article like
    yours. It is pretty worth enough for me. Personally, if
    all webmasters and bloggers made good content as you did, the
    internet will be much more useful than ever before. bookmarked!!, I like your blog!
    http://starbucks.com

Leave a Reply

Your email address will not be published. Required fields are marked *