In this post, I will show you how to install Shopware CE on Debian 9. Starting from a base system installed that does not have the LAMP server installed. So it will be a detailed guide until the installation is a success.
Shopware is a business-oriented application. With it you will be able to deploy an e-commerce platform professionally and above all quickly. It is used by many of the best known brands in the world. However, it is not entirely free, but has a community version that we can use for our small business or just to test.
In the same sense, Shopware is a web application, so having a LAMP server installed is an indispensable requirement.
So let’s install Shopware CE on Debian 9.
Install Shopware CE on Debian – LAMP
1.- Install Apache and PHP
The first step is to install Apache and PHP. With them, we will have the most basic to be able to execute the application correctly.
So open a terminal or connect to your server. Then, start the installation with Apache.
:~$ su :~# apt install apache2
Then, open your web browser en go to http://Your-server/. You will see this.
Now, install PHP from the Debian repository.
:~# apt install php7.0 php7.0-cli php7.0-common php7.0-mysql php7.0-curl php7.0-json php7.0-zip php7.0-gd php7.0-xml php7.0-mbstring php7.0-opcache
Then make sure that PHP is being interpreted correctly. Create a file in /var/www/html/
called test.php
and add the following:
:~# nano /var/www/html/test.php <?php phpinfo(); ?>
Next, restart the Apache service.
:~# systemctl restart apache2
After that, open it using the web browser. You will see this.
So, Apache and PHP are working properly.
2) Install and configure MariaDB
We already have the basics done, but Shopware also requires a database manager. In this case, I will use MariaDB for this tutorial. It is free, MySQL compatible and easy to install.
:~# apt install mariadb-server
Then, set a root password using the mysql_secure_installation
script.
:~# mysql_secure_installation
Then, you will be asked the following configuration questions. You can answer as you like, but it is advisable to read them well and make the decisions that best suit you.
Remove anonymous users?: Y Disallow root login remotely?: N Remove test database and access to it?: Y Reload privilege tables now? : Y
Now it is necessary to create a database dedicated to Shopware. In addition to a new MariaDB user. so type the following commands:
:~# mysql -u root -p CREATE DATABASE shopwaredb; GRANT ALL PRIVILEGES ON shopwaredb.* TO 'shopwareuser'@'localhost' IDENTIFIED BY 'shoppss'; FLUSH PRIVILEGES; exit;
So, you can install Shopware.
3) Install Shopware CE on Debian 9
Now, we can download Shopware and install it.
:~# cd /tmp/ :~# wget https://releases.shopware.com/install_5.5.7_f785facc70e39f2ca4292e78739457417f19fbcf.zip?_ga=2.110917381.1678735926.1552879434-1860898197.1552787146 -O shopware.zip
Next, unzip the file.
:~# mkdir shopware :~# cd shopware/ :~# unzip ../shopware.zip
Note: In case you do not have unzip installed, you can do it using apt install unzip.
Next, move the folder to the Apache folder and set the permissions.
:~# cd .. :~# mv shopware/ /var/www/html/ :~# chown -R www-data:www-data /var/www/html/shopware/ :~# chmod -R 775 /var/www/html/shopware
Now it is necessary to make a new virtualhost for shopware.
:~# nano /etc/apache2/sites-available/shopware.conf
And add the following:
<VirtualHost *:80> DocumentRoot /var/www/html/shopware ServerName your-domain.com <Directory /var/www/html/shopware/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/shopware_error.log CustomLog ${APACHE_LOG_DIR}/shopware_access.log combined </VirtualHost>
Save the changes and close the file.
After that, enable the new site, the rewrite module and restart Apache.
:~# a2ensite shopware.conf :~# a2enmod rewrite :~# systemctl reload apache2
Now we can complete the installation
Complete the installation
Now, go to your web browser and access your server http://your-server.
Next, the installer will check for the requisites.
After that, accept the Terms of service.
After that, configure the databases. Type the parameters of the database.
Then, start the installation.
Then, choose the license. In this case, it is the Community Edition.
After that, set the shop settings.
After that, you will see the following:
So, you can log in now.
So, enjoy it.
Conclusion
Shopware is a professional tool for companies looking to set up their e-commerce platform. That way, you can improve your revenue so it’s a very useful application.
Tell us, do you like Shopware? Have you used it? in your business use it? please share this post with your friends.