This tutorial will guide you through the process of installing Magento Open Source on the latest version of openSUSE using the source code from GitHub.
Before proceeding with the installation, make sure that your system meets the following requirements:
To begin, we need to install Apache, MySQL/MariaDB, and PHP along with the required extensions. Open the terminal and enter the following command:
sudo zypper install apache2 mariadb php7 php7-mysqlnd php7-mbstring php7-intl php7-xsl php7-zip php7-gd php7-curl php7-json php7-ctype php7-iconv php7-bcmath
After the installation, start the Apache and MySQL/MariaDB services, and enable them to start at boot time:
sudo systemctl start apache2
sudo systemctl start mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb
Next, we need to download and extract the Magento source code from GitHub. Change to the webserver root directory and run the following commands:
cd /srv/www/htdocs/
sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo git clone https://github.com/magento/magento2.git
cd magento2
Now, we need to install the dependencies using Composer:
sudo composer install
Before we can proceed with the installation, we need to create a database and user for Magento. Open the MySQL/MariaDB command-line client:
sudo mysql -u root -p
Enter your MySQL/MariaDB root password and create the database and user:
CREATE DATABASE magento2;
CREATE USER 'magento2'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON magento2.* TO 'magento2'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Now we are ready to start the Magento installation process. Open your web browser and navigate to http://localhost/magento2/ or your webserver IP address if you are installing remotely.
After the installation is complete, you need to do the following:
sudo chown -R wwwrun:www /srv/www/htdocs/magento2/
sudo php /srv/www/htdocs/magento2/bin/magento cache:disable
/etc/apache2/httpd.conf
file:<Directory "/srv/www/htdocs/magento2">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
sudo systemctl restart apache2
Congratulations! You have successfully installed Magento Open Source on your openSUSE system. You can now access your Magento store by navigating to http://localhost/magento2/
in your web browser.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!