Oracle Database on AWS EC2

1-click AWS Deployment 1-click Azure Deployment 1-click Google Deployment

AWS

Installation Instructions For Linux

Installation Instructions 

Note: How to find PublicDNS in AWS

Step 1) SSH Connection: To connect to the deployed instance, Please follow Instructions to Connect to Linux instance on AWS Cloud

1) Download Putty.

2) Connect to the virtual machine using SSH key Refer this link:

  • Hostname: PublicDNS  / IP of machine
  • Port : 22

Step 2) Database Details:

Sample Database: Database cdb1 and pdb pdb1 has been created.
Credentials: The below passwords for oracle access have been set to Passw@rd123

  1. sysPassword
  2. systemPassword
  3. pdbAdminPassword
    Note : Please change the password after first login.

To use the oracle system user

  1. SSH to the instance with ec2-user
  2. Switch context to root with “sudo -i”
  3. Then do su – oracle

Please set oracle user password as required.

Login with the command “sqlplus / as sysdba” as oracle user.

On the oracle sqlplus prompt “startup” the sample db configured in /etc/oratab.

/etc/oratab has been configured with to cdb1:/u01/app/oracle/product/19.0.0/dbhome_1:Y

After doing db startup in sqlplus you can check the status on ssh using the “lsnrctl status” command.
​Please use service dbora stop or start and start_all.sh or stop_all.sh script in /home/oracle/scripts to manage the listener.
Or use the below commands
systemctl start dbora.service
systemctl enable dbora.service
systemctl status dbora.service

Parameter db_create_file_dest has been set to DATA_DIR=/u02/oradata
4 GB Swap File has been created at /swapfile
Note: Connecting externally
Before connecting check that you have done db startup in sqlplus you can check the status on ssh using the “lsnrctl status” command.
In order to connect externally you will need to allow the ports on iptable firewall as well as AWS inbound rule.

You have to either allow 1521 port in iptables or disable the firewall

To allow use the command like this with your IP range :
iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport 1521 -j ACCEPT (192.168.1.0/24 will be your ip ranges)
To disable iptables use:
service iptables status
service iptables stop
chkconfig iptables off

service iptables status

You may also create and entry in listener.ora in /u01/app/oracle/product/YOURVERSION/db_1/network/admin/listener.ora
Sample contents of listener.ora

LISTENER =

  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = YourExternalDNSorIP)(PORT = 1521))
    )

)

Please change YourExternalDNSorIP to your ec2 instance details.
After the change restart the listener

lsnrctl stop

lsnrctl start

lsnrctl status

Videos

Oracle 18c DataBase

 

Oracle Database on AWS EC2