Vai al contenuto principale
50% di sconto tutti i piani, tempo limitato. A partire da $2.48/mo
LEMP

LEMP

LEMP è Linux + NGINX + MySQL + PHP. Un'alternativa ad alta capacità rispetto a LAMP, ideale per WordPress, Laravel, Symfony e i moderni framework PHP. Gestisce da 3 a 4 volte le richieste al secondo di LAMP sullo stesso hardware, con un'occupazione di memoria inferiore per worker.

In breve

9

Visualizzazioni di pagina

Versione Latest OS Ubuntu Server 24.04 LTS, Ubuntu Server 22.04 LTS Min RAM 1 GB IP IPV4,IPV6

Servizi Installati

  • Server Web Nginx → /var/www/html
  • Server MySQL (protetto) → Credenziali root memorizzate in /root/.cloudzy-creds
  • PHP & Estensioni → Include php-fpm, php-mysql, php-cli, php-curl, php-mbstring, php-xml, php-zip, php-gd

File e directory importanti

  • Password root MySQL memorizzata: /root/.cloudzy-creds
  • Directory web root di Nginx: /var/www/html
  • File di configurazione di Nginx: /etc/nginx
  • File di configurazione di MySQL: /etc/mysql
  • File del database di MySQL: /var/lib/mysql
  • Log di Nginx: /var/log/nginx
  • Log di MySQL: /var/log/mysql
  • Socket PHP-FPM: /run/php/php-fpm.sock

Accedi a MySQL

Accedi come root:

mysql -u root -p

La password è archiviata in /root/.cloudzy-creds.

Comandi comuni:

SHOW DATABASES;                                              -- List all databases
USE <database>;                                              -- Switch to a specific database
CREATE DATABASE mydb;                                        -- Create a new database
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'password';  -- Create a new user
GRANT ALL PRIVILEGES ON mydb.* TO 'appuser'@'localhost';     -- Grant privileges
EXIT;                                                        -- Quit MySQL shell

Accedi a Nginx

Radice web: /var/www/html

Test di configurazione:

sudo nginx -t

Accedi nel browser: http://<SERVER_IP>

Usa PHP

Verifica la versione:

php -v

Gestione del servizio

Nginx:

sudo systemctl status nginx    # Check status
sudo systemctl restart nginx   # Restart service

MySQL:

sudo systemctl status mysql     # Check status
sudo systemctl restart mysql    # Restart service

PHP-FPM:

PHP_FPM_VERSION=$(ls /etc/php | grep -E '^[0-9]+.[0-9]+$')
PHP_FPM_SERVICE="php${PHP_FPM_VERSION}-fpm"
systemctl status ${PHP_FPM_SERVICE}
systemctl restart ${PHP_FPM_SERVICE}

Altro in Web Hosting

App correlate.

Distribuisci LEMP ora. Da 2,48 $/mese.