kylin v10 php源码安装后配置nginx

银河麒麟V10 源码编译安装php7.4

下载地址 https://www.php.net/distributions/php-7.4.33.tar.xz

安装依赖包,准备编译

bash 复制代码
dnf install libxml2-devel sqlite-devel bzip2-devel libcurl-devel libjpeg-turbo-devel freetype-devel openldap-devel libtool-devel pcre2-devel nettle-devel libzip gmp-devel oniguruma-devel readline-devel net-snmp-devel libxslt-devel libssh2-devel libevent-devel python3-mysqlclient
tar xf php-7.4.33.tar.xz
cd php-7.4.33
./configure --prefix=/usr --with-curl --with-freetype --enable-gd --with-jpeg --with-gettext --with-gmp --with-mysqli --with-openssl --with-pdo-mysql --with-xmlrpc --with-xsl --with-mhash --enable-fpm --enable-bcmath --enable-mbstring --enable-sockets --enable-xml --enable-embed --enable-phpdbg --with-ldap --with-snmp --with-bz2 --enable-calendar --with-curl --enable-exif --enable-ftp --enable-pcntl --with-zlib --with-readline --enable-shmop --enable-sockets
ln -s /usr/lib64/libldap.so /usr/lib
ln -s /usr/lib64/liblber.so /usr/lib
make && make install

安装完php修改nginx配置

解开注释,将/scripts改为$document_root

bash 复制代码
fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name
bash 复制代码
location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

上面配置不做修改就会报 File not found.

通过查看nginx报错日志发现包含这样的错误FastCGI sent in stderr: "Primary script unknown"

相关推荐
damoluomu4 小时前
国产企业级 PHP CMS:哪些能免费商用
php
郑州光合科技余经理7 小时前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
MyFreeIT7 小时前
Android PHP Manual
php
Lsetea10 小时前
Nginx报No required SSL certificate was sent:mTLS客户端证书排查
运维·nginx·https·ssl·openssl
aixingpan12 小时前
aixingpan.cn API开发文档:api_docs_trichart_natal_progression_sec_transit2接口指南
前端·php
sbjdhjd17 小时前
从日志包含到临时文件竞争:文件包含进阶复盘中的 Docker、Windows 与 Session 限制
网络·安全·web安全·网络安全·数据挖掘·php·rce
daxiangxm17 小时前
【趣味休息】“围住小猫在线玩”-“困住小猫”,又回来了
数据结构·人工智能·vscode·github·php
星光开发者18 小时前
基于Spring Boot的充电桩管理系统的设计与实现-计算机毕设【课程设计】57105
vue.js·spring boot·vscode·mysql·django·php·express
szephyr1 天前
HTTPS 证书申请与自动续期:acme.sh + Let‘s Encrypt 完整记录
nginx·https·acme.sh·证书续期
辛迪聊物业数字化1 天前
智慧物业管理平台架构实践:从SaaS物业云到商管系统的全模块落地
大数据·微服务·php