How to install Pimcore on CentOS 7
Do you have a computer powered by CentOS 7 and are not sure how to install Pimcore on it? Well, have no fear because it’s really not a very complicated process at all.
We are here to guide you every step of the way so that you can access this platform as quickly as humanly possible. Naturally, we will make all the instructions extremely simple to make sure everyone understands what needs to be done.
Don’t let the fact that we’re dealing with a Linux distribution here worry you. Just sit down and follow the instructions.
Prerequisites
First things first - before you are able to start installing Pimcore on your CentOS 7, you need to make sure you have everything that’s needed for this procedure. That’s why, before we go through the installation itself, we have to go through all the steps that are necessary before your computer can take on this piece of PHP programming.
Again, nothing to worry about, but do go through this list just to make sure you’re ready.
Update the system
Before anything is done at all, the first thing you need to do is check whether your system is up to date. Just enter the command sudo yum update -y
and wait for a short while if any updates need to be installed.
Once this is all done, you will be ready to move on.
Install LAMP server
LAMP servers are standard servers people use to launch their own website, and their name is actually an acronym for Linux, Apache, MySQL and PHP.
Because of this, installing a LAMP server is not something that is done in one go - you have to install each of the four components individually, or maybe you install only some of them, depending on which features you need for your project.
Additionally, you can add some additional elements on top of the LAMP quartet. So, you get to mix and match depending on the type of website you’re going with. In any case, since you already have the Linux component, we can move on to the others.
Install Apache and MariaDB
You can install Apache to your CentOS 7 with the command sudo yum install httpd.
Once you’ve downloaded it, you will need to activate Apache, and this is done with the sudo systemctl start httpd
command. Just remember that CentOS 7 has a default setting that prevents traffic to Apache, but you can tweak your firewalls and remove this obstacle.
After that, it’s time to turn to MariaDB. Now, this fork of MySQL already comes with your CentOS 7, but you will want to check its version because it’s quite possible that it’s not up to date. Use the command sudo yum install mariadb-server
to install the newest version of MariaDB.
Install PHP
So now you have your L, your A, and your M. The only thing missing is the P part of the equation. And just as is the case with MariaDB, PHP also comes with your CentOS, but once again, it is fairly likely that this is not the latest version.
Therefore, you will probably need to download it yourself, but you also need to have your EPEL repository enabled.
Next, install remirepo - the command is sudo dnf install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm.
Next, enable PHP 8.0 (or whatever is the current version at the time you’re reading this) with sudo dnf module enable php:remi-8.0 -y
, and install it with sudo dnf install php php-cli php-common.
Note that you can add extensions to PHP in order to make it more useful and powerful.
Pimcore installation
Congratulations! Your LAMP setup is complete and you now have everything you need to install Pimcore. Obviously, you first need to download it, which you can do here, which will provide you with a zipped file.
Extract the file to your Apache directory by using the command sudo mkdir /var/www/html/pimcore sudo unzip pimcore-data.zip -d /var/www/html/pimcore/.
However, there will be a choice you have to make, and that concerns your choice of packages.
Select a package to install
Pimcore itself offers two main packages you can choose between - the skeleton package and the demo package. The latter contains many useful blueprints, whereas the former is pretty much empty and meant to be used by people who have a lot of experience working with PHP.
As a side note, though, you can add your own bundles or bundles created by a third party.
Create database
The next step in installing Pimcore is creating a database for it. For this, you will need to configure MariaDB so that it’s perfectly safe to use. This involves setting a root password, removing any anonymous users, removing the test database, and disallowing remote root login.
After all of that is done, connect to your database server and start working on creating a Pimcore database. It goes something like this:
MariaDB [(none)]> CREATE DATABASE pimcore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON pimcore.* TO 'pimcore'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
Launch installer
Finally, everything is now ready to start installing Pimcore. As we said, you download it in a zipped file from the official website, and you should keep your memory limit to at least 512M.
You can initiate the installation process by typing in:
cd ./my-project
./vendor/bin/pimcore-install
but do note that this launches the interactive procedure. It is also possible to keep the whole thing completely automatic.
In any case, once this is done, you will want to take a look at the log the installer writes during the process. It contains all the errors that happened while Pimcore was being installed, and by accessing the log, you can address those issues and remove the bugs that may appear.
Access Pimcore
Once all of this is said and done, you will be rerouted to the admin area. This is where you can enter your username and the password for the first time and finally access Pimcore and everything it has to offer.
The username and password are both set up during the installation process, so all you have to do is type them in again. So, now that you’re all ready, you can learn Pimcore at your own pace or just get to use it to the fullest right away. In any case, good luck!
Additional information and help
Should you encounter any problems during the installation process or need any additional info, you’ll be happy to know that Pimcore’s official website has you covered concerning a huge variety of topics.
You can find everything here, from upgrade notes and system requirements to more advanced issues like a performance guide and cluster setup. In short, you have nothing to worry about.
And that’s it, that’s all you need to know about installing Pimcore on CentOS 7. Don’t let the length of this article fool you, most of it is just making sure you have all the elements you will need to get Pimcore running in the first place.
Once you do that, installing this software really isn’t a problem, and you will quickly be able to use everything it has to offer.