-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_oci8.sh
29 lines (21 loc) · 1.15 KB
/
php_oci8.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
# update system
sudo apt-get update
# install dependencies
sudo apt-get install build-essential unzip libaio1 wget php-pear php7.0-dev
# INSTALL oci8 and oracle instant client
# create instant client installation folder
sudo mkdir -p /opt/oracle
# download required packages of oracle instant client
wget https://github.com/bumpx/oracle-instantclient/blob/master/instantclient-basic-linux-x64-12.1.0.2.0.zip
wget https://github.com/bumpx/oracle-instantclient/raw/master/instantclient-sdk-linux.x64-x64-12.1.0.2.0.zip
# Unzip downlaoded package files to imstallation folder
sudo unzip -o ./instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/oracle
sudo unzip -o ./instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/oracle
# create symbolic links
sudo ln -s /opt/oracle/instantclient/sqlplus /usr/bin/sqlplus
sudo ln -s /opt/oracle/instantclient_12_1 /opt/oracle/instantclient
sudo ln -s /opt/oracle/instantclient/libclntsh.so.12.1 /opt/oracle/instantclient/libclntsh.so
sudo ln -s /opt/oracle/instantclient/libocci.so.12.1 /opt/oracle/instantclient/libocci.so
# install oci8
echo 'instantclient,/opt/oracle/instantclient' | sudo pecl install oci8