Oracle Apex 21.1 Installation Step By Step In Linux

Okay, picture this: you're promised a super cool new Lego set for your birthday. You’re hyped! You imagine building it, displaying it proudly… But then you get the box and, uh oh, no instructions. Just a jumble of colourful bricks staring back at you. That feeling? Yeah, that’s how I felt diving into Oracle APEX installations the first time. A powerful tool, for sure, but the initial setup can feel like navigating a brick avalanche. Except, unlike Legos, a missed step can break things. So, let’s build this APEX installation together, with instructions. No more brick-related anxiety!
This guide is your step-by-step walkthrough for installing Oracle APEX 21.1 on a Linux system. We’ll be using the command line, so dust off your terminal skills! Don't worry, it’s not rocket science. I promise. (Famous last words, right?)
Prerequisites: The Tools of the Trade
Before we get our hands dirty, let's make sure we have everything we need. Think of it as gathering your ingredients before baking a cake. Essential stuff! And please, have fun. Installing stuff, as tedious as it may be, is the first step into a grand and marvelous journey.
Must Read
- An Oracle Database: Obviously! This is where APEX will live. Ensure it's up and running and properly configured. We're assuming you have a database instance ready to go. If not, that’s a whole other adventure (and a whole other article!).
- Oracle Instant Client: This is how APEX communicates with the database. Download the appropriate version for your Linux distribution from the Oracle website. You'll need the basic and SQLPlus packages.
- SQLPlus: Bundled with Oracle Instant Client, but worth double-checking. We’ll be using this to run SQL scripts.
- APEX 21.1 Installation Files: Download these from the Oracle website. It’s a zip file.
- Root Access: You'll need sudo privileges to install some of the required packages and configure environment variables.
Got all that? Great! Let’s move on.
Step 1: Unzipping and Unveiling APEX
First things first, transfer the APEX installation zip file to your Linux server. I usually drop it in a convenient location like /opt. Then, using your terminal, navigate to that directory and unzip the file.
cd /opt
unzip apex_211_en.zip
This will create a directory named apex (or something similar, depending on the zip file name) containing all the APEX installation files.

Step 2: Configuration: The Key to Communication
Now, we need to tell APEX how to talk to our database. This involves configuring the sqlplus environment. Add the Oracle Instant Client libraries to your LD_LIBRARY_PATH environment variable.
Open your ~/.bashrc or ~/.bash_profile file (or whichever file your shell uses for environment variables) and add the following lines:
export ORACLE_HOME=/path/to/instantclient
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME:$PATH
Replace /path/to/instantclient with the actual path to your Oracle Instant Client directory. Save the file and then run source ~/.bashrc (or source ~/.bash_profile) to apply the changes. (Don’t skip this step! I've messed this up more times than I care to admit.)

Step 3: The Main Event: Installing APEX
Navigate to the apex directory (the one you unzipped earlier) in your terminal.
cd /opt/apex
Now, connect to your database as the SYS user using SQLPlus. This is crucial. You *must be connected as SYS with SYSDBA privileges.
sqlplus sys as sysdba
Enter the password for the SYS user when prompted. (Hint: It's probably 'change_on_install' or something similar if you haven't changed it.)
Now, run the apexins.sql script. This script installs APEX into your database. The syntax is:

@apexins.sql SYSAUX TEMP /i/
SYSAUXis the tablespace where APEX metadata will be stored.TEMPis the temporary tablespace./i/is the virtual image directory. This is important for APEX to find its static files (images, CSS, JavaScript). If you intend to use a different alias in your web server configuration, use that here.
The installation process can take a while (10-20 minutes, maybe even longer depending on your hardware). Grab a coffee, stretch your legs, and resist the urge to interrupt it.
Step 4: Configuring the Web Server
APEX needs a web server to serve its pages. While Oracle REST Data Services (ORDS) is the preferred method, this guide won't cover that in detail. You can configure APEX with the embedded PL/SQL gateway (EPG), but it is not recommended for production environments.
Step 5: Post-Installation Tasks
After the installation completes (and hopefully without errors!), you'll want to unlock the APEX_PUBLIC_USER account and change its password.

ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY your_new_password;
Replace your_new_password with a strong, secure password. Then, exit SQLPlus.
Step 6: Accessing APEX
With the web server configured, you can now access APEX through your web browser. The URL will depend on your web server configuration. For example, if you are using the embedded PL/SQL gateway, it might be something like http://your_server:8080/apex.
Log in with the ADMIN user (password is usually set during installation if you chose to set one; otherwise, you may need to set it manually via SQLPlus). Welcome to APEX! You’ve successfully installed it!
And that's it! You've conquered the APEX installation beast. Now go forth and build some awesome applications!
