Gjelder for: LifeinCloud Cloud VPS • Ubuntu 22.04 LTS
Oversikt
LAMP-stacken (Linux, Apache, MySQL, PHP) er det klassiske open-source webhotellmiljøet. LifeinCloud tilbyr et 1-klikk LAMP-bilde, men her er hvordan du setter det opp manuelt.
Krav
- LifeinCloud VPS med Ubuntu 22.04.
- Root SSH-tilgang.
Trinn 1 — Oppdater systemet
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
Trinn 2 — Installer Apache
apt install -y apache2
systemctl enable apache2
systemctl start apache2
Trinn 3 — Installer MySQL
apt install -y mysql-server
mysql_secure_installation
Trinn 4 — Installer PHP
apt install -y php libapache2-mod-php php-mysql
Trinn 5 — Test PHP-behandling
echo "<?php phpinfo(); ?>" > /var/www/html/info.php
Åpne http://YOUR_SERVER_IP/info.php
for å bekrefte at PHP fungerer.
Tips: Du kan hoppe over alle trinnene ved å distribuere 1-klikk LAMP Stack-bildet fra LifeinCloud-panelet.