Installation and configuration of LinuxApachePHPOracle (procedure)

Source: Internet
Author: User
Tags mcrypt
This article provides a detailed analysis of how to install Apache + PHP to connect to Oracle in Linux. if you need a friend, refer to Oracle and choose CentOS for Linux.
1. install httpd (apache)
Yum install httpd-y

2. install php, php-gd, php-mcrypt, php-pecl *
Yum install php-gd php-mcrypt php-pecl *-y

3. install oci8
Pecl install oci8
Enter the oracle installation directory during installation

4. modify httpd. conf
Find
User apache
Group apache
Change to a user in the system, for example:
User oracle
Group oracle

5. create oracle. ini under/etc/php. d:
; Enable oracle extension module
Extension = oci8.so

6. modify the temporary directory of php (/etc/php. ini:
Session. save_path = "/tmp/php"
And minimize/tmp/php permissions to chmod 777/tmp/php

7. set the environment variable. bash_profile
ORACLE_HOME =/opt/oracle/product/11.2.0/dbhome_1/
LD_LIBRARY_PATH =/opt/oracle/product/11.2.0/dbhome_1/lib
TNS_ADMIN =/opt/oracle/product/11.2.0/dbhome_1/network/admin
ORACLE_SID = orcl
Export ORACLE_HOME LD_LIBRARY_PATH TNS_ADMIN ORACLE_SID

8.
Chkconfig -- level 3 httpd on
Chkconfig -- level 5 httpd on

9. reboot

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.