문서의 이전 판입니다!
# apt-get install apache2
# apt-get install php
# apt-get install php-mysql php-xmlrpc php-xml php-curl php-gd php-pear
# apt-get install libapache2-mod-php7.0
# apt-get install php7.0-dev
# apt-get install build-essential libaio1
apt-get install apache2 php php-mysql php-xmlrpc php-xml php-curl php-gd php-pear libapache2-mod-php7.0 php7.0-dev build-essential libaio1 unzip
# a2enmod rewrite headers
# unzip instantclient-basic-linux.x64-11.2.0.4.0.zip # unzip instantclient-sdk-linux.x64-11.2.0.4.0.zip
# mv instantclient_11_2/ /usr/local/
# cd /usr/local/instantclient_11_2/
# ln -s /usr/local/instantclient_11_2/libclntsh.so.11.1 /usr/local/instantclient_11_2/libclntsh.so # ln -s /usr/local/instantclient_11_2/libocci.so.11.1 /usr/local/instantclient_11_2/libocci.so
# echo /usr/local/instantclient_11_2 > /etc/ld.so.conf.d/oracle-instantclient
# ldconfig
$ vi ~/.bashrc ... export DYLD_LIBRARY_PATH="/usr/local/instantclient_11_2" export TNS_ADMIN="/usr/local/instantclient_11_2" export ORACLE_HOME="/usr/local/instantclient_11_2" ...
# wget https://pecl.php.net/get/oci8-2.1.8.tgz
$ tar xvfz oci8-2.1.8.tgz
$ cd oci8-2.1.8/
$ phpize
$ ls /usr/local/instantclient_11_2/libclntsh.so /usr/local/instantclient_11_2/libclntsh.so
$ ./configure --with-oci8=instantclient,/usr/local/instantclient_11_2
# make # make test
# make install # root 일때 또는 $ sudo make install # sudo 권한을 가진 user 일때
# ls /usr/local/instantclient_11_2/oci8.so /usr/local/oracle/instantclient_11_2/oci8.so # ls /usr/lib/php/20151012/oci8.so /usr/lib/php/20151012/oci8.so
# vi /etc/php/7.0/apache2/php.ini ... extension=oci8.so ...
# /etc/init.d/apache2 restart
# php -m | grep oci8 oci8