fix: replace mysql-server with mariadb-server for Debian 12/13 compatibility
- Use mariadb-server instead of mysql-server (works on both Ubuntu and Debian) - Update mysql_service to mariadb for proper service management - Update docker/Dockerfile and start-services.sh for MariaDB
This commit is contained in:
@@ -50,8 +50,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Web server
|
# Web server
|
||||||
nginx \
|
nginx \
|
||||||
# Database
|
# Database
|
||||||
mysql-server \
|
mariadb-server \
|
||||||
mysql-client \
|
mariadb-client \
|
||||||
# PHP and extensions
|
# PHP and extensions
|
||||||
php8.4 \
|
php8.4 \
|
||||||
php8.4-fpm \
|
php8.4-fpm \
|
||||||
@@ -84,7 +84,7 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/
|
|||||||
# Configure systemd
|
# Configure systemd
|
||||||
RUN systemctl enable ssh \
|
RUN systemctl enable ssh \
|
||||||
&& systemctl enable nginx \
|
&& systemctl enable nginx \
|
||||||
&& systemctl enable mysql \
|
&& systemctl enable mysql mariadb \
|
||||||
&& systemctl enable php8.4-fpm
|
&& systemctl enable php8.4-fpm
|
||||||
|
|
||||||
# Create web directory structure
|
# Create web directory structure
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Services für LEMP-Stack starten
|
# Services für LEMP-Stack starten
|
||||||
|
|
||||||
# MySQL starten
|
# MySQL/MariaDB starten
|
||||||
service mysql start
|
service mysql start || service mariadb start
|
||||||
|
|
||||||
# PHP-FPM starten
|
# PHP-FPM starten
|
||||||
service php8.4-fpm start
|
service php8.4-fpm start
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Package names for Ubuntu/Debian systems
|
# Package names for Ubuntu/Debian systems
|
||||||
packages:
|
packages:
|
||||||
- nginx
|
- nginx
|
||||||
- mysql-server
|
- mariadb-server
|
||||||
- php8.4-fpm
|
- php8.4-fpm
|
||||||
- php8.4-mysql
|
- php8.4-mysql
|
||||||
- php8.4-curl
|
- php8.4-curl
|
||||||
@@ -19,7 +19,7 @@ packages:
|
|||||||
- fail2ban
|
- fail2ban
|
||||||
|
|
||||||
# Service names
|
# Service names
|
||||||
mysql_service: mysql
|
mysql_service: mariadb
|
||||||
nginx_service: nginx
|
nginx_service: nginx
|
||||||
php_fpm_service: php8.4-fpm
|
php_fpm_service: php8.4-fpm
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user