lnmp环境添加OCI8扩展

环境是lnmp.org一键安装包配置,oci8扩展包下载见底部

  1. 安装依赖

    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
  2. 修改php.ini配置

    vim /usr/local/php/etc/php.ini

    开启扩展

    extension=oci8.so
  3. 重启服务

    service nginx restart
    service php-fpm restart

文件下载

  1. oci8-2.1.3.tgz

  2. oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm

  3. oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

  4. oracle-instantclient12.1-jdbc-12.1.0.2.0-1.x86_64.rpm

  5. oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm

    原文作者:klinson
    原文地址: https://segmentfault.com/a/1190000008871652
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞