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
(You can check for the all the installed extension using following command.
php -m
- Make sure you have database installed on your system.
sudo apt install mariadb-server
- Change the directory where you want your pimcore installation to be located. For example:
cd /your/project
- 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
- Creating our first pimcore project using composer.
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo your_project_name_here
- Setting up database(MySQL)
- Creating database and a new user credentials
sudo chown mysql:mysql -R /var/lib/mysql
(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';
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)
@NonInteractive
./vendor/bin/pimcore-install --admin-username adminuser --admin-password adminpass --mysql-username username --mysql-password password --mysql-database yourdbname --no-interaction
_Check whether pimcore is working_
Change the directory to project's root.
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.
Top comments (0)