50% off alle planer, begrænset periode. Fra kun $2.48/mo
LEMP

LEMP

LEMP er Linux + NGINX + MySQL + PHP. Et alternativ til LAMP med højere gennemstrømning, ideelt til WordPress, Laravel, Symfony og moderne PHP-frameworks. Håndterer 3-4 gange så mange forespørgsler per sekund som LAMP på samme hardware, med et mindre hukommelsesfodaftryk per worker.

Version

Latest

Operating System

Ubuntu Server 24.04 LTS, Ubuntu Server 22.04 LTS

Min. RAM

1 GB

IP Types

IPV4,IPV6

Installed Services

  • Nginx Web Server → /var/www/html
  • MySQL Server (sikret) → Root-legitimationsoplysninger gemt i /root/.cloudzy-creds
  • PHP & udvidelser → Inkluderer php-fpm, php-mysql, php-cli, php-curl, php-mbstring, php-xml, php-zip, php-gd

Vigtige filer og mapper

  • Gemt MySQL root-adgangskode: /root/.cloudzy-creds
  • Nginx web-rodmappe: /var/www/html
  • Nginx konfigurationsfiler: /etc/nginx
  • MySQL konfigurationsfiler: /etc/mysql
  • MySQL databasefiler: /var/lib/mysql
  • Nginx logs: /var/log/nginx
  • MySQL logs: /var/log/mysql
  • PHP-FPM socket: /run/php/php-fpm.sock

Access MySQL

Login as root:

mysql -u root -p

Password is stored in /root/.cloudzy-creds.

Common commands:

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

Access Nginx

Web root: /var/www/html

Configuration test:

sudo nginx -t

Access in browser: http://<SERVER_IP>

Use PHP

Check version:

php -v

Service Management

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}

Mere inden for webhosting

Related apps.

Deploy LEMP nu. From $2.48/mo.