Oracle express edition 10.2
|
|
| diversen |
| 17-Sep-2010 14:03:39 |
Install Oracle
Installment of oracle express edition oci8 database server on ubuntu. Tested on ubuntu 9.1 Karmic Koala and 10.04 LTS lucid lynx
Fetch som packages at http://www.oracle.com/technetwork/database/express-edition/downloads/102xelinsoft-102048.html. (You will need an oracle account):
Fetch the following package
oracle-xe_10.2.0.1-1.0_i386.deb
oracle-xe-client_10.2.0.1-1.0_i386.deb
Single-byte LATIN1 database for Western European language storage, with the Database Homepage user interface in English only.You can also fetch a utf8 supported database which will also work. Here we use the LATIN1
Install a dependency:
sudo aptitude install libaio1
Install downloaded packages:
sudo dpkg -i *.deb
Set a system password for the database (you will be prompted):
sudo /etc/init.d/oracle-xe configure
You can now administer your database at the following url:
Build PHP5 oci8 extension
In order to build the php5-oci8 extension you need some more packages
sudo aptitude install php5-dev build-essential php-pear
Go to:
http://www.oracle.com/technetwork/topics/linuxsoft-082809.html
Fetch the following packages:
sdk-10.2.0.5.0-linux.zip
basic-10.2.0.5.0-linux.zip
create a the following dir in sudo mode:
sudo mkdir /opt/oracle/instantclient
And:
unzip basic-10.2.0.5.0-linux.zip
It is unzipped to a folder called instantclient_10_2)
sudo mv instantclient_10_2/* /opt/oracle/instantclient
sudo unzip sdk-10.2.0.5.0-linux.zip
(Again: it is unzipped to a folder called instantclient_10_2)
sudo mv instantclient_10_2/sdk /opt/oracle/instantclient
sudo cd /opt/oracle/instantclient
sudo ln -s libclntsh.so.10.1 libclntsh.so
sudo ln -s libocci.so.10.1 libocci.so
Build PHP oci8 extension
Finally build the PHP5 extension
sudo pecl install oci8
when prompted for a location for the instant client libary
Enter:
instantclient,/opt/oracle/instantclient
If build is ok continue with:
sudo vim /etc/php5/apache2/conf.d/oci8.ini
Add following line to file:
extension = oci8.so
restart apache2
sudo /etc/init.d/apache2 restart
Test with command phpinfo() in a script to se if the oci8 extension is loaded.
That is it.