CentOS Apache Install Oracle Extensions

Source: Internet
Author: User

Reference URL:

http://blog.csdn.net/a82168506/article/details/11763989

The steps are as follows:

Download the installation package. (I downloaded the 11.1 version)

Http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

Download the corresponding PHP source package,

http://www.php.net/downloads.php

Start the installation environment

RPM-IVH oracle-instantclient11. 1-basic-11.1. 0.7. 0-1-ivh oracle-instantclient11. 1-devel-11.1. 0.7. 0-1-ivh oracle-instantclient11. 1-sqlplus-11.1. 0.7. 0-1. x86_64.rpm

To see if the installation was successful

 //  see if Oracle installs  RPM-QA | grep oracle  //  View all installed people rpm package  rpm -qa   Uninstall the installed RPM package  rpm-e oracle-instantclient11. 2 -basic-11.2 . 0.3 . 0 -  Force install RPM package  RPM-IVH-- Force oracle-instantclient11. 2 -basic-11.2 . 0.3 . 0 -

If the installation succeeds it will show the following

Configure Oracle

#vi/etc/ld.so.conf  /usr/lib/oracle/11.2/client64/lib/     // Join this line, save exit   or   '/usr/lib/oracle/11.2/client64/lib/'

A 64-bit system needs to create a 32-bit soft link (this could be a legacy bug, or it might be a problem after compilation). I just lost this step, the results of more study one day )

Ln-s/usr/lib/oracle/11.2/client64/usr/lib/oracle/11.2/client  -s/usr/include/ oracle/11.2/client64/usr/include/oracle/11.2/client  

Defining environment variables

Vi/etc/profile

Add code

Export oracle_home=/usr/lib/oracle/11.1/client64/  export Ld_library_path=/usr/lib/oracle/ 11.1/client64: $LD _library_path  export Nls_lang="American_america. Al32utf8"  

Command line enter the following statement to make the environment configuration effective immediately

Source/etc/profile

Installing the PDO_OCI module

Prevent pdo_oci against ORACLE11 support (Pdo_oci may not support oracle11g, you need to make a soft link as a oracle10 version to compile the past):

Ln-s/usr/include/oracle/11.1 /usr/include/oracle/10.2. 0.1 -s/usr/lib/oracle/11.1/usr/lib/oracle/10.2.    0.1

Access to the source package (zipped folder Yo)

such as/php5.3.3/ext/php_oci

Installation

# Cd/data/httpd/__doc/php5.3.3/ext/php_oci  //This is the path of my local folder, modified according to my own folder path
#phpize #. /configure--with-php-config=php-config--with-pdo-oci=instantclient,/usr,10.2. 0.1 && make install /usr/lib64/php/modules/

You can see that php_oci.so is already in the folder

Configuration

#vi/etc/php.ini  extension=pdo_oci.so  // Add this line      in php.ini or enter     'extension=pdo_oci.so' >/etc/php.d/pdo_oci.ini directly on the command line  

Installing the Oci8 module

Access to the source package (zipped folder Yo)

such as/php5.3.3/ext/oci8

Installation

# phpize  #. /configure--with-php-config=php-config--with-oci8=shared,instantclient,/usr/lib/oracle/11.1/client/ Lib   && make install  /usr/lib64/php/modules  

You can see that oci8.so is already in the folder

Configuration

#vi/etc/php.ini    extension=oci8.so    // Add this line     in php.ini or enter     'extension=oci8.so' >/etc/php.d/oci8.ini directly on the command line  

Finally, restart Apache. Phpinfo () can see that both PHP_OCI and OCI8 extensions have been successfully opened

CentOS Apache Install Oracle Extensions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.