The Pursuit of Happyness

1. install apache, mysql, php

sudo apt-get install tasksel

sudo tasksel install lamp-server


2. install oracle

apt-get install alien

alien -i oracle-xe-11.2.0-1.0.x86_64.rpm


3. edit TNS

vi /u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora


4. install php-pear

apt-get install php-pear php5-dev build-essential unzip libaio1


5. install oci

alien -i oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpm 

alien -i oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64.rpm 

pecl install oci8


6. edit environment variable

echo ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/ >> /etc/environment


7. edit php configuration

echo extension=oci8.so >> /etc/php5/apache2/php.ini

echo extension=oci8.so >> /etc/php5/cli/php.ini


8. edit apache2 envvars

vi /etc/apache2/envvars

# add this line 

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe


9. restart apache

sudo /etc/init.d/apache2 restart

or

sudo service apache2 restart


참고자료

https://help.ubuntu.com/community/ApacheMySQLPHP

https://help.ubuntu.com/community/PHPOracle

http://kogentadono.com/2011/11/02/installing-oci8-on-ubuntu/



Comment +0