环境是lnmp.org一键安装包配置,oci8扩展包下载见底部
安装依赖
rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm rpm -ivh oracle-instantclient12.1-jdbc-12.1.0.2.0-1.x86_64.rpm rpm -ivh oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm tar zxvf oci8-2.1.3.tgz cd oci8-2.1.3 phpize ./configure --with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib --with-php-config=/usr/local/php/bin/php-config make && make install
修改php.ini配置
vim /usr/local/php/etc/php.ini
开启扩展
extension=oci8.so
重启服务
service nginx restart service php-fpm restart
文件下载