linux:redhat
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
linux:redhat [2023/11/02 07:12] – removed - external edit (Unknown date) 127.0.0.1 | linux:redhat [2023/11/02 07:12] (current) – ↷ Page moved from webserver:redhat to linux:redhat skipidar | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Red Hat ===== | ||
+ | ==== Installing Software ==== | ||
+ | |||
+ | == Searhing RPM packages == | ||
+ | The packages can be downloaded under | ||
+ | |||
+ | http:// | ||
+ | |||
+ | == Installing SQL Plus == | ||
+ | |||
+ | Download | ||
+ | |||
+ | http:// | ||
+ | |||
+ | < | ||
+ | oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm | ||
+ | oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm | ||
+ | </ | ||
+ | |||
+ | Install | ||
+ | |||
+ | Here is an introduction for rpm: \\ | ||
+ | installing http:// | ||
+ | uninstalling etc. http:// | ||
+ | |||
+ | < | ||
+ | rpm -ivh oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm | ||
+ | rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm | ||
+ | </ | ||
+ | |||
+ | Set environment variables in your ~/ | ||
+ | |||
+ | < | ||
+ | ORACLE_HOME=/ | ||
+ | PATH=$ORACLE_HOME/ | ||
+ | LD_LIBRARY_PATH=$ORACLE_HOME/ | ||
+ | export ORACLE_HOME | ||
+ | export LD_LIBRARY_PATH | ||
+ | export PATH | ||
+ | </ | ||
+ | |||
+ | Reload the session or just relogin: | ||
+ | < | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
+ | Start sqlplus | ||
+ | < | ||
+ | $ sqlplus | ||
+ | </ | ||
+ | |||
+ | |||
+ | SSH Script for starting sqlplus | ||
+ | < | ||
+ | #!/bin/bash | ||
+ | |||
+ | DBNAME=" | ||
+ | DBHOST=" | ||
+ | DBPORT=" | ||
+ | DBUSER=" | ||
+ | DBPASS=" | ||
+ | |||
+ | |||
+ | # set environment vars | ||
+ | ORACLE_HOME=/ | ||
+ | LD_LIBRARY_PATH=$ORACLE_HOME/ | ||
+ | PATH=$PATH: | ||
+ | export ORACLE_HOME | ||
+ | export LD_LIBRARY_PATH | ||
+ | export PATH | ||
+ | |||
+ | # connect DB via sqltools | ||
+ | set ORACLE_SID=$DBNAME; | ||
+ | sqlplus " | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Persisting environment variables=== | ||
+ | |||
+ | The relevant file is **~/ | ||
+ | The vars have to be set. | ||
+ | The vars have to be exported. | ||
+ | |||
+ | < | ||
+ | # User specific aliases and functions | ||
+ | export ORACLE_HOME=/ | ||
+ | export PATH=$ORACLE_HOME/ | ||
+ | export LD_LIBRARY_PATH=$ORACLE_HOME/ | ||
+ | </ | ||
+ | |||
+ | To reaply the changed bashrc without reloggin in | ||
+ | < | ||
+ | source ~/.bashrc | ||
+ | </ |