Shopware Installation
Dieses Kapitel führt Sie durch die Installation von Shopware 6 mit den spezifischen Anforderungen für das ShopBite Plugin.
Systemvoraussetzungen
Server-Anforderungen
- Webserver: Apache 2.4+ oder Nginx 1.20+
- PHP: 8.4 oder höher
- Datenbank: MySQL 5.7+ oder MariaDB 10.3+
- Speicher: Mindestens 2GB RAM, 4GB empfohlen
- Festplattenplatz: Mindestens 10GB freier Speicher
PHP-Erweiterungen
# Erforderliche PHP-Erweiterungen
php -m | grep -E "(ctype|curl|gd|intl|json|mbstring|openssl|pdo_mysql|tokenizer|xml|zip)"
# Fehlende Erweiterungen installieren (Ubuntu/Debian)
sudo apt-get install php8.4-{ctype,curl,gd,intl,json,mbstring,openssl,pdo_mysql,tokenizer,xml,zip}
Empfohlene Shopware-Version
Das ShopBite Plugin unterstützt Shopware 6.7.0 und höher. Wir empfehlen die Verwendung der aktuellen stabilen Version.
Installationsmethoden
1. Offizielle Shopware-Installation
Folgen Sie der offiziellen Shopware-Dokumentation:
- Installationsassistent: docs.shopware.com/installation
- CLI-Installation:
# Shopware herunterladen wget https://www.shopware.com/download -O shopware.zip unzip shopware.zip cd shopware # Installation starten php bin/console system:install
2. ShopBite-vorkonfiguriertes Repository
Für eine schnelle Einrichtung mit ShopBite-spezifischen Konfigurationen:
# Repository klonen
git clone https://github.com/shopbite-de/shopware.git
cd shopware
# Abhängigkeiten installieren
composer install
# Datenbank einrichten
bin/console system:install \
--db-host=localhost \
--db-user=shopware \
--db-password=securepassword \
--db-name=shopware \
--shop-name="Mein ShopBite Shop" \
--shop-locale=de-DE \
--currency=EUR \
--admin-username=admin \
--admin-password=secureadminpassword \
--admin-email=admin@mein-shop.de
Shopware-Konfiguration für ShopBite
Grundeinstellungen
- Sprache und Währung:
- Sprache: Deutsch (de-DE)
- Währung: Euro (EUR)
- Zeitzone: Europe/Berlin
- Sales Channel einrichten:
- Navigieren Sie zu Einstellungen > Vertriebskanäle
- Erstellen Sie einen neuen Sales Channel für ShopBite
- Wählen Sie Storefront-Typ: "Storefront"
- API-Zugang konfigurieren:
- Navigieren Sie zu Einstellungen > System > Integrationen
- Erstellen Sie eine neue Integration für ShopBite
- Berechtigungen setzen:
order:read,order:write,product:read
Performance-Optimierung
# Cache-Konfiguration
bin/console cache:configure --env=prod
# OPcache aktivieren
php -i | grep opcache
# Shopware-Cache optimieren
bin/console cache:pool:clear
bin/console cache:warmup
Datenbank-Optimierung
-- MySQL-Optimierung
SET GLOBAL innodb_buffer_pool_size = 1024 * 1024 * 1024; -- 1GB
SET GLOBAL innodb_log_file_size = 256 * 1024 * 1024; -- 256MB
SET GLOBAL innodb_flush_log_at_trx_commit = 2;
-- Indizes für ShopBite-Tabellen
ALTER TABLE `shopbite_business_hour` ADD INDEX `idx_sales_channel` (`sales_channel_id`);
ALTER TABLE `shopbite_holiday` ADD INDEX `idx_sales_channel` (`sales_channel_id`);
Shopware-Update
Update-Vorbereitung
# Wartungsmodus aktivieren
bin/console maintenance:enable
# Backup erstellen
mysqldump -u shopware -p shopware > shopware_backup_$(date +%Y-%m-%d).sql
tar -czvf shopware_files_$(date +%Y-%m-%d).tar.gz public/ config/
Update-Durchführung
# Shopware-Update
composer update shopware/core
bin/console system:update:prepare
bin/console system:update:finish
# Datenbank-Migrationen ausführen
bin/console database:migrate
# Cache leeren
bin/console cache:clear
Update-Nachbereitung
# Wartungsmodus deaktivieren
bin/console maintenance:disable
# Plugin-kompatibilität prüfen
bin/console plugin:check-compatibility
# ShopBite-spezifische Migrationen ausführen
bin/console database:migrate --all ShopBite
Häufige Installationsprobleme
Problem: PHP-Version nicht kompatibel
Symptome:
- Fehler: "PHP version 8.4 required"
- Shopware startet nicht
Lösung:
# PHP-Version prüfen
php -v
# PHP 8.4 installieren (Ubuntu/Debian)
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.4
# PHP-Version wechseln
sudo update-alternatives --config php
Problem: Datenbankverbindung fehlgeschlagen
Symptome:
- Fehler: "SQLSTATEHY000 2002 Connection refused"
- Shopware kann keine Datenbankverbindung herstellen
Lösung:
# Datenbankdienst prüfen
sudo systemctl status mysql
# Datenbank neu starten
sudo systemctl restart mysql
# Berechtigungen prüfen
mysql -u root -p
GRANT ALL PRIVILEGES ON shopware.* TO 'shopware'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Problem: Cache-Probleme
Symptome:
- Änderungen werden nicht angezeigt
- Fehler: "Cache directory not writable"
Lösung:
# Cache-Berechtigungen setzen
sudo chmod -R 777 var/cache
sudo chown -R www-data:www-data var/
# Cache leeren
bin/console cache:clear --no-warmup
bin/console cache:warmup
Nächste Schritte
- Plugin Installation - ShopBite Plugin installieren
- Plugin Konfiguration - Plugin einrichten
- Shopware Dokumentation - Offizielle Shopware-Dokumentation