在 Debian 上,LNMP 一般指 Linux + Nginx + MySQL/MariaDB + PHP。重启方式取决于你是用 apt 安装 还是 一键包(如 LNMP.org)。
systemctl restart nginx
systemctl restart mysql # MySQL
# 或
systemctl restart mariadb # MariaDB
systemctl restart php7.4-fpm
查看已安装版本:
ls /etc/php/
systemctl restart nginx mysql php7.4-fpm
如果你用的是 lnmp.org 一键安装包:
lnmp restart
单独重启:
lnmp nginx restart
lnmp mysql restart
lnmp php-fpm restart
systemctl status nginx
systemctl status mysql
systemctl status php7.4-fpm
nginx -t
systemctl enable nginx mysql php7.4-fpm
如果你是 具体某个版本(Debian 11/12) 或 宝塔 / LNMP.org / 自己编译,可以告诉我,我给你更精确命令。