Back to Blog
Oracle Cloud Infrastructure Tutorial (Step-by-Step Setup Guide)

Oracle Cloud Infrastructure Tutorial (Step-by-Step Setup Guide)

   Mariusz Antonik    Oracle Cloud (OCI)    4 min read    274 views

Getting started with Oracle Cloud Infrastructure (OCI) can feel overwhelming at first. You log in, see dozens of services, and suddenly you’re expected to design networks, launch servers, and secure everything correctly. Without a clear path, it’s easy to make early mistakes that are hard to fix later.

This Oracle Cloud Infrastructure tutorial walks through the practical foundation you need. Instead of focusing on theory, we’ll cover what actually matters when you’re building your first working environment.

Why Getting the Foundation Right Matters

OCI is powerful, but it’s also very structured. Decisions you make early—like how you design your Virtual Cloud Network (VCN) or segment subnets—affect security, scalability, and long-term maintenance.

Here’s the thing: most issues in cloud environments aren’t caused by the application. They come from poor networking, weak access control, or unclear architecture.

  • Incorrect CIDR ranges can block future expansion
  • Improper routing can expose systems unintentionally
  • Missing segmentation increases security risk

So before launching instances, you need a simple, solid structure.

OCI Core Concepts You Need to Understand

Before jumping into setup, make sure these building blocks are clear:

Compartments

Compartments organize resources. Think of them as logical folders for separating environments like dev, test, and production.

Virtual Cloud Network (VCN)

This is your private network in OCI. You define IP ranges and control how traffic flows inside and outside your environment.

Subnets

Subnets divide your VCN into smaller segments. Typically:

  • Public subnet for internet-facing resources
  • Private subnet for internal systems

Gateways

Gateways control external connectivity:

  • Internet Gateway for public access
  • NAT Gateway for outbound-only traffic
  • Service Gateway for Oracle services

Oracle Cloud Infrastructure Step-by-Step Setup

This is a simplified OCI setup guide you can follow even if you’re using the free tier.

Step 1: Create a Compartment

Start by creating a dedicated compartment for your project. This keeps resources organized and avoids confusion later.

Step 2: Create a VCN

Define a CIDR block, for example:

10.0.0.0/16

This gives you enough space for multiple subnets.

Step 3: Create Subnets

Split your network into at least two subnets:

  • Public subnet (e.g., 10.0.1.0/24)
  • Private subnet (e.g., 10.0.2.0/24)

Attach route tables appropriately so public subnets use an Internet Gateway, while private subnets use a NAT Gateway.

Step 4: Configure Security Lists or NSGs

Define inbound and outbound rules. For example:

  • Allow SSH (port 22) from your IP only
  • Allow HTTP/HTTPS for web servers

Avoid opening everything to 0.0.0.0/0 unless absolutely necessary.

Step 5: Launch a Compute Instance

Create a Linux instance inside your subnet. Attach it to the correct network and assign a public IP only if required.

Step 6: Test Connectivity

Verify:

  • SSH access works
  • Outbound internet access works (from private subnet via NAT)
  • Firewall rules behave as expected

Real-World Example: Simple Web App Setup

Let’s say you’re deploying a basic web application:

  • Web server in a public subnet
  • Database server in a private subnet

The web server handles incoming traffic, while the database remains isolated. Only internal traffic is allowed between them.

This design reduces exposure and follows a clean separation model that scales well as your environment grows.

Common Mistakes to Avoid

  • Using overly small CIDR ranges
  • Placing databases in public subnets
  • Overly permissive security rules
  • Skipping compartment structure
  • Not planning for future scaling

But this is where it matters: fixing these later often requires rebuilding parts of your environment.

When to Get Help

If you’re building something beyond a simple test environment—like production workloads or multi-tier applications—it’s worth getting your architecture reviewed early.

A small adjustment in network design or security configuration can save hours of troubleshooting later.

Summary

This Oracle Cloud Infrastructure tutorial gives you a practical starting point: organize with compartments, design your VCN carefully, separate subnets, and control traffic with gateways and security rules.

Once this foundation is in place, everything else—compute, databases, scaling—becomes much easier to manage.

If you want help designing or reviewing your OCI setup before it grows complex, you can Get OCI setup and ongoing support and build your environment with confidence.

About the Author
Mariusz Antonik

Oracle Cloud Infrastructure expert and consultant specializing in database management and automation.

All Tags
#Advanced #alerts #Bash #bash cpu monitoring script #bash monitoring #bash scripting #Beginner #Best Practices #block volume backup #Capacity Planning #cloud backup strategy #cpu bottleneck #CPU Monitoring #cpu monitoring linux #cpu monitoring script linux #cpu trends #cpu usage trends #cpu usage trends linux #create oracle db system in oci #cron cpu monitoring #cron cpu monitoring linux #cron jobs #database monitoring #database performance #detect slow queries mysql #devops #disk capacity planning server #disk forecasting linux #disk growth trend linux #Disk Monitoring #disk usage #disk usage script linux #disk usage trends #Early Detection #easy infrastructure monitoring #free-tier #Guide #health dashboards #Health Reporting #historical server monitoring #how to monitor cpu usage linux #infrastructure #infrastructure health #infrastructure health dashboard #infrastructure health reporting #infrastructure monitoring #infrastructure monitoring report #infrastructure trends #infrastructure trends monitoring #Infrastructure Visibility #lightweight linux monitoring #lightweight monitoring #linux #linux administration #linux cpu monitoring #linux cpu usage #linux disk capacity planning #linux disk usage #Linux monitoring #linux monitoring setup #linux monitoring tools #linux performance #linux performance monitoring #linux server #linux server monitoring #linux servers #linux storage #linux tools #low maintenance monitoring #monitor cpu usage over time linux #monitor linux server health #monitor server trends #monitor small production server #monitoring without complexity #MySQL #mysql health reporting #MySQL monitoring #mysql optimization #MySQL Performance #mysql performance degradation #mysql performance monitoring #mysql performance trends #mysql query performance issues #mysql server monitoring #mysql slow queries #mysql slow query analysis #mysql slow query monitoring #mysql trends #mysql-health #networking #nsg #OCI #oci backup #oci bastion tutorial #oci block volume #oci infrastructure as code #OCI monitoring #oci networking #oci oracle database private subnet setup #oci oracle database tutorial #oci security #oci setup guide #oci terraform tutorial #oci tutorial for beginners #oci vcn terraform #oci virtual machine db system guide #oracle base database service tutorial #oracle cloud bastion #oracle cloud free tier tutorial #oracle cloud infrastructure step by step #oracle cloud infrastructure tutorial #oracle cloud storage #oracle database on oci setup #oracle-cloud #Performance #Performance Degradation #performance monitoring #performance trend monitoring #performance trends #plan disk growth server #practical server monitoring #predict disk usage growth #private instance access #query optimization #Security #security lists #server health #server health reporting #server health weekly report #server monitoring #Server Performance #server trend analysis #server-trends #simple cpu monitoring linux #simple linux monitoring #simple monitoring small business #simple monitoring system #simple ops monitoring #slow queries #slow query reporting mysql #small business infrastructure #small business IT #small business servers #small infrastructure monitoring #small server monitoring #ssh bastion #storage capacity planning linux #storage monitoring #subnets #System Health #system health reporting #terraform oci compute #terraform oracle cloud infrastructure #Trend Monitoring #trend-analysis #trends #Tutorial #vcn