Gælder for: LifeinCloud Cloud VPS • Ubuntu 22.04 LTS
Oversigt
LAMP-stakken (Linux, Apache, MySQL, PHP) er det klassiske open source-webhostingmiljø. LifeinCloud tilbyder et 1-klik LAMP-billede, men her er, hvordan du sætter det op manuelt.
Krav
- LifeinCloud VPS med Ubuntu 22.04.
- Root SSH-adgang.
Trin 1 — Opdater systemet
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
Trin 2 — Installer Apache
apt install -y apache2
systemctl enable apache2
systemctl start apache2
Trin 3 — Installer MySQL
apt install -y mysql-server
mysql_secure_installation
Trin 4 — Installer PHP
apt install -y php libapache2-mod-php php-mysql
Trin 5 — Test PHP-behandling
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
Åbn http://YOUR_SERVER_IP/info.php
for at bekræfte, at PHP fungerer.
Tip: Du kan springe alle trin over ved at udrulle LAMP Stack 1-klik-billedet fra LifeinCloud-panelet.