Gilt für: LifeinCloud Cloud VPS • Ubuntu 22.04 LTS
Übersicht
Der LAMP-Stack (Linux, Apache, MySQL, PHP) ist die klassische Open-Source-Webhosting-Umgebung. LifeinCloud bietet ein 1-Klick-LAMP-Image, aber hier erfahren Sie, wie Sie es manuell einrichten.
Anforderungen
- Ein LifeinCloud VPS mit Ubuntu 22.04.
- Root-SSH-Zugriff.
Schritt 1 — System aktualisieren
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
Schritt 2 — Apache installieren
apt install -y apache2
systemctl enable apache2
systemctl start apache2
Schritt 3 — MySQL installieren
apt install -y mysql-server
mysql_secure_installation
Schritt 4 — PHP installieren
apt install -y php libapache2-mod-php php-mysql
Schritt 5 — PHP-Verarbeitung testen
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
Öffnen Sie http://YOUR_SERVER_IP/info.php
, um zu bestätigen, dass PHP funktioniert.
Tipp: Sie können alle Schritte überspringen, indem Sie das 1-Klick-LAMP-Stack-Image über das LifeinCloud-Panel bereitstellen.