Install OCI8 in UbuntuServer12.04

Source: Internet
Author: User
Due to the recent system upgrade, you need to consider the support for Oracle on the system. php supports oracle, which is not as simple as mysql. We need to install several things. next we will talk about how to install oci on UbuntuServer12.04. an error has been reported before. now I have written the correct steps, which may not be applicable to anyone, but I can use them for reference. 1. download instantclient from the official oracle website. three files need to be downloaded.

Due to the recent system upgrade, you need to consider the support for Oracle on the system.

Php supports oracle, which is not as simple as mysql. We need to install several things.

Next, let's talk about how to install oci on Ubuntu Server 12.04. An error has been reported before. Now, I have written the correct steps, which may not be applicable to everyone, but I can learn from them.

1. Download instantclient from the official oracle website.

Three files need to be downloaded.

1.instantclient-basic-linux-11.2.0.3.0.zip

2.instantclient-sdk-linux-11.2.0.3.0.zip

3.instantclient-sqlplus-linux-11.2.0.3.0.zip

Then upload the three files to your server ..

Decompress the package one by one using the unzip command. decompress the package and place it all in the "instantclient_11_2" folder.

2. Then we need to add the following two environment variables to the system.

# The Directory for storing the extracted files

Export ORACLE_HOME =/root/instantclient_11_2

# I have not added this before, and an error will be reported later

Export ORACLE_BASE =/root/instantclient_11_2

3. After adding these two variables, We will install OCI8.

Before installation, We need to install two tools.

Sudo apt-get install php-pear sudo apt-get install php5-dev

After the installation is complete, we will start to install OCI.

Sudo pecl install oci8

During the installation process, the system will ask you about the instantclient location.

Instantclient,/root/instantclient_11_2

After entering the information, wait for the automatic installation to complete oci8.

Don't worry. The last step is to add OCI support for php.

Open the php. ini file and add

Extension = oci8.so

OK. Now the job is finished.

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.