Install Ora8 on Ubuntu 16.04 to use with Apache2 and PHP7

Don't mind the version numbers

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

Download oracle instant client basic and SDK and unzip them

mkdir /opt/oracle
unzip /opt/oracle
unzip /opt/oracle/instantclient_12_2
chown -R root:www-data /opt/oracle
cd /opt/oracle
mv instantclient_12_2 instantclient
cd instantclient
echo /opt/oracle/instantclient > /etc/
echo /opt/oracle/instantclient >> /etc/
ln -s
ln -s
pecl install oci8
echo >> /etc/php/7.0/apache2/php.ini
echo >> /etc/php/7.0/cli/php.ini
service apache2 restart

When prompted to enter instant client home, use instantclient,/opt/oracle/instantclient

Enter your comment:
44 -0 = 
  • database/oracle/ubuntu_php7_apache2.txt
  • Last modified: 2019/10/31 09:04
  • by