银河麒麟server v10sp1编译安装php8.1.6
1. 官方
cd ../php-NN./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-pdo-mysqlmakemake install
2. 说明
3. 实际环境
tar -zxvf php-8.1.6.tar.gz
cd php-8.1.6
./configure --with-apxs2=/usr/bin/apxs --with-pdo-mysql
./configure --with-apxs2=/usr/bin/apxs \--prefix=/usr/local/php8 \--with-config-file-path=/usr/local/php8 \--with-config-file-scan-dir=/usr/local/php8/php.d \--enable-mysqlnd \--with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--enable-fpm \--with-fpm-user=apache \--with-fpm-group=apache \--with-gd \--with-iconv \--with-zlib \--enable-xml \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--enable-mbregex \--enable-mbstring \--enable-ftp \--with-openssl \--enable-pcntl \--enable-sockets \--with-xmlrpc \--with-zip \--enable-soap \--without-pear \--with-gettext \--enable-session \--with-curl \--with-jpeg=/usr/lib64 \--with-freetype=/usr/lib64 \--enable-opcache
如果按照上面编译安装,则会报警示,参数需要再核对:
configure: WARNING: unrecognized options: --with-gd, --enable-inline-optimization, --with-xmlrpc
3.1. 配置php
cp /usr/local/src/php-8.1.6/php.ini-production /usr/local/php8/
[root@zabbix php8]# php -vPHP 8.1.6 (cli) (built: May 24 2022 13:47:06) (ZTS)Copyright (c) The PHP GroupZend Engine v4.1.6, Copyright (c) Zend Technologies
[root@zabbix php8]# php --iniConfiguration File (php.ini) Path: /usr/local/php8Loaded Configuration File: /usr/local/php8/php.iniScan for additional .ini files in: /usr/local/php8/php.dAdditional .ini files parsed: (none)
[root@zabbix bin]# ./php -m[PHP Modules]CorectypecurldatedomfileinfofilterftpgettexthashiconvjsonlibxmlmbstringmysqlimysqlndopensslpcntlpcrePDOpdo_mysqlpdo_sqlitePharposixReflectionsessionshmopSimpleXMLsoapsocketsSPLsqlite3standardsysvsemtokenizerxmlxmlreaderxmlwriterzlib[Zend Modules]
3.2. 修改php-fpm配置
cd /usr/local/php8/etc
cp php-fpm.conf.default php-fpm.conf
cd /usr/local/php8/etc/php-fpm.d
cp www.conf.default www.conf
启动php-fpm
php-fpm
3.3. Apache2与php的连接
LoadModule php_module /usr/lib64/httpd/modules/libphp.so
AddType application/x-httpd-php .php
3.4. php与数据库的连接
4. 过程中遇到的报错
4.1. 报错一
checking for sqlite3 >= 3.7.7... noconfigure: error: Package requirements (sqlite3 >= 3.7.7) were not met:Package 'sqlite3', required by 'virtual:world', not foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables SQLITE_CFLAGSand SQLITE_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.
yum install sqlite-devel
4.2. 错误二
checking for oniguruma... noconfigure: error: Package requirements (oniguruma) were not met:Package 'oniguruma', required by 'virtual:world', not foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables ONIG_CFLAGSand ONIG_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.
yum install oniguruma-devel
4.3. 错误三
[Tue May 24 14:19:09.751641 2022] [php:error] [pid 600084:tid 281470394495008] [client 10.46.18.50:32309] PHP Fatal error: Uncaught Error: Call to undefined function bccomp() in /var/www/html/zabbix/include/db.inc.php:816\nStack trace:\n#0 /var/www/html/zabbix/include/db.inc.php(715): dbQuoteInt()\n#1 [internal function]: {closure}()\n#2 /var/www/html/zabbix/include/db.inc.php(716): array_map()\n#3 /var/www/html/zabbix/include/classes/db/DB.php(1315): dbConditionInt()\n#4 /var/www/html/zabbix/include/classes/db/DB.php(1189): DB::dbFilter()\n#5 /var/www/html/zabbix/include/classes/db/DB.php(1099): DB::applyQueryFilterOptions()\n#6 /var/www/html/zabbix/include/classes/db/DB.php(1013): DB::createSelectQueryParts()\n#7 /var/www/html/zabbix/include/classes/db/DB.php(1029): DB::makeSql()\n#8 /var/www/html/zabbix/include/classes/api/services/CUser.php(1688): DB::select()\n#9 /var/www/html/zabbix/include/classes/api/clients/CLocalApiClient.php(121): CUser->checkAuthentication()\n#10 /var/www/html/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod()\n#11 /var/www/html/zabbix/include/classes/api/wrappers/CApiWrapper.php(94): CFrontendApiWrapper->callClientMethod()\n#12 /var/www/html/zabbix/include/classes/api/wrappers/CFrontendApiWrapper.php(63): CApiWrapper->callMethod()\n#13 /var/www/html/zabbix/include/classes/api/wrappers/CApiWrapper.php(82): CFrontendApiWrapper->callMethod()\n#14 /var/www/html/zabbix/include/classes/user/CWebUser.php(99): CApiWrapper->__call()\n#15 /var/www/html/zabbix/include/classes/core/ZBase.php(464): CWebUser::checkAuthentication()\n#16 /var/www/html/zabbix/include/classes/core/ZBase.php(187): ZBase->authenticateUser()\n#17 /var/www/html/zabbix/include/config.inc.php(25): ZBase->run()\n#18 /var/www/html/zabbix/index.php(24): require_once('...')\n#19 {main}\n thrown in /var/www/html/zabbix/include/db.inc.php on line 816
/usr/local/src/php-8.1.6/ext/bcmath
/usr/local/php8/bin/phpize
[root@zabbix bcmath]# /usr/local/php8/bin/phpizeConfiguring for:PHP Api Version: 20210902Zend Module Api No: 20210902Zend Extension Api No: 420210902Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.
yum install autoconf
./configure --with-php-config=/usr/local/php8/bin/php-config
make && make install
vim /usr/local/php8/php.ini
#添加一行
extension=bcmath
4.5. 错误四
Return type of CCookieSession::open($save_path, $session_name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]
4.6. 错误五
configure: error: Cannot find ldap libraries in /usr/lib.
cp -frp /usr/lib64/libldap* /usr/lib/
4.7. 错误六
- PHP gd JPEG 图片格式不支持- PHP gd FreeType不支持
/usr/local/php8/bin/phpize./configure --with-php-config=/usr/local/php8/bin/php-config --with-jpeg --with-freetype
checking for libjpeg... noconfigure: error: Package requirements (libjpeg) were not met:Package 'libjpeg', required by 'virtual:world', not foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables JPEG_CFLAGSand JPEG_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.
yum install libjpeg-devel freetype-devel
银河麒麟server v10sp1编译安装php8.1.6相关推荐
- 2022-02-03--银河麒麟-银河麒麟v4与.netcore安装
title categories tags abbrlink date updated 银河麒麟v4与.netcore安装 Linux 银河麒麟 .net core 1904 2022-02-03 1 ...
- 银河麒麟v4.0.2安装
银河麒麟v4.0.2安装 一.下载银河麒麟系统 二.制作USB的启动镜像 三.安装银河麒麟系统 1.设置要被安装的机器bios启动模式为USB启动后,选择第一项:图形安装银河麒麟服务器操作系统 2.设 ...
- 【银河麒麟V10 SP2 x86安装mysql8.0.29】
目录 前言 一.Mysql是什么? 二.在线安装步骤 1.下载Mysql8.0.29源 2.安装源文件 3.安装Mysql-8.0.29 4.启动Mysql 5.查看默认密码 6.初始化 前言 在关系 ...
- 快速部署银河麒麟v10 SP1并安装dm8
目录 一.安装银河麒麟v10 SP1 二.下载DM8 三.参数配置 四.安装达梦数据库 方法一.图形化安装 方法二.命令行安装 一.安装银河麒麟v10 SP1 选择安装银河麒麟操作系统. 选择语言中 ...
- 银河麒麟系统Arm64 编译Gdal
银河麒麟系统Arm64 编译Gdal GDAL 官网下载版本:我这边下载的是2.4.2 Download - GDAL documentation 拷贝到麒麟用户目录下:并解压 打开命令行:输入 ma ...
- 银河麒麟操作系统v10sp1安装eclipse
前言 本文介绍银河麒麟桌面操作系统V10sp1的2203版本上安装部署eclipse集成开发环境. 1 系统信息查看 右键点击我的电脑,选择属性,进行查看系统信息 或者也可以在终端输入命令来查看系统信 ...
- 银河麒麟服务器操作系统V10SP2安装搭建OpenVP
文章目录 系统环境 搭建步骤 安装OpenVPN服务端 安装Easy RSA套件 生成私钥和证书 OpenVPN服务端配置 OpenVPN客户端配置 连接测试 系统环境 一.OpenVPN服务器系统配 ...
- 编译安装php8,[PHP] 最新抢先编译安装PHP8.0.0 alph1以及FPM
(麻烦各位转载请注明出处和地址:陶士涵的菜地 , 谢谢 --2020年6月28日) 所有操作需要在root用户下 本机测试案例系统信息:ubuntu 安装路径:/usr/local/php8 解压缩: ...
- 银河麒麟桌面操作系统v10安装QT5.12.8插件
目录 0. 环境说明 1. 安装步骤 0. 环境说明 项目 版本 CPU 龙芯3A4000 操作系统 银河麒麟桌面操作系统v10(龙芯版) QT QT5.12.8(操作系统自带版本) 1. 安装步骤 ...
最新文章
- 格灵深瞳CTO邓亚峰:AI学习的三种路线
- Android5.0新特性:全新的动画
- JS 获取 鼠标 坐标
- 计算机视觉与深度学习 | 基于边缘与形态学的细胞检测
- 【完整代码】Scala AKKA实现两个Actor之间的通信代码示例
- 37.rust属性.txt
- JavaSE中Map框架学习笔记
- 阅读react-redux源码(六) - selectorFactory处理store更新
- MVC与三层架构区别
- PHP underlying structure
- 【7】测试用例设计-等价类分析法
- c++gdal如何在大图像中截取小图像并获取其图像信息_如何模拟不规则形状并构建几何模型
- 《Shell脚本学习指南》
- 算法设计与分析——算法分析基础
- md5和sha256算法的区别,哪个比较安全
- 找回 坚果云 的 选择性同步 功能
- java 京东秒杀系统_京东秒杀浪费坑位惩罚你可知道?
- 失焦事件触发_js中表单的聚焦失焦事件
- 使用opencv将16位深度图转灰度图
- Sun Java认证考试介绍