Skip to content

Wie man Craft CMS auf Debian 12 installiert

Cloud Infrastructure Expert
Wie man Craft CMS auf Debian 12 installiert

 

 

Die Installation von Craft CMS auf Ihrem VPS-Server, der auf Debian 12 läuft, ist ein einfacher Prozess. Befolgen Sie die folgenden Schritte, um es einzurichten.

Schritt 1: System aktualisieren

        sudo apt update && sudo apt upgrade -y
    

Schritt 2: Benötigte Abhängigkeiten installieren

Installieren Sie die erforderlichen Pakete wie PHP, MySQL und Composer:

        sudo apt install nginx mysql-server php php-fpm php-mysql php-xml php-mbstring php-curl php-zip php-gd -y
        curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
    

Schritt 3: MySQL-Datenbank einrichten

Loggen Sie sich in MySQL ein, um eine Datenbank und einen Benutzer für Craft CMS zu erstellen:

        sudo mysql -u root -p
    

Führen Sie in der MySQL-Shell die folgenden Befehle aus:

        CREATE DATABASE craft;
        CREATE USER 'craftuser'@'localhost' IDENTIFIED BY 'your_password';
        GRANT ALL PRIVILEGES ON craft.* TO 'craftuser'@'localhost';
        FLUSH PRIVILEGES;
        EXIT;
    

Schritt 4: Craft CMS herunterladen

Wechseln Sie in das Webverzeichnis und laden Sie Craft CMS herunter:

        cd /var/www/html
        composer create-project craftcms/craft craft
    

Schritt 5: Nginx konfigurieren

Erstellen Sie eine neue Konfigurationsdatei für Craft CMS:

        sudo nano /etc/nginx/sites-available/craft
    

Fügen Sie die folgende Konfiguration hinzu:

        server {
            listen 80;
            server_name your_domain.com; # Ändern Sie dies auf Ihre Domain

            root /var/www/html/craft/web;
            index index.php;

            location / {
                try_files $uri $uri/ /index.php?$query_string;
            }

            location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # Passen Sie die PHP-Version bei Bedarf an
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
            }
        }
    

Aktivieren Sie die neue Website und testen Sie die Konfiguration:

        sudo ln -s /etc/nginx/sites-available/craft /etc/nginx/sites-enabled/
        sudo nginx -t
        sudo systemctl reload nginx
    

Schritt 6: Craft CMS-Installation abschließen

Öffnen Sie Ihren Webbrowser und gehen Sie zu http://your_domain.com. Befolgen Sie die Anweisungen auf dem Bildschirm, um die Installation abzuschließen, und geben Sie die Datenbankinformationen ein, wenn Sie dazu aufgefordert werden.

Fazit

Indem Sie diese Schritte befolgen, haben Sie Craft CMS erfolgreich auf Ihrem VPS-Server installiert. Sie können jetzt mit dem Erstellen Ihrer Website beginnen!

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Windows VPS

Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.