Skip to main content

Installation Oracle APEX 26.1

1. TBD - Oracle 26-AI Free
!/bin/bash

# Export Environments...
nano /home/oracle/.bash_profile /root/.bash_profile
## ####################################################
  export VISUAL=nano
  export EDITOR=nano
  
  # User specific environment and startup programs
  export NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252
  
  PATH=$PATH:$HOME/bin
  export PATH
  
  # Java
  export JAVA_HOME=/usr/java/latest
  
  export CATALINA_HOME=/opt/tomcat/latest
  export CATALINA_BASE=/opt/tomcat/config
  
  # Oracle Settings
  export ORACLE_SID=FREE
  export ORACLE_APEX_SID=PSS
  export ORACLE_APEX_TST_SID=PSS_TEST
  export ORACLE_BASE=/opt/oracle
  export ORACLE_HOME=$ORACLE_BASE/product/26ai/dbhomeFree
  export APEX_HOME=$ORACLE_BASE/product/apex
  export ORDS_CONFIG=/etc/ords/config
  export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
  export NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252
  
  # SQLPLUS
  export SQLPLUS=$ORACLE_HOME/bin/sqlplus
  alias sp="$ORACLE_HOME/bin/sqlplus sys/Fx#6593376@oracle.pss:1521 as sysdba"
  
  # ORDS
  export ORDS_CONFIG=/etc/ords/config

## ####################################################

# Download and Install
wget https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/compat-openssl10-1.0.2o-3.el8.x86_64.rpm
dnf localinstall -y compat-openssl10-1.0.2o-3.el8.x86_64.rpm

wget https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-ai-database-preinstall-26ai-1.0-1.el8.x86_64.rpm
dnf localinstall -y oracle-ai-database-preinstall-26ai-1.0-1.el8.x86_64.rpm

wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-ai-database-free-26ai-23.26.2-1.el8.x86_64.rpm

cp -f /*.rpm /pss

dnf localinstall -y oracle-ai-database-free-26ai-23.26.2-1.el8.x86_64.rpm


# Configuration
/etc/init.d/oracle-free-26ai configure <<EOF
Fx#6593376
Fx#6593376
EOF

systemctl enable oracle-free-26ai
service oracle-free-26ai start
service oracle-free-26ai status
2. Java
3.1 Java
mkdir /usr/java
dnf -y update && dnf install -y java-21-openjdk.x86_64
update-alternatives --config java
-->   #1 (java-21-openjdk)

cd /usr/java
ln -s /usr/lib/jvm/java-21-openjdk-21.0.11.0.10-1.0.1.el8.x86_64/ latest
ln -s /usr/java /java

java --version
3. CREATE New PDBS

CREATE New PDBS

sqlplus /nolog
conn sys as sysdba

-- DROP PLUGGABLE DATABASE freepdb1;

CREATE PLUGGABLE DATABASE pss_test ADMIN USER admin IDENTIFIED BY "Fx#6593376" FILE_NAME_CONVERT = ('/opt/oracle/oradata/FREE/pdbseed/', '/opt/oracle/oradata/FREE/pss_test/');
CREATE PLUGGABLE DATABASE pss ADMIN USER admin IDENTIFIED BY "Fx#6593376" FILE_NAME_CONVERT = ('/opt/oracle/oradata/FREE/pdbseed/', '/opt/oracle/oradata/FREE/pss/');

ALTER PLUGGABLE DATABASE pss_test OPEN READ WRITE;
ALTER PLUGGABLE DATABASE pss OPEN READ WRITE;

ALTER PLUGGABLE DATABASE pss_test SAVE STATE;
ALTER PLUGGABLE DATABASE pss SAVE STATE;
Rename Pluggable Database to "pss"

Rename Pluggable Database to "pss"

sqlplus /nolog
conn sys as sysdba

show pdbs

alter pluggable database freepdb1 close;
alter pluggable database freepdb1 open restricted;
alter session set container=freepdb1;
alter pluggable database rename global_name to pss;
alter pluggable database close immediate;
alter pluggable database open;

show pdbs

ALTER SESSION SET CONTAINER=PSS;
ALTER USER APEX_LISTENER IDENTIFIED BY Fx#6593376 ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY Fx#6593376 ACCOUNT UNLOCK;
ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY Fx#6593376 ACCOUNT UNLOCK;
exit;
4. Oracle Apex 26.1

Download / Vorbereitung

!/bin/bash
cd /
echo "Downloading APEX..."
wget https://download.oracle.com/otn_software/apex/apex_26.1.zip
echo "Unzipping APEX..."
unzip -q /apex*.zip
mv /apex /opt/oracle/product/
ln -s /opt/oracle/product/apex /apex

rm -f /apex*.zip

Quelle: https://medium.com/@vsivakumar275/apex-26-1-installation-and-configuration-in-oracle-26ai-database-fb332e83fbc5

Installation

je PDB (PSS und PSS_TEST)

cd /opt/oracle/product/apex 
sqlplus /nolog
conn sys as sysdba
ALTER USER ANONYMOUS ACCOUNT UNLOCK;
ALTER SESSION SET CONTAINER=PSS;
--ALTER SESSION SET CONTAINER=PSS_TEST;

CREATE TABLESPACE apex DATAFILE '/opt/oracle/oradata/FREE/pss/apex.dbf' SIZE 100M AUTOEXTEND ON NEXT 1M;
--CREATE TABLESPACE apex DATAFILE '/opt/oracle/oradata/FREE/pss_test/apex_test.dbf' SIZE 100M AUTOEXTEND ON NEXT 1M;

@apexins.sql APEX APEX TEMP /i/

Thank you for installing Oracle APEX 26.1.0

Oracle APEX is installed in the APEX_260100 schema.

The structure of the link to the Oracle APEX Administration Services is as follows:
http://host:port/ords/apex_admin

The structure of the link to the Oracle APEX development environment is as follows:
http://host:port/ords/apex

@apxchpwd.sql

## #######################
## #######################
  ...set_appun.sql
  ================================================================================
  This script can be used to change the password of an Oracle APEX
  instance administrator. If the user does not yet exist, a user record will be
  created.
  ================================================================================
  Enter the administrators username [ADMIN]
  User "ADMIN" does not yet exist and will be created.
  Enter ADMIN's email [ADMIN] s.geberl@pss-app.de
  Enter ADMIN's password [] Fx#6593376Fx#6593376
  Created instance administrator ADMIN.
## #######################
## #######################

@apex_rest_config.sql

## #######################
## #######################
  Enter a password for the APEX_LISTENER user          [] Fx#6593376
  Enter a password for the APEX_REST_PUBLIC_USER user  [] Fx#6593376
  ...set_appun.sql
  ...setting session environment
  ...create APEX_LISTENER and APEX_REST_PUBLIC_USER users
  ...grants for APEX_LISTENER and ORDS_METADATA user
## #######################
## #######################

-- EXEC DBMS_XDB.sethttpport(8080);
exec dbms_xdb.sethttpport(0);
5.1. Tomcat

Download / Vorbereitung

cd /

echo "Downloading Tomcat..."
wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.120/bin/apache-tomcat-9.0.120.tar.gz

Struktur

useradd tomcat
passwd tomcat
	# Fx#6593376
    
mkdir -p /opt/tomcat
chown tomcat:tomcat /opt/tomcat -R

su - tomcat
cd /opt/tomcat/
mkdir versions
cd versions

echo "Unpacking Tomcat..."
tar xzf /apache-tomcat-9.0.120.tar.gz
 
#aber dann verlinken!
cd /opt/tomcat/
ln -s versions/apache-tomcat-9.0.120/ tomcat
ln -s versions/apache-tomcat-9.0.120/ latest

#Konfiguration außerhalb der Software speichern
mkdir /opt/tomcat/config
cp -r /opt/tomcat/latest/conf     /opt/tomcat/config/
cp -r /opt/tomcat/latest/logs     /opt/tomcat/config/
cp -r /opt/tomcat/latest/temp     /opt/tomcat/config/
cp -r /opt/tomcat/latest/webapps  /opt/tomcat/config/
cp -r /opt/tomcat/latest/work     /opt/tomcat/config/
mkdir /opt/tomcat/config/run

exit
ln -s /opt/tomcat/ /tomcat

Env

nano ~/.bash_profile
   export JAVA_HOME=/usr/java/latest
   export CATALINA_HOME=/opt/tomcat/latest
   export CATALINA_BASE=/opt/tomcat/config

echo " Ausfuehren..."
source ~/.bash_profile

Service

/etc/systemd/system/tomcat.service 

## ##############################################################
## ##############################################################
## ##############################################################

  [Unit]
  Description=Apache Tomcat Server
  After=syslog.target network.target
  
  [Service]
  Type=forking
  User=tomcat
  Group=tomcat
  
  WorkingDirectory=/opt/tomcat/config
  Environment=JAVA_HOME=/usr/java/latest
  Environment=CATALINA_PID=/opt/tomcat/config/run/tomcat.pid
  Environment=CATALINA_BASE=/opt/tomcat/config
  Environment=CATALINA_HOME=/opt/tomcat/latest
  Environment=JAVA_OPTS=-Djava.security.egd=file:///dev/urandom
  Environment=CATALINA_OPTS=-Xms1024m
  Environment=CATALINA_OPTS=-Xmx2048m
  
  ExecStart=/opt/tomcat/latest/bin/catalina.sh start
  ExecStop=/opt/tomcat/latest/bin/catalina.sh stop
  RestartSec=10
  Restart=always
  
  [Install]
  WantedBy=multi-user.target
  #After=oracle.service


## ##############################################################
## ##############################################################
## ##############################################################

nano $CATALINA_BASE/conf/server.xml
# Zum Späteren Härten das 127.0.0.1 einkommentieren!
# Aufpassen auf Ein- und Auskommentiere!!!

    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
	<!--                       address="127.0.0.1" /> -->


	<Connector protocol="AJP/1.3"
				   address="127.0.0.1"
				   port="8009"
				   tcpNoDelay="true"
				   maxThreads="400"
				   processorCache="400"
				   acceptCount="350"
				   acceptorThreadCount="2"
				   connectionTimeout="2000"
				   requiredSecret="ORACLEAPEX1234"
				   secretRequired="true"
				   redirectPort="8443" />


nano $CATALINA_BASE/conf/tomcat-users.xml

	<role rolename="manager-gui"/>
	<role rolename="manager-script"/>
	<role rolename="manager-jmx"/>
	<role rolename="manager-status"/>
	<role rolename="admin-gui"/>
	<user username="tomcat" password="Fx#6593376" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui"/>
	<user username="geberlst" password="Fx#6593376" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui"/>



nano $CATALINA_BASE/webapps/manager/META-INF/context.xml
	<!--
	  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
			 allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
	  <Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
	-->


    
firewall-cmd --remove-port=8080/tcp --permanent
firewall-cmd --reload

#Als root
systemctl enable tomcat.service
systemctl start tomcat.service
systemctl status tomcat.service

rm -f /apache-tomcat*.tar.gz

 

5.2. ORDS

Download / Vorbereitung

echo "Downloading ORDS..."
wget https://download.oracle.com/otn_software/java/ords/ords-latest.zip
echo "Unzipping ORDS..."
unzip -q /ords*.zip

Installation

sudo yum install yum-utils -y
sudo  yum-config-manager --add-repo=https://yum.oracle.com/repo/OracleLinux/OL8/oracle/software/x86_64/
dnf update -y

yum info ords
## ################################################
## ################################################
  Letzte Prüfung auf abgelaufene Metadaten: vor 0:02:42 am Mo 27 Jul 2026 04:20:24 EDT.
  Installierte Pakete
  Name         : ords
  Version      : 26.2.1
  Release      : 1.el8
  Architecture : noarch
  Size         : 191 M
  Quelle       : ords-26.2.1-1.el8.src.rpm
  Repository   : @System
  Aus Paketque : yum.oracle.com_repo_OracleLinux_OL8_oracle_software_x86_64_
  Summary      : Oracle REST Data Services
  URL          : https://www.oracle.com/database/technologies/appdev/rest.html
  Lizenz       : Oracle Free Use Terms and Conditions.
  Description  : Oracle REST Data Services (ORDS) makes it easy to develop modern REST
               : interfaces for relational data in the Oracle Database
## ################################################
## ################################################

dnf install ords -y

#Basis-Konfiguration...
nano /etc/ords/config/global/settings.xml
## ###################################################
## ###################################################
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
  <properties>
  <comment>Saved on Tue Aug 04 20:46:39 UTC 2026</comment>
  <entry key="database.api.enabled">true</entry>
  <entry key="debug.printDebugToScreen">true</entry>
  <entry key="jdbc.InactivityTimeout">1800</entry>
  <entry key="jdbc.MaxLimit">200</entry>
  <entry key="jdbc.TimeoutCheckInterval">60</entry>
  <entry key="misc.defaultPage">apex</entry>
  <entry key="security.externalSessionTrustedOrigins">https://my.pss-app.de</entry>
  <entry key="security.forceHTTPS">false</entry>
  <entry key="security.httpsHeaderCheck">X-Forwarded-Proto: https</entry>
  <entry key="standalone.doc.root">/etc/ords/config/global/doc_root</entry>
  <entry key="standalone.http.port">8070</entry>
  <entry key="standalone.static.path">/opt/oracle/product/apex/images</entry>
  <entry key="standalone.static.path">/opt/oracle/product/apex/images</entry>
  </properties>
## ###################################################
## ###################################################

nano /etc/ords/config/databases/default/pool.xml
## ###################################################
## ###################################################
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
  <properties>
  <comment>Saved on Mon Aug 03 13:35:48 UTC 2026</comment>
  <entry key="db.connectionType">tns</entry>
  <entry key="db.hostname">oracle.pss</entry>
  <entry key="db.port">1521</entry>
  <entry key="db.servicename">FREE</entry>
  <entry key="db.username">ORDS_PUBLIC_USER</entry>
  <entry key="feature.sdw">true</entry>
  <entry key="plsql.gateway.mode">proxied</entry>
  <entry key="restEnabledSql.active">true</entry>
  <entry key="security.requestValidationFunction">ords_util.authorize_plsql_gateway</entry>
  <entry key="standalone.http.port">8070</entry>
  <entry key="db.tnsDirectory">/opt/oracle/product/26ai/dbhomeFree/network/admin</entry>
  </properties>
## ###################################################
## ###################################################

# Je pluggable Database (PSS, PSS_TEST)
ords --config /etc/ords/config install

#      Dazu könnte auch deinstalliert werden!
#      ords --config /etc/ords/config uninstall

# ACHTUNG: Ords muss in PDB (PSS) installiert werden!!!

## Einstellungen, wie ...
# #basic
# #localhost
# äPoolname (PSS,PSS_TEST)
# #PDB (PSS,PSS_TEST)
# #ORDS_PUBLIC-USER-Passwort
# ...
# Können hier vorgenommen werden

# Ergebnis sollten die beiden Pools sein...

nano /etc/ords/config/databases/pss/pool.xml
## ###################################################
## ###################################################
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
  <properties>
  <comment>Saved on Tue Aug 04 20:46:39 UTC 2026</comment>
  <entry key="db.connectionType">basic</entry>
  <entry key="db.hostname">localhost</entry>
  <entry key="db.port">1521</entry>
  <entry key="db.servicename">pss</entry>
  <entry key="db.username">ORDS_PUBLIC_USER</entry>
  <entry key="feature.sdw">true</entry>
  <entry key="plsql.gateway.mode">proxied</entry>
  <entry key="restEnabledSql.active">true</entry>
  <entry key="security.requestValidationFunction">ords_util.authorize_plsql_gateway</entry>
  </properties>
## ###################################################
## ###################################################

nano /etc/ords/config/databases/pss_test/pool.xml
## ###################################################
## ###################################################
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
  <properties>
  <comment>Saved on Tue Aug 04 20:43:08 UTC 2026</comment>
  <entry key="db.connectionType">basic</entry>
  <entry key="db.hostname">localhost</entry>
  <entry key="db.port">1521</entry>
  <entry key="db.servicename">pss_test</entry>
  <entry key="db.username">ORDS_PUBLIC_USER</entry>
  <entry key="feature.sdw">true</entry>
  <entry key="plsql.gateway.mode">proxied</entry>
  <entry key="restEnabledSql.active">true</entry>
  <entry key="security.requestValidationFunction">ords_util.authorize_plsql_gateway</entry>
  </properties>
## ###################################################
## ###################################################

Variante 1: Starten des Standalonme-Modes:

# Einmaliges Starten des Standalone-Modes...
ords --config /etc/ords/config serve

## --> Konfiguration des Standalone-Modus als Permanent-Betrieb
nano /etc/systemd/system/ords-apex.service

## ##########################################
## ##########################################
  [Unit]
  Description=Oracle REST Data Services
  After=network.target
  
  [Service]
  Type=simple
  GuessMainPID=no
  PIDFile=/var/run/ords/pid
  WorkingDirectory=/opt/oracle/ords/
  SuccessExitStatus=143
  ExecStart=/usr/bin/java -jar -Xms2048M -Xmx6144M /opt/oracle/ords/ords.war --config /etc/ords/config serve
  ExecStartPre=/bin/sleep 20
  Restart=always
  RestartSec=15
  
  [Install]
  WantedBy=multi-user.target
  After=oracle-free-26ai.service
## ##########################################
## ##########################################

systemctl daemon-reload

# Permanentes starten des ORDS im StandalonmeModes...
systemctl enable ords-apex --now
service ords-apex start
service ords-apex status

Variante 2: Deployment in Tomcat:
Stand 08/2026 - ohne Funktion...

# Erstellen der Tomcat-WAR (Deployment)
ords --config /etc/ords/config/ war /opt/tomcat/config/webapps/apex.war
ords --config /etc/ords/config/ war /opt/tomcat/config/webapps/ords.war

# Kopieren der Images-Folders für Tomcat
mkdir -p /opt/tomcat/config/webapps/i
\cp /opt/oracle/product/apex/images/* -Rf /opt/tomcat/config/webapps/i
# Oder
rm -f /opt/tomcat/config/webapps/i
ln -s /opt/oracle/product/apex/images/ /opt/tomcat/config/webapps/i
chown tomcat:tomcat /opt/tomcat/config/webapps/i -Rf

# Permanentes starten des Tomcats...
systemctl enable tomcat --now
service tomcat start
service tomcat status


6. Patching Apex / Updates

Download / Vorbereitung

echo "Downloading Apex-Patch / Update..."

# Achtung: URL nicht vollständig
url="https://www.oracle.com/tools/downloads/apex-downloads/[[[latest_patch]]].zip"

rm -f /tmp/apex-patch.zip
wget $url -o /tmp/apex-patch.zip

echo "Unzipping Patch..."
# unzip p39179920_261_Generic.zip
unzip -q /tmp/apex-patch.zip

Installation

Bsp: https://updates.oracle.com/Orion/Services/download?type=readme&aru=28918819

cd /tmp/[[apex-patch]]

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

sqlplus /nolog
conn sys as sysdba

#Vormals freepdb1
alter session set container=PSS;

@catpatch.sql

# Images kopieren...
\cp -rf images/* /opt/oracle/product/apex/images

reboot
7. Backup-Strategie

GIT: https://gitlab.pss-app.de/database/pss-oracle 

 

 

8. Troubleshooting

ORDS: default => INVALID

... 

ORDS / APEX User entsperren

 

alter user ANONYMOUS account unlock;
alter user ORDS_PUBLIC_USER account unlock;
alter user APEX_PUBLIC_USER account unlock;
alter user APEX_LISTENER account unlock;
alter user APEX_REST_PUBLIC_USER account unlock;
alter user ORDS_PUBLIC_USER identified by Fx#6593376;
alter user APEX_PUBLIC_USER identified by Fx#6593376;
alter user APEX_LISTENER identified by Fx#6593376;
alter user APEX_REST_PUBLIC_USER identified by Fx#6593376;