2021-12-22 13:51:22 +00:00
|
|
|
#!/bin/bash
|
2022-01-08 06:31:10 +00:00
|
|
|
echo
|
|
|
|
echo "==============================================="
|
|
|
|
echo "Installing oci8..."
|
|
|
|
echo "==============================================="
|
|
|
|
echo
|
2021-12-22 13:51:22 +00:00
|
|
|
|
|
|
|
#check for
|
|
|
|
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
|
|
|
|
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -- only libociicus.so
|
|
|
|
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
|
|
|
|
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-tools-linuxx64.zip
|
|
|
|
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
|
|
|
|
#unzip
|
|
|
|
|
|
|
|
sudo mkdir /opt/oracle/
|
|
|
|
sudo mv ~/Downloads/instant_client/ /opt/oracle/
|
|
|
|
|
|
|
|
sudo sh -c "echo /opt/oracle/instant_client > /etc/ld.so.conf.d/oracle-instantclient.conf"
|
|
|
|
sudo ldconfig
|
|
|
|
|
2022-01-08 06:31:10 +00:00
|
|
|
sudo apt install -y --autoremove \
|
|
|
|
php-dev \
|
|
|
|
php-pear \
|
|
|
|
build-essential \
|
|
|
|
libaio1 \
|
|
|
|
default-jdk
|
2021-12-22 13:51:22 +00:00
|
|
|
sudo pecl channel-update pecl.php.net
|
2022-01-08 06:31:10 +00:00
|
|
|
sudo pecl install oci8 # php8
|
|
|
|
#sudo pecl install oci8-2.2.0 # php7
|
2021-12-22 13:51:22 +00:00
|
|
|
|
|
|
|
#sh -c "echo '; priority=10' > /etc/php/7.4/mods-available/oci8.ini"
|
2022-01-08 06:31:10 +00:00
|
|
|
# sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini"
|
|
|
|
# sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini
|
2021-12-22 13:51:22 +00:00
|
|
|
sudo phpenmod oci8
|
|
|
|
php -i | grep oci8
|
|
|
|
|
|
|
|
# instantclient,/opt/oracle/instant_client
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# https://pecl.php.net/package/oci8
|
2022-01-08 06:31:10 +00:00
|
|
|
#sudo pecl install oci8-2.2.0
|