先安装一下这个命令 add-apt-repository apt-get install software-properties-common
添加第三方源: add-apt-repository ppa:ondrej/php apt-get update
安装php: apt-get install php7.4 php7.4-fpm php7.4-mysql php7.4-gd php7.4-mbstring service php7.4-fpm start php -v
nginx的配置文件和原来一样
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/default.access.log main;
error_log /var/log/nginx/default.error.log;
root /var/www/html;
location / {
index index.html index.htm;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param _FILENAME $document_root$fastcgi_ _name;
include fastcgi_params;
}
}继续阅读与本文标签相同的文章
上一篇 :
深度解读风生水起的儿童智能产品市场
下一篇 :
[PHP] CentOS下搭建下PHP的运行环境
-
Android开发中文站
2026-05-25栏目: 教程
-
特斯拉迟迟不交私有化文件,引发公司治理质疑
2026-05-25栏目: 教程
-
响铃:模式跨界、红利均沾,B2B2C要成企业级服务崛起的排头兵?
2026-05-25栏目: 教程
-
泛型快排
2026-05-25栏目: 教程
-
区块链开发公司为企业带来哪些商业机会
2026-05-25栏目: 教程
