Preparing The Practice Environment PDF
Preparing The Practice Environment PDF
Practice Overview
This practice guides you to prepare the environment to be used in the course practices. The practices in
the course were designed using virtual machines. You will build two Linux-based machines with Oracle
database installed on each.
Note: this practice assumes that you have the knowledge to perform the basic tasks on Oracle VirtualBox
and on installing Oracle single-instance database on a Linux-based system.
1. Install all the software mentioned in the list above in your PC.
In the following steps, you will create an Oracle VirtualBox appliance with an Oracle single-instance non-
CDB database installed on it. The database datafiles will be on the Linux file system, not ASM. The
examples data will be installed on the database.
2. Create a Linux-based VirtualBox appliance with the specifications as shown in the table below.
This is an Oracle VirtualBox appliance which has a fresh installation of Oracle Linux 6.7 installed on
it.
If you have not created a VirtualBox appliance before, the procedure to create it from scratch is
documented here, or can be watched at YouTube here.
Item Value
Hostname ggsrv1
Memory 4 GB
Operating system Linux 6.7
3. Install Oracle database 12c R1 software in the virtual appliance that you created above (ggsrv1).
Use the following specifications when you install the software:
Item Value
Oracle Home /u01/app/oracle/product/12.1.0/db_1
5. Configure the listener in the database and make sure it accepts connections.
sqlplus sys/oracle@db1 as sysdba
In the following steps, you will create an additional Oracle VirtualBox appliance with an Oracle single-
instance non-CDB database installed on it. This database does not have the examples schemas installed
on it.
6. Create another Linux-based VirtualBiox appliance with the specifications as shown in the table below.
Item Value
Hostname ggsrv2
Memory 4 GB
Operating system Linux 6.7
7. Similar to what you did in ggsrv1, install Oracle database 12c R1 software in the virtual appliance that
you created above (ggsrv2). Use the following specifications when you install the software:
Item Value
Oracle Home /u01/app/oracle/product/12.1.0/db_1
9. Configure the listener in the database and make sure it accepts connections.
sqlplus sys/oracle@db1 as sysdba
10. Configure the /etc/hosts file in both appliances and make sure they can see each other.
vi /etc/hosts
ping ggsrv1
ping ggsrv2
11. Configure the tnsnames.ora file in each system so that they can connect to each database.
vi $TNS_ADMIN/tnsnames.ora
DB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ggsrv1.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db1.localdomain)
) )
DB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ggsrv2.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db2.localdomain)
) )
sqlplus system/oracle@db1
sqlplus system/oracle@db2
In the following steps, you will perform more configuration to get your environment ready for the course.
12. Connect to each appliance from your hosting PC using PuTTY. Save the two connections in PuTTY.
Configure the session to the ggsrv2 to have green font. The idea is to make it easy for you to
distinguish between the db1 session PuTTY window and the db2 session PuTTY window when you
have two sessions opened in the same time. The following screenshot shows you where to click to
change the font color in PuTTY:
Summary
By end of this practice, you should have two Linux-based Oracle VirtualBox appliances. Each one
has an Oracle 12.1 single-instance non-CDB database installed on it. One of them have the example
schemas, but the other does not.