搭建php环境

19-09-03 14:29 字数 1215 阅读 1456 已编辑

选择相应的php版本https://webtatic.com/ 作为新的yum源,yum源目录/etc/yum.repos.d/,如选择php7.2 yum install epel-release rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum clean all yum makecache yum list |grep php72w | awk '{print $1}' > ~/php.install vim php.install#进行删减编辑 yum install cat php.intall

安装oracl扩展oci8.so https://pecl.php.net/package/oci8 oracle 下载地址https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html Version 19.3.0.0.0 (Requires glibc 2.14)也使用使用yum命令查看系统中版本 yum list installed |grep glibc

download: oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm oracle-instantclient19.3-jdbc-19.3.0.0.0-1.x86_64.rpm 执行安装 rpm -ivh oracle-instantclient* 进入解压后的oci8目录执行,oci8须为php的用户执行 phpize ./configure --with-php-config= --with-oci8=instantclient,/usr/lib/oracle/xxx/client64/lib/ make && make install 安装pdo_oci This package is not maintained anymore and has been superseded. Package has moved to channel http://www.php.net/pdo_oci package ext/pdo_oci. 从https://pecl.php.net/package/PDO_OCI 可知pecl中的已经作废该功能已经被php内置 ext/pdo_oci 下载对应的源码包,解压后进入到ext/pdo_oci目录下执行phpize和./configure --with-pdo-oci=instantclient,/usr/lib/oracle/xxx/client64/;配置扩展ini即可

0人点赞>
关注 收藏 改进 举报
0 条评论
排序方式 时间 投票
快来抢占一楼吧
请登录后发表评论