Install Oracle Instant Client and SDK
Download Oracle instant client dan SDK di website oracle:
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
download file berikut:
- instantclient-basic-linux.x64-12.1.0.2.0.zip
- instantclient-sdk-linux.x64-12.1.0.2.0.zip
Buat folder baru untuk mengektrak file zip oracle instant client di dalam server.
- mkdir /opt/oracle
extrak file tersebut:
- cd /opt/oracle
- unzip instantclient-basic-linux.x64-12.1.0.2.0.zip
- unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip
buat symlink untuk instant client:
- ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so
- ln -s /opt/oracle/instantclient_12_1/libocci.so.12.1 /opt/oracle/instantclient_12_1/libocci.so
buat folder di ldconfig
- echo /opt/oracle/instantclient_12_1 > /etc/ld.so.conf.d/oracle-instantclient
update ldconfig
- ldconfig
install depedensi yang dibutuhkan untuk memasang oci8
- apt-get install php-dev php-pear build-essential libaio1
lalu unduh oci8 menggunakan pecl:
- pecl install oci8
Saat Anda diminta untuk lokasi klien instan, masukkan berikut ini:
- instantclient,/opt/oracle/instantclient_12_1
tambah ekstensi di php.ini
- echo "extension = oci8.so" >> /etc/php/7.1/fpm/php.ini
- echo "extension = oci8.so" >> /etc/php/7.1/cli/php.ini
- echo "extension = oci8.so" >> /etc/php/7.1/apache2/php.ini
cek extension apabila sudah enable
- php -i | grep oci8
restart apache2
- /etc/init.d/apache2 restart
Komentar
Posting Komentar