Chinaunix首页 | 论坛 | 博客
  • 博客访问: 43177
  • 博文数量: 13
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 115
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-04 12:48
文章分类

全部博文(13)

文章存档

2013年(13)

我的朋友

分类: Oracle

2013-10-07 19:21:05

HOWTO install Oracle OCI8 on RHEL / CentOS / Fedora

How to install OCI8 (PHP extension to access Oracle Databases) on a RHEL / Fedora Linux system.

Download from  :

EDIT 2013/09/24 : 

  • RPM Instant Client Package – SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client
  • RPM Instant Client Package – Basic: All files required to run OCI, OCCI, and JDBC-OCI applications

Install both RPM packages :

rpm -ivh instantclient-basic-linux.XXX.rpm
rpm -ivh instantclient-sdk-linux.XXX.rpm

Install some prerequisite

yum install php-pear
yum install php-devel

Download the OCI8 extension

pear download pecl/oci8
tar xvzf oci8-1.4.5.tgz
cd oci8-1.4.7/
phpize

Configure the extension with your Oracle client library path (change the path …/11.2/… with your own version) :

./configure --with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib/

Compil and install

make
make install

Configure SELinux : allows httpd to execute programs that require memory addresses that are both executable and writeable

setsebool -P httpd_execmem 1

Add the folowing configuration at the end of php.ini

vi /etc/php.ini
[OCI8]
extension=oci8.so

Restart Apache

service httpd restart

That’s all folks.

oci81 HOWTO install Oracle OCI8 on RHEL / CentOS / Fedora


阅读(810) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~