Skip to content

Instantly share code, notes, and snippets.

@galanteh
Last active February 3, 2024 12:34
Show Gist options
  • Save galanteh/5a12a3ad9c070799996a2c709ad55857 to your computer and use it in GitHub Desktop.
Save galanteh/5a12a3ad9c070799996a2c709ad55857 to your computer and use it in GitHub Desktop.
Installing Oracle 19c on Centos 7.7
#!/bin/bash
# ORACLE 19c Install Script by Hernan Galante <hernan_galante@hotmail>
# ------------------------------------------------------------------
# First, go to the Oracle Downloads website and try to download your RPM. You will ACCEPT the Terms.
# This will generate a cookie than you can export from your browser with any add-on for Chrome or Firefox.
# Copy this cookie.txt to your server. This script assumes that you have this file.
#
# TROUBLESHOOTING
# ------------------------------------------------------------------
# If you receive this error message [FATAL] [DBT-06103] The port (1,521) is already in use.
# Please, check your /etc/hosts file and add the IP, Fully Qualified Hostname and the Shortname of your server.
# Then re-execute this line: sudo /etc/init.d/oracledb_ORCLCDB-19c configure
sudo yum update -y
export USER_ORA=<your_username_at_ORA>
sudo curl -o oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
sudo yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
wget --load-cookies cookies.txt --http-user=$USER_ORA --ask-password "https://download.oracle.com/otn/linux/oracle19c/190000/oracle-database-ee-19c-1.0-1.x86_64.rpm"
sudo yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
sudo /etc/init.d/oracledb_ORCLCDB-19c configure
# Check installation
# SQL> col name format a30
# SQL> select con_id, name, open_mode from v$pdbs;
#    CON_ID NAME      OPEN_MODE
#---------- ------------------------------ ----------
#  2 PDB$SEED     READ ONLY
#  3 ORCLPDB1     READ WRITE
su - oracle
cd /opt/oracle
cd product/19c/dbhome_1
export ORACLE_HOME=`pwd`
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=ORCLCDB
sqlplus / as sysdba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment