Last active
January 25, 2020 01:08
-
-
Save wernerm/f7d8f63cad2b38913e34c27ebdb47eb1 to your computer and use it in GitHub Desktop.
Revisions
-
wernerm revised this gist
Jan 25, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,11 +26,11 @@ sudo unzip -d /usr/lib/oracle/ instantclient-sdk-linux.x64-19.5.0.0.0dbru.zip ``` Optionally, you might need to create the symbolic link, if it has not been created by extracting the archives. ```sh sudo ln -s /usr/lib/oracle/instantclient_19_5/libclntsh.so.19.1 /usr/lib/oracle/instantclient_19_5/libclntsh.so ``` Add the path to the shared Instant Client library files and configure dynamic linker run-time bindings. ```sh sudo sh -c "echo /usr/lib/oracle/instantclient_19_5 > /etc/ld.so.conf.d/oracle.conf" ``` ```sh sudo ldconfig @@ -47,7 +47,7 @@ Install the PECL OCI8 package. sudo pear install pecl/oci8 ``` During installation, you will be prompted for the path to the ORACLE_HOME directory. Enter the path exactly as follows: `instantclient\,/usr/lib/oracle/instantclient_19_5` After the build process completes, we need to enable PHP to load the OCI8 extension. That should automatically create a symbolic link, `/etc/php/7.2/apache2/conf.d/20-oci8.ini`. ```sh -
wernerm revised this gist
Jan 25, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,10 +9,10 @@ The process has been tested on new servers that have been set up using Virtualmi [Download](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html) the latest version of Instant Client for Linux x86-64 (64-bit). As an example, we will be installing version 19.5.0.0.0 (requires glibc 2.14). You only need to download the _Basic Package_ (ZIP) and the _SDK Package_ (ZIP). ```sh wget -c https://download.oracle.com/otn_software/linux/instantclient/195000/instantclient-basic-linux.x64-19.5.0.0.0dbru.zip ``` ```sh wget -c https://download.oracle.com/otn_software/linux/instantclient/195000/instantclient-sdk-linux.x64-19.5.0.0.0dbru.zip ``` Extract the downloaded archives to an arbitrary location. We'll use `/usr/lib/oracle/`. ```sh -
wernerm revised this gist
Jan 25, 2020 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,25 +4,25 @@ The process has been tested on new servers that have been set up using Virtualmin's installation script. ### Setting up Instant Client 19.5 [Download](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html) the latest version of Instant Client for Linux x86-64 (64-bit). As an example, we will be installing version 19.5.0.0.0 (requires glibc 2.14). You only need to download the _Basic Package_ (ZIP) and the _SDK Package_ (ZIP). ```sh wget -c https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basic-linux.x64-19.5.0.0.0dbru.zip ``` ```sh wget -c https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-sdk-linux.x64-19.5.0.0.0dbru.zip ``` Extract the downloaded archives to an arbitrary location. We'll use `/usr/lib/oracle/`. ```sh sudo mkdir -p /usr/lib/oracle/ ``` ```sh sudo unzip -d /usr/lib/oracle/ instantclient-basic-linux.x64-19.5.0.0.0dbru.zip ``` ```sh sudo unzip -d /usr/lib/oracle/ instantclient-sdk-linux.x64-19.5.0.0.0dbru.zip ``` Optionally, you might need to create the symbolic link, if it has not been created by extracting the archives. ```sh -
wernerm revised this gist
Nov 1, 2019 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,10 +40,7 @@ sudo ldconfig Install the required Ubuntu packages. Some may have been installed already. ```sh sudo sudo apt-get install php-dev php-db libaio1 ``` Install the PECL OCI8 package. ```sh -
wernerm revised this gist
Nov 1, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Installing OCI8 on Ubuntu 18.04 ## Instructions to install the OCI8 extension for PHP 7.2 on Ubuntu 18.04 LTS (Bionic) The process has been tested on new servers that have been set up using Virtualmin's installation script. -
wernerm revised this gist
Nov 1, 2019 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ ### Instructions to install the OCI8 extension for PHP 7.2 on Ubuntu 18.04 LTS (Bionic) The process has been tested on new servers that have been set up using Virtualmin's installation script. ### Setting up Instant Client 19.3 [Download](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html) the latest version of Instant Client for Linux x86-64 (64-bit). As an example, we will be installing version 19.3.0.0.0 (requires glibc 2.14). -
wernerm revised this gist
Nov 1, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Installing OCI8 on Ubuntu 18.04 ### Instructions to install the OCI8 extension for PHP 7.2 on Ubuntu 18.04 LTS (Bionic) ### Setting up Instant Client 19.3 -
wernerm revised this gist
Nov 1, 2019 . No changes.There are no files selected for viewing
-
wernerm created this gist
Nov 1, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,73 @@ # Installing OCI8 on Ubuntu 18.04 ### Instructions to install the OCI8 extension for PHP 7 on Ubuntu 18.04 LTS (Bionic) ### Setting up Instant Client 19.3 [Download](https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html) the latest version of Instant Client for Linux x86-64 (64-bit). As an example, we will be installing version 19.3.0.0.0 (requires glibc 2.14). You only need to download the _Basic Package_ (ZIP) and the _SDK Package_ (ZIP). ```sh wget -c https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basic-linux.x64-19.3.0.0.0dbru.zip ``` ```sh wget -c https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip ``` Extract the downloaded archives to an arbitrary location. We'll use `/usr/lib/oracle/`. ```sh sudo mkdir -p /usr/lib/oracle/ ``` ```sh sudo unzip -d /usr/lib/oracle/ instantclient-basic-linux.x64-19.3.0.0.0dbru.zip ``` ```sh sudo unzip -d /usr/lib/oracle/ instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip ``` Optionally, you might need to create the symbolic link, if it has not been created by extracting the archives. ```sh sudo ln -s /usr/lib/oracle/instantclient_19_3/libclntsh.so.19.1 /usr/lib/oracle/instantclient_19_3/libclntsh.so ``` Add the path to the shared Instant Client library files and configure dynamic linker run-time bindings. ```sh sudo sh -c "echo /usr/lib/oracle/instantclient_19_3 > /etc/ld.so.conf.d/oracle.conf" ``` ```sh sudo ldconfig ``` ### Setting up the OCI8 PHP extension Install the required Ubuntu packages. Some may have been installed already. ```sh sudo sudo apt-get install php-dev php-db ``` ```sh sudo apt-get install libaio1 ``` Install the PECL OCI8 package. ```sh sudo pear install pecl/oci8 ``` During installation, you will be prompted for the path to the ORACLE_HOME directory. Enter the path exactly as follows: `instantclient\,/usr/lib/oracle/instantclient_19_3` After the build process completes, we need to enable PHP to load the OCI8 extension. That should automatically create a symbolic link, `/etc/php/7.2/apache2/conf.d/20-oci8.ini`. ```sh sudo echo "extension=oci8.so" > /etc/php/7.2/mods-available/oci8.ini ``` ```sh sudo phpenmod oci8 ``` We now need to restart Apache. ```sh sudo service apache2 restart ``` ### Verification Verify that the OCI8 extension has been installed and that it can be loaded by PHP. ```sh php -m | grep oci8 ``` ```sh echo "<?php phpinfo();" | php | grep "OCI8 Support" ```