Debian LAMP更新与升级流程
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove -y && sudo apt clean
sudo apt update && sudo apt install --only-upgrade apache2 -y
sudo systemctl restart apache2 # 重启服务使更改生效
sudo apt update && sudo apt install --only-upgrade mysql-server -y
sudo apt update && sudo apt install --only-upgrade mariadb-server -y
sudo systemctl restart mysql # 或 sudo systemctl restart mariadb
sudo apt update && sudo apt install --only-upgrade php* -y
sudo apt update && sudo apt install --only-upgrade php7.4* -y
sudo systemctl restart apache2
sudo systemctl restart php7.4-fpm # 根据实际PHP版本调整
sudo systemctl status apache2
sudo systemctl status mysql # 或 sudo systemctl status mariadb
sudo systemctl status php7.4-fpm # 根据实际版本调整
apache2 -v # 查看Apache版本
mysql --version # 查看MySQL版本
php -v # 查看PHP版本
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
重启apt服务使配置生效:sudo systemctl restart apt