Hi Dears,
In this article, we will see Silent Installation of Oracle 19c Database on AWS.
Hardware Requirements:
Yum Packages to install in server:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
yum install -y oracle-epel-release-el7 yum install -y oracle-database-preinstall-19c yum install -y bc yum install -y binutils yum install -y compat-libcap1 yum install -y compat-libstdc++-33 yum install -y dtrace-modules yum install -y dtrace-modules-headers yum install -y dtrace-modules-provider-headers yum install -y dtrace-utils yum install -y elfutils-libelf yum install -y elfutils-libelf-devel yum install -y fontconfig-devel yum install -y glibc yum install -y glibc-devel yum install -y ksh yum install -y libaio yum install -y libaio-devel yum install -y libdtrace-ctf-devel yum install -y libXrender yum install -y libXrender-devel yum install -y libX11 yum install -y libXau yum install -y libXi yum install -y libXtst yum install -y libgcc yum install -y librdmacm-devel yum install -y libstdc++ yum install -y libstdc++-devel yum install -y libxcb yum install -y make yum install -y net-tools # Clusterware yum install -y nfs-utils # ACFS yum install -y python # ACFS yum install -y python-configshell # ACFS yum install -y python-rtslib # ACFS yum install -y python-six # ACFS yum install -y targetcli # ACFS yum install -y smartmontools yum install -y sysstat yum install -y unixODBC yum install -y chrony |
User/group Creation:
1 2 3 4 5 6 7 8 9 10 11 12 |
groupadd -g 650 oinstall groupadd -g 651 dbaoper groupadd -g 652 dba groupadd -g 653 asmadmin groupadd -g 654 asmoper groupadd -g 655 asmdba groupadd -g 656 backupdba groupadd -g 54325 dgdba groupadd -g 658 kmdba groupadd -g 659 racdba useradd oracle -u 1330 -d /home/oracle -m -p $(echo “password” | openssl passwd -1 -stdin) -g oinstall -G dbaoper,dba,asmdba,backupdba,dgdba,kmdba,racdba,ssh_in useradd grid -u 1331 -d /home/grid -m -p $(echo “password” | openssl passwd -1 -stdin) -g oinstall -G dbaoper,dba,asmadmin,asmoper,asmdba,ssh_in |
Setup Filesystem:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
mkdir /u01/app/stage mkdir -p /u01/app/oraInventory mkdir -p /arch/oradata mkdir -p /data/control mkdir -p /arch/control mkdir -p /data/oradata mkdir -p /arch/archive mkdir -p /u01/app/oracle/tde/testpdb1 mkdir -p /arch/redolog mkdir -p /arch/flash mkdir -p /arch/archive chown -R oracle:oinstall /data /arch cd /u01/app/ chown -R oracle:oinstall * |
Download Software from Oracle Site:
Software installation by using attached response file:
a) Unzip the DB Install Software in the Staging Directory
cd /u01/app/oracle/product/19.0.0.0/dbhome_1
unzip /u01/app/stage/LINUX.X64_193000_db_home.zip -d .
b) Install the DB Binaries refer attached db_intall.rsp
/u01/app/oracle/product/19.0.0.0/dbhome_1/runInstaller -silent -responseFile /tmp/db_install.rsp
c) As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/19.0.0.0/dbhome_1/root.sh
Database Creation:
Setup the Bash Profile for Oracle User by adding Following lines . Replace DBNAME with name of your database.
1 2 3 4 5 6 7 8 9 10 |
export ORACLE_UNQNAME=<dbname> export ORACLE_SID=<dbname> export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1 export ORACLE_INVENTORY=/u01/app/oraInventory export PATH=/usr/sbin:/usr/local/bin:$PATH export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib |
Start Listener
1 |
snrctl start LISTENER |
Creating database using DBC template
1 2 3 4 |
cd /u01/app/oracle/product/19.0.0.0/dbhome_1/assistants/dbca/templates/ /u01/app/oracle/product/19.0.0.0/dbhome_1/assistants/dbca/templates/General_Purpose_1.dbc $ dbca -silent -createDatabase -templateName General_Purpose1.dbc -gdbname testpdb1.oracle.com -sid testpdb1 -responseFile NO_VALUE -characterSet AL32UTF8 -sysPassword xxxxx -systemPassword xxxx -createAsContainerDatabase true -useLocalUndoForPDBs true -numberOfPDBs 1 -pdbName testpdb1 -pdbAdminPassword welcome@123 -databaseType MULTIPURPOSE \ -storageType FS -datafileDestination /data/oradata -archiveLogDest /arch/archive -useOMF true -redoLogFileSize 512 -emConfiguration NONE -ignorePreReqs |
Enable Flashback :- Perform Following Steps to Enable Flashback
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
SQL> alter system set db_recovery_file_dest='/arch/flash'; System altered. SQL> alter system set db_recovery_file_dest_size=30g; System altered. SQL> show parameter db_recovery_file NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /arch/flash db_recovery_file_dest_size big integer 30G Turn on flashback: SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ NO SQL> alter database flashback on; Database altered. SQL> select flashback_on from v$database; FLASHBACK_ON ------------------ YES |
Create TNSNAMES.ora :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin/tnsnames.ora testpdb = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = testpdb.oracle.com ) ) ) testpdb1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = testpdb1.oracle.com) ) ) |
Enable TDE NON HA:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
SQL> select name,open_mode,database_role,protection_mode from v$database; NAME OPEN_MODE DATABASE_ROLE PROTECTION_MODE --------- -------------------- ---------------- -------------------- ORCL READ WRITE PRIMARY MAXIMUM PERFORMANCE SQL> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/app/oracle/tde/orcl' IDENTIFIED BY welcome@123; keystore altered. SQL> !ls -lrth /u01/app/oracle/tde/orcl total 4.0K -rw-------. 1 oracle oinstall 2.5K Nov 9 22:38 ewallet.p12 SQL> ADMINISTER KEY MANAGEMENT set KEYSTORE OPEN IDENTIFIED BY welcome@123 container=all; keystore altered. SQL> ADMINISTER KEY MANAGEMENT set KEYSTORE close IDENTIFIED BY welcome@123 container=all; keystore altered. SQL> ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY welcome@123 WITH BACKUP using 'tde_key' container=all; ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY welcome@123 WITH BACKUP using 'tde_key' container=all * ERROR at line 1: ORA-46658: keystore not open in the container SQL> ADMINISTER KEY MANAGEMENT set KEYSTORE OPEN IDENTIFIED BY welcome@123 container=all; keystore altered. SQL> ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY welcome@123 WITH BACKUP using 'tde_key' container=all; keystore altered. SQL> set linesize 150; SQL> SELECT con_id, key_id FROM v$encryption_keys; CON_ID KEY_ID ---------- ------------------------------------------------------------------------------ 1 BQTWY1lNlk9fbyiR3TeVh/0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 3 BYOoJlkXjE+7v3HGK1/Gv0sAAAAAAAAAAAAAAAAAAAAAAAAAAAAA SQL> !ls -lrth /u01/app/oracle/tde/orcl total 12K -rw-------. 1 oracle oinstall 2.5K Nov 9 22:42 ewallet_3010120911422348_tde_key.p12 -rw-------. 1 oracle oinstall 5.4K Nov 9 22:42 ewallet.p12 SQL> COLUMN wrl_parameter FORMAT A35 SQL> SELECT * FROM v$encryption_wallet; WRL_TYPE WRL_PARAMETER STATUS WALLET_TYPE WALLET_OR KEYSTORE FULLY_BAC CON_ID -------------------- -------------------------------------------------- ------------------------------ -------------------- --------- -------- --------- ---------- FILE /u01/app/oracle/tde/orcl/ OPEN PASSWORD SINGLE NONE NO 1 FILE CLOSED UNKNOWN SINGLE UNITED UNDEFINED 2 FILE OPEN PASSWORD SINGLE UNITED NO 3 SQL> ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE '/u01/app/oracle/tde/orcl' IDENTIFIED BY welcome@123; keystore altered. SQL> !ls -lrth /u01/app/oracle/tde/orcl total 20K -rw-------. 1 oracle oinstall 2.5K Nov 9 22:42 ewallet_3020120911422598_tde_key.p12 -rw-------. 1 oracle oinstall 5.4K Nov 9 22:42 ewallet.p12 -rw-------. 1 oracle oinstall 5.4K Nov 9 22:46 cwallet.sso SQL> SELECT * FROM v$encryption_wallet; WRL_TYPE WRL_PARAMETER STATUS WALLET_TYPE WALLET_OR KEYSTORE FULLY_BAC CON_ID -------------------- ----------------------------------- ------------------------------ -------------------- --------- -------- --------- ---------- FILE /u01/app/oracle/tde/orcl/ OPEN PASSWORD SINGLE NONE NO 1 FILE CLOSED UNKNOWN SINGLE UNITED UNDEFINED 2 FILE OPEN PASSWORD SINGLE UNITED NO 3 SQL> / WRL_TYPE WRL_PARAMETER STATUS WALLET_TYPE WALLET_OR KEYSTORE FULLY_BAC CON_ID -------------------- ----------------------------------- ------------------------------ -------------------- --------- -------- --------- ---------- FILE /u01/app/oracle/tde/orcl/ OPEN PASSWORD SINGLE NONE NO 1 FILE CLOSED UNKNOWN SINGLE UNITED UNDEFINED 2 FILE OPEN PASSWORD SINGLE UNITED NO 3 SQL> shut immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> SQL> SQL> startup ORACLE instance started. Total System Global Area 4395630360 bytes Fixed Size 8904472 bytes Variable Size 956301312 bytes Database Buffers 3422552064 bytes Redo Buffers 7872512 bytes SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 TESTPDB1 MOUNTED SQL> alter pluggable database TESTPDB1 open; Pluggable database altered. SQL> set linesize 300; SQL> SELECT * FROM v$encryption_wallet; WRL_TYPE WRL_PARAMETER STATUS WALLET_TYPE WALLET_OR KEYSTORE FULLY_BAC CON_ID -------------------- ----------------------------------- ------------------------------ -------------------- --------- -------- --------- ---------- FILE /u01/app/oracle/tde/orcl/ OPEN AUTOLOGIN SINGLE NONE NO 1 FILE OPEN AUTOLOGIN SINGLE UNITED NO 2 FILE OPEN AUTOLOGIN SINGLE UNITED NO 3 |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts