php安装orcale扩展

Posted by
下载oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm,oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm,oci8-2.0.8.tgz
下载地址:
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
http://pecl.php.net/package/oci8
注:orcale下载需要注册,注册完就可以下载了
1.安装orcale开发包
# 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
2.安装php的orcale扩展
# tar -zxvf oci8-2.0.8.tgz
#  cd oci8-2.0.8
# /usr/bin/phpize CFLAGS=”-I /usr/include/oracle/12.1/client64/” CXXFLAGS=”-I /usr/include/oracle/12.1/client64/”
# ./configure –with-php-config=/usr/bin/php-config –with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib/
# make
# make test
# make install
3.在php.ini中加入oci
extension=oci8.so
重启php,nginx。
看看phpinfo中有oci8就安装成功了

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据