DEV Community

Sick Sadist
Sick Sadist

Posted on • Edited on

4 4

How to install pimcore community edition in ubuntu?

How to install PIMCORE in Ubuntu 20.04

I will try to keep the process as minimal as possible. So, I will avoid some configuration that is not mandatory but recommended to use Pimcore for production environment.

Check for requirements
Make sure you have the following extensions installed.
(mysql, iconv, dom, xml, gd, exif, mbstring, zlib, zip, intl, opcache, curl)

sudo apt update
sudo apt install php-mysql php-iconv php-dom php-xml php-gd php-exif php-mbstring php-zlib php-zip php-intl php-opcache php-curl -y
Enter fullscreen mode Exit fullscreen mode

(You can check for the all the installed extension using following command.

php -m

  1. Make sure you have database installed on your system.
sudo apt install mariadb-server
Enter fullscreen mode Exit fullscreen mode
  1. Change the directory where you want your pimcore installation to be located. For example:
cd /your/project
Enter fullscreen mode Exit fullscreen mode
  1. Make sure you have composer installed and available from your path.
wget -O composer-setup.php https://getcomposer.org/installer && sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Enter fullscreen mode Exit fullscreen mode
  1. Creating our first pimcore project using composer.
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo your_project_name_here
Enter fullscreen mode Exit fullscreen mode
  1. Setting up database(MySQL)
  • Creating database and a new user credentials
sudo chown mysql:mysql -R /var/lib/mysql
Enter fullscreen mode Exit fullscreen mode

(This command changes the ownership of /var/lib/mysql directory recursively to mysql.
)

sudo systemctl restart mysql
sudo mysql -u root -p
mysql> CREATE DATABASE yourdbname CHARSET=utf8mb4;
mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL ON yourdbname.* TO 'username'@'localhost';
Enter fullscreen mode Exit fullscreen mode

Installation of pimcore:
(Make sure you are inside the project's directory)
Run the following command:
You should try one of the two (interactive or non-interactive) based on your preferences.

@Interactive
./vendor/bin/pimcore-install
(An interactive prompt will be generated where you need to provide credentials used by pimcore)
Enter fullscreen mode Exit fullscreen mode
@NonInteractive
./vendor/bin/pimcore-install --admin-username adminuser --admin-password adminpass --mysql-username username --mysql-password password --mysql-database yourdbname --no-interaction
Enter fullscreen mode Exit fullscreen mode
_Check whether pimcore is working_
Change the directory to project's root.
Enter fullscreen mode Exit fullscreen mode

symfony serve:start
symfony open:local



**ALTERNATIVE**

For those who have not installed symfony cli.
1. `php -S localhost:8000`
2. Open _localhost:8000_ in your favorite browser. 

**-----END-----**
If everything goes right, you will see a webpage being displayed.

To access dashboard, login to _localhost:8000/admin_ with  admin credentials created during pimcore-install.



Enter fullscreen mode Exit fullscreen mode

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay