centos 下 php7.4 安装
安装过程参考 https://www.cnblogs.com/liubaoqing/p/12176017.html
新的配置选项,有些是默认包含,有些已经更改表述方式
记录PHP7.4安装gd库的报错error: --with-freetype-dir --with-jpeg-dir
https://blog.csdn.net/weixin_43272072/article/details/107390871
从 PHP 7.3.x 移植到 PHP 7.4.x(例如 gd 的相关改变)
https://www.php.net/manual/zh/migration74.other-changes.php
核心配置选项说明
https://www.php.net/manual/zh/configure.about.php
扩展选项需要逐个查看文档查找是否需要配置,怎么配置
./configure
--prefix=/abc/server/php7422
--with-config-file-path=/abc/server/php7422/etc
--with-config-file-scan-dir=/abc/server/php7422/etc/php.d
--enable-fpm
--with-fpm-user=www
--with-fpm-group=www
--enable-sockets
--enable-soap
--with-xmlrpc
--enable-opcache
--enable-pcntl
--enable-bcmath
--enable-mbstring
--with-gettext
--enable-mysqlnd
--with-mysqli
--with-pdo-mysql
--enable-gd
--with-freetype
--with-jpeg
--with-webp=/usr/include/webp
--with-curl
--with-openssl=/usr/local/ssl
--with-mhash
--with-zlib
--with-zip
--with-bz2
--with-pear
--with-xsl
CentOS 7编译安装PHP 7.4提示No package 'libzip' found或者(libzip >= 0.11)
https://www.jianshu.com/p/d01665bfa4eb https://www.jeeinn.com/2020/06/1319/ 另一种解决方法,没尝试
注意安装版本,当前版本 1.8 需要 更多依赖。此处选择一个低版本
wget https://libzip.org/download/libzip-1.2.0.tar.gz tar -zxvf libzip-1.2.0.tar.gz cd libzip-1.2.0 ./configure make && make install
安装后,可能还是无法找到
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'pdo_mysql' in Unknown on line 0
https://blog.csdn.net/tornge/article/details/51388233
php7 ,pdo都是默认安装的
资料原来是php.ini中关于mysql的socket路径的问题
根据 /etc/my.cnf
1 | datadir = /data/vdb1/mysql |
修改 php.ini
pdo_mysql.default_socket=/data/vdb1/mysql/mysql.sock
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现