现在网站已经是标配了,企业需要网站,个人也会建站博客。这里就给展示一下在Debian 11系统搭建Nginx/Mariadb/PHP的网站运行环境。这里只是简易配置,确保可以正常使用环境。更多复杂的配置后面再介绍。
1,安装Nginx
apt install nginx -y systemctl enable nginx
2,安装Mariadb
apt install mariadb-server -y mysql_secure_installation systemctl enable mariadb ----- mysql -uroot create database [DBNAME]
3,安装PHP
apt intall php -y apt install -y php7.4-cli php7.4-json php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath php7.4-fpm systemctl enable php7.4-fpm
4,删除Apache2
systemctl stop apache2 systemctl disable apache2 apt autoremove apache2 -y apt autoremove apache2.2-common -y apt --purge remove apache2 -y apt --purge remove apache2.2-common -y