Finally, I managed to install Magento in my local environment of openSUSE. It’s quite tricky to get it up and running. It’s mainly due to filesystem permissions issue, as well as Apache virtual host configuration. I don’t have many experience with Apache, so it took more time to configure the virtual host. Because I prefer LEMP stack, and since a couple of months ago, I use Docker for local development environment instead.
Actually, I have successfully installed it in Fedora as well. But, I delete the installation due to the low disk capacity. The overall steps I did to eventually get Magento served in my localhost are:
- Downloading Magento from its official website, and I had to log in first, I downloaded the latest version (2.3)
- Installing the prerequisites as described in Magento dev docs, I got a little trouble to fulfill the minimum requirements, i.e. PHP version and extensions. openSUSE Tumbleweed has PHP v 7.2 in the main repo, but Magento didn’t support this version, so I used other repo to install v 7.1. But the issue hasn’t stopped, as that repo didn’t have php-mcrypt package. So I had to download the RPM from somewhere (likely rpmfind.net) which had the nearly compatible version.
- Configuring Apache in localhost, where I struggled to get the right configuration
- Extracting the Magento tarball and setting filesystem permissions. Actually this step was the hardest phase, although I had followed the instruction from official Magento website.
- Running the installation step. Since I didn’t get the right configuration of filesystem permissions, so that the front end installer didn’t show up, I used the Magento command line installer module instead. It’s quite tricky as well, actually. But it worked.
- Setting up PHP session directory permission manually. As I put the Magento source files in my home partition, and Apache run as wwwrun user, it cannot access the PHP session directory to write a new session. Actually Magento can make use of other session handler system like memcached and redis, but I didn’t find the corresponding packages in the custom zypper repo I mentioned before.
This is the final result of the installation of Magento in my openSUSE.