1. Download the Oracle Real-time client package Basic: All files required to run OCI, OCCI, and JDBC-OCI applications ① open the following URL (this article takes the 32-bit version as an example) :( linux32-bit edition www.oracle.compolicysoftwaretechociinstantclientht
1. Download the Oracle Real-time client package Basic: all the files required to run OCI, OCCI, and JDBC-OCI applications ① open the following URL (this article takes the 32-bit version as an example ): (Linux 32-bit) http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html (Linux 6)
1. Download the Oracle Real-time client package-Basic: All files required to run OCI, OCCI, and JDBC-OCI applications
① Open the following website (This article uses the 32-bit version as an example ):
(Linux 32-bit) http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
(Linux 64-bit edition) http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxx86_64soft.html
② Download the following files:
Oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
Oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
Oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
2. Install the Oracle Real-time client package
Rpm-ivh oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
Echo "/usr/lib/oracle/11.1/client/lib/">/etc/ld. so. conf. d/oracle_client.conf
/Sbin/ldconfig
3. Install OCI8 PHP Extension(Use the built-in OCI8 in PHP, assuming that the PHP program is installed in/usr/local/webserver/php /)
Yum install libaio
Wget http://pecl.php.net/get/oci8-1.3.5.tgz
Tar zxvf oci8-1.3.5.tgz
Cd oci8-1.3.5/
/Usr/local/webserver/php/bin/phpize
CFLAGS = "-I/usr/include/oracle/11.1/client /"
CXXFLAGS = "-I/usr/include/oracle/11.1/client /"
./Configure -- with-php-config =/usr/local/webserver/php/bin/php-config -- with-oci8 =/usr/lib/oracle/11.1/client/
Make
Make install
4. Modify the PHP configuration file(/Usr/local/webserver/php/etc/php. ini)
Add a line after extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613:
Extension = "oci8.so"
5. Restart PHP
6. Create a phpinfo. php file (the content is as follows) and access it through the Web. If "oci8" exists, it indicates that the installation is successful.
Phpinfo ();
?>