Stos LLMP (Linux, Lighttpd, MariaDB i PHP-FPM) to lekka i wydajna alternatywa dla popularnego stosu LAMP, idealna dla serwerów VPS o ograniczonych zasobach. W tym poradniku poka?emy, jak zainstalowa? i skonfigurowa? LLMP na Ubuntu 22.04.

Wymagania wst?pne

  • Serwer VPS z systemem Ubuntu 22.04
  • Dost?p do konta root lub u?ytkownika z uprawnieniami sudo

Kroki instalacji

1. Aktualizacja systemu

Zaloguj si? na swój serwer VPS i zaktualizuj system:

sudo apt update
sudo apt upgrade -y

2. Instalacja Lighttpd

Zainstaluj serwer WWW Lighttpd:

sudo apt install lighttpd -y

3. Instalacja MariaDB

Zainstaluj serwer baz danych MariaDB:

sudo apt install mariadb-server -y

Zabezpiecz instalacj? MariaDB:

sudo mysql_secure_installation

Post?puj zgodnie z instrukcjami, aby ustawi? has?o roota i inne opcje bezpiecze?stwa.

4. Instalacja PHP-FPM

Zainstaluj PHP-FPM oraz niezb?dne modu?y:

sudo apt install php-fpm php-mysql -y

5. Konfiguracja PHP-FPM dla Lighttpd

Edytuj plik konfiguracyjny PHP-FPM:

sudo nano /etc/php/8.1/fpm/pool.d/www.conf

Zmie? nast?puj?ce linie:

  • [www] na [lighttpd]
  • user = www-data na user = lighttpd
  • group = www-data na group = lighttpd
  • listen = /run/php/php8.1-fpm.sock na listen = /run/php/php8.1-lighttpd-fpm.sock

Zapisz plik i uruchom ponownie PHP-FPM:

sudo systemctl restart php8.1-fpm

6. Konfiguracja Lighttpd

W??cz modu? FastCGI i proxy w Lighttpd:

sudo lighty-enable-mod fastcgi
sudo lighty-enable-mod proxy
sudo systemctl reload lighttpd

Edytuj plik konfiguracyjny Lighttpd:

sudo nano /etc/lighttpd/lighttpd.conf

Dodaj nast?puj?c? konfiguracj? na ko?cu pliku:

server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_proxy" )

fastcgi.server = ( ".php" =>
        ((
                "socket" => "/run/php/php8.1-lighttpd-fpm.sock",
                "bin-path" => "/usr/bin/php-cgi8.1",
                "bin-environment" => (
                        "PHP_FCGI_CHILDREN" => "4",
                        "PHP_FCGI_MAX_REQUESTS" => "10000"
                ),
                "check-local" => "disable",
                "max-procs" => 1,
        ))
)

index-file.names += ( "index.php" )
url.rewrite-if-not-file = (
       "^/(.*)$" => "/index.php/$1"
)

Uruchom ponownie Lighttpd:

sudo systemctl restart lighttpd

7. Testowanie LEMP

Utwórz prosty plik PHP, aby przetestowa?, czy wszystkie komponenty dzia?aj? poprawnie:

sudo nano /var/www/html/index.php

Wklej nast?puj?cy kod do pliku:

<?php
phpinfo();
?>

Zapisz plik i otwórz go w przegl?darce, wpisuj?c adres IP swojego serwera (np. `http://twoj_adres_ip`). Powiniene? zobaczy? stron? z informacjami o konfiguracji PHP.

Podsumowanie

Gratulacje! Uda?o Ci si? zainstalowa? stos LEMP na swoim serwerze VPS z Ubuntu 22.04. Mo?esz teraz rozpocz?? tworzenie i wdra?anie swoich dynamicznych stron internetowych i aplikacji webowych.

Windows VPS

Windows VPS UK

Windows VPS

VPS Windows

Serwer VPS Windows

VPS Windows Deutschland

Windows VPS Hosting

VPS Windows España

Windows VPS Nederland

VPS Windows Italia

VPS Windows Portugal

VPS Windows ??????

VPS Windows ???????

VPS Windows ??

VPS Windows Sverige

VPS Windows Norge

VPS Windows ????

VPS Windows Türkiye

Remote Desktop Services (RDS)

RDS CAL (Client Access License)

Remote Desktop VPS

Keywords: windows vps uk, windows vps, uk windows vps, windows vps hosting uk, vps windows server, uk vps windows, vps windows, servidor vps windows, vps uk windows, vps with windows, virtual private server windows, windows virtual private server, windows vps server uk, vps for windows, servidores vps windows, vps windows uk, windows vps hosting, vps windows hosting, windows vps server, windows virtual private servers, vps on windows, vps windows servers, cheap windows vps uk, windowsvps, windows desktop vps, buy vps windows, windows server vps, windows 10 vps uk, rds services, rds cal, remote desktop services, remote desktop hosting

#windowsvps #vpshosting #ukvps #virtualserver #windowsvpsuk #vpsserver #hostingvps #cloudvps #windowsvpshosting #cheapvps #vpswithwindows #windowsserver #servervps #vpssolutions #vpswindows #rdscal #remotedesktop #remotedesktopvps #rds #windowsrds

vps windows