铁雪资源网 Design By www.gsvan.com

注:本文适用于RHEL/CentOS发行版。

步骤1.安装构建自定义PHP 7模块所需的devel包

# yum install plesk-php70-devel gcc glibc-devel libmemcached-devel zlib-devel make libaio.x86_64

步骤2.下载oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm和oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm(来自Oracle OTN),并将其上传到服务器上。、

 https://www.jb51.net/database/572638.html

步骤3.安装oracle-instantclient12 *包:

 

# rpm -Uhv oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

步骤4.用pecl安装oci8包

# /opt/plesk/php/7.0/bin/pecl install oci8

步骤5.在php.ini中启用oci8模块

# echo "extension=oci8.so" > /opt/plesk/php/7.0/etc/php.d/oci.ini

要为通过Plesk安装的其他PHP引擎安装oci8扩展,请为相应的PHP版本安装PHP devel包。

例如,对于PHP 7.2:

# yum install plesk-php72-devel

重复上面的步骤4,5,确保路径是当前PHP版本的:

# /opt/plesk/php/7.2/bin/pecl install oci8

# echo "extension=oci8.so" > /opt/plesk/php/7.2/etc/php.d/oci.ini

检查扩展是否已启用:

# /opt/plesk/php/7.2/bin/php -m | grep oci

oci8

标签:
PHP7,Oracle,OCI8

铁雪资源网 Design By www.gsvan.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
铁雪资源网 Design By www.gsvan.com

评论“为Plesk PHP7启用Oracle OCI8扩展方法总结”

暂无为Plesk PHP7启用Oracle OCI8扩展方法总结的评论...