Created
April 15, 2026 12:25
-
-
Save luzfcb/4770500adaf392825ff57c904d3444e1 to your computer and use it in GitHub Desktop.
Revisions
-
luzfcb created this gist
Apr 15, 2026 .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,36 @@ #!/bin/bash set -euo pipefail # Configurations # latest version of instant client basic lite export ORACLE_INSTANT_CLIENT_URL="https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip" TMP_DIR="/tmp/oracle" INSTALL_DIR="/opt/oracle" echo "Starting the Oracle Instant Client installation..." # 1. Prepare directories mkdir -p "$TMP_DIR" sudo mkdir -p "$INSTALL_DIR" # 2. Download echo "Downloading the package..." wget --progress=dot:giga --tries 3 --wait 2 --output-document "$TMP_DIR/instantclient.zip" "$ORACLE_INSTANT_CLIENT_URL" # 3. Extraction echo "Extracting files..." sudo unzip -o "$TMP_DIR/instantclient.zip" -d "$INSTALL_DIR" # 4. Cleaning up unnecessary files sudo rm -rf "$INSTALL_DIR/META-INF" rm -rf "$TMP_DIR" # 5. Linker Configuration echo "Configurando bibliotecas do sistema..." # The command below finds the newly created directory (e.g., instantclient_21_1) and saves it to the conf file. find "$INSTALL_DIR" -maxdepth 1 -type d -name "instantclient*" | sudo tee /etc/ld.so.conf.d/oracle-instantclient.conf > /dev/null # 6. Update library cache sudo ldconfig echo "Installation completed successfully!"