Anleitung - Installation Ubuntu 20.04 VPS - Shopware 6 - Apache2

Hallo Forum,

nach welcher Anleitung sollte ich 2022 Shopware 6 auf einem VPS Server installieren?
Mein Apache2 Server ist erreichbar.

Das System:

Shopware 6 - requirements

https : / /docs.shopware.com/en/shopware-6-en/first-steps/system-requirements

My system

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION=„Ubuntu 20.04.4 LTS

sudo apache2 -v
Server version: Apache/2.4.41 (Ubuntu)

sudo php -v
PHP 8.0.16 (cli) (built: Feb 21 2022 14:42:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.16, Copyright (c) Zend Technologies
with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies

sudo mariadb -v
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.7.3-MariaDB-1:10.7.3+maria~focal mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Die zuvor verlinkte Anleitung funktioniert nicht.

VG
sven-sw

Wie genau muss die

nano /etc/apache2/sites-available/000-default.conf

aussehen?

Hi,

ganz ehrlich ? Wenn Du davon keine Ahnung hast solltest Du keinen eigenen Server betreiben und Dir Managed Services suchen. Andernfalls kann das übel enden. Stichwort DSGVO.

Viele Grüße

Hallo Forum.

die Antwort von @SCOOPEX hat der Problemlösung nichts beigetragen.

Jetzt gibt es mit einem Internetbrowseraufruf folgenden Hinweis:

Fatal error : Uncaught LogicException: Extension DOM is required. in /var/www/html/vendor/symfony/config/Util/XmlUtils.php:50 Stack trace: #0 /var/www/html/vendor/symfony/config/Util/XmlUtils.php(146): Symfony\Component\Config\Util\XmlUtils::parse() #1 /var/www/html/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(405): Symfony\Component\Config\Util\XmlUtils::loadFile() #2 /var/www/html/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(50): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM() #3 /var/www/html/vendor/shopware/core/Framework/Framework.php(59): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load() #4 /var/www/html/vendor/symfony/http-kernel/Kernel.php(678): Shopware\Core\Framework\Framework->build() #5 /var/www/html/vendor/symfony/http-kernel/Kernel.php(649): Symfony\Component\HttpKernel\Kernel->prepareContainer() #6 /var/www/html/vendor/symfony/http-kernel/Kernel.php(547): Symfony\Component\HttpKernel\Kernel->buildContainer() #7 /var/www/html/vendor/shopware/core/Kernel.php(194): Symfony\Component\HttpKernel\Kernel->initializeContainer() #8 /var/www/html/vendor/shopware/recovery/Install/src/app.php(45): Shopware\Core\Kernel->boot() #9 /var/www/html/vendor/shopware/recovery/Install/index.php(74): getApplication() #10 /var/www/html/public/recovery/install/index.php(6): require_once(’…’) #11 {main} thrown in /var/www/html/vendor/symfony/config/Util/XmlUtils.php on line 50

Ist PHP 8.0.16 und MariaDB-1:10.7.3 mit Shopware 6.4.8.1 compatibel?

Meine /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Wo finde ich eine funktionierende Anleitung, wie löse ich das Problem?

VG
sven-sw

Aus 2019

@serpent_driver
Hast Du konkreter Lösungsansätze für mich?
Nach welcher Anleitung sollte ich vorgehen?

Hallo,

siehe Fehlermeldung: Fatal error : Uncaught LogicException: Extension DOM is required

Dir fehlt die PHP DOM Extension:
PHP: Einführung - Manual

Viele Grüße

sudo apt show php8.0-xml
Package: php8.0-xml
Version: 8.0.16-1+ubuntu20.04.1+deb.sury.org+1
Priority: optional
Section: php
Source: php8.0

Installation:

sudo apt install php8.0-xml
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  php8.0-xml
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 91.1 kB of archives.
After this operation, 407 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main arm64 php8.0-xml arm64 8.0.16-1+ubuntu20.04.1+deb.sury.org+1 [91.1 kB]
Fetched 91.1 kB in 0s (4727 kB/s)  
Selecting previously unselected package php8.0-xml.
(Reading database ... 113817 files and directories currently installed.)
Preparing to unpack .../php8.0-xml_8.0.16-1+ubuntu20.04.1+deb.sury.org+1_arm64.deb ...
Unpacking php8.0-xml (8.0.16-1+ubuntu20.04.1+deb.sury.org+1) ...
Setting up php8.0-xml (8.0.16-1+ubuntu20.04.1+deb.sury.org+1) ...

/etc/apache2/sites-available/000-default.conf

cat /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noe

Das Modul ist vermutlich noch nicht für Apache aktiviert, sondern nur für die Shell (CLI)

Siehe

Nochmals von vor, Versuch einer sauberen Installation

Ubuntu 20.04, Apache2, PHP8.0, MariaDB 10.7, Shopware 6.4.8.1

Die verwendeten Anleitungen:

Apache2 Server

http:// IP-Adresse

Die Apache2 Testseite ist aufrufbar.

Hinweis: The default Ubuntu document root is /var/www/html
Das muss für Shopware 6.4.8.1 später auf /var/www/html/public angepasst werden.

PHP 8.0

sudo apt install php8.0 php8.0-common php8.0-mysql php8.0-xml php8.0-xmlrpc php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip php8.0-redis php8.0-intl
sudo update-alternatives --config php
There are 2 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php8.1   81        auto mode
* 1            /usr/bin/php8.0   80        manual mode
  2            /usr/bin/php8.1   81        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

sudo a2enmod php8.0
Considering dependency mpm_prefork for php8.0:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.0:
Module php8.0 already enabled
# PHP 8.0
sudo update-alternatives --set php /usr/bin/php8.0
sudo update-alternatives --set phar /usr/bin/phar8.0
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0

Abschlusscheck

php -v
PHP 8.0.16 (cli) (built: Feb 21 2022 14:42:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies

MariaDB 10.7

Vorarbeit gemäß Anleitung dann

sudo apt install mariadb-server mariadb-client

sudo mariadb -v
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.7.3-MariaDB-1:10.7.3+maria~focal mariadb.org binary distribution

Shopware 6.4.8.1

https:// docs.shopware.com/de/shopware-6-de/tutorials-and-faq/virtual-box-setup

hier soll mehr kommen

Edit 16.03.2022: wobei ich heute wieder unsicher bin ob ich nicht auf Shopware 6.4.9 setzen sollte. Für alte Versionen interessiert sich gewöhnlich niemand.

Welchen Bedingung muss ein Ubuntu 20.04 erfüllen um Shopware 6.4.9.0 installieren zu können?

D. h. bevor ich irgendwie Berührung mit Shopware 6 hatte.
Eine default Apache Server für verschiedene Web-PHP Anwendungen.

So wie es mit z. B. 1blu Shared Hosting (nicht zu empfehlen, da funktiniert nichts) den ich anmieten kann.

Wäre dieser abgestimmte Server ein gute Basis?

MfG
sven-sw

Ergebnis:
Die Anleitung funktioniert einwanfrei mit meine Subdomain, Schritt 7 habe ich nicht durchgeführt. weil ich noch unsicher bin bezüglich des Shopware 6 Realeases.

MariaDB 10.7 wurde von mir installiert (Anleitung LinuxCapable – 17 Nov 21)

sudo mariadb -v
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.7.3-MariaDB-1:10.7.3+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.