Skip to Main Content

 
Titelbild Muniqsoft Training

Auswahl  

Komplett Übersicht aller Oracle Tipps

Oracle 23ai FREE on Debian (Bookworm) Installation 

Oracle
DBA
RDBMS 23.1
22.08.23 (MP)
05.04.25(MP)

Passende Schulungen zum Thema

Installation of Oracle 23ai FREE on Debian

The following installation is not supported by Oracle, but since the 23ai FREE Edition won’t be supported anyway, let's get started...

Create a user (can also be done through the preinstall script), but here you have more flexibility...

addgroup --system oinstall
addgroup --system dba
adduser --system --ingroup oinstall --shell /bin/bash oracle
usermod -d /home/oracle oracle
chown -R oracle:oinstall /home/oracle
adduser -d /home/oracle oracle dba

Preinstall a few packages:

apt-get install alien rlwrap

REM Download the two files from the URL: https://www.oracle.com/database/free/download/

Red Hat 8 / Rocky Linux 8 / Alma Linux 8 / Oracle Linux 8
wget https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-23ai-1.0-2.el8.x86_64.rpm
wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el8.x86_64.rpm

Red Hat 9 / Rocky Linux 9 / Alma Linux 9 / Oracle Linux 9
https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-23ai-1.0-2.el9.x86_64.rpm
wget https://download.oracle.com/otn-pub/otn_software/db-free/oracle-database-free-23ai-1.0-1.el9.x86_64.rpm

REM Convert the .rpm files to .deb files:

alien --script oracle-database-preinstall*.rpm
alien --script oracle-database-free-23ai*.rpm

Attention, it takes a looooong time #### do not interrupt ####
It took almost 1 hour for us!
During this time, you will constantly get the warning:
warning: oracle-database-free-23ai-1.0-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ad986da3: NOKEY
Or, if you're bored, you can keep an eye on the size of the target folder:

du -hs oracle-database-free-23ai-1.0

There should be about 11 GB as a result.

While waiting for the conversion to finish, you can already (in a second session) edit/adjust the .bash_profile file:

cat << EOF > /home/oracle/.bash_profile
    export TERM=vt220
    export EDITOR=vi
    export PS1="[\u@\h:\w]>"
    export DISPLAY=:0.0
    export ORACLE_BASE=/opt/oracle
    export ORACLE_HOME=\$ORACLE_BASE/product/23ai/dbhomeFree
    export ORACLE_SID=FREE
    export ORACLE_INSTANCE=free
    export ORACLE_TERM=vt220
    export ORA_NLS10=\$ORACLE_HOME/nls/data
    export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$ORACLE_HOME/lib
    export NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252
    export PATH=\$ORACLE_HOME/bin:\$PATH:/usr/sbin:/usr/ccs/bin
    alias cdo="cd \$ORACLE_HOME; pwd"
    alias cdd="cd \$ORACLE_BASE/oradata"
    alias cda="cd \$ORACLE_BASE/diag/rdbms/\$ORACLE_INSTANCE/\$ORACLE_SID/trace; pwd"
    alias cdn="cd \$ORACLE_HOME/network/admin; pwd"
    alias cde="cd \$ORACLE_BASE/admin/\$ORACLE_SID/dpdump"
    alias sp="\$ORACLE_HOME/bin/sqlplus '/ as sysdba'"
    alias l="ls -l"
    alias ll="ls -la"
    alias ipconfig="/sbin/ifconfig | grep Bcast"
    echo Folgende Einstellungen wurden gesetzt:
    env | grep ORA
    ps aux | grep [t]omcat | awk '{print "Tomcat-Prozess:" $2}'
    ps aux | grep [x]e_pmon | awk '{print "Oracle-Prozess:" $2}'
    ps aux | grep [t]ns | awk '{print "Listener-Prozess:" $2}'
    EOF

When the conversion process is complete, proceed with:

apt update 
apt install libaio* 
apt install ./oracle-database-preinstall-23ai_1.0-1.5_amd64.deb 
apt install ./oracle-database-free-23ai_1.0-2_amd64.deb 

Then continue with:

Note: During the automatic installation, the listener port 1539 was used and then the process was interrupted.

You can set the port yourself in the following file:

vi /etc/sysconfig/oracle-free-23ai.conf
LISTENER_PORT=1521
/etc/init.d/oracle-free-23ai configure 

Enter a nice long password twice, for example, "SuperSecretPassword123!WithUnicornAndPizza!"

 
/etc/init.d/oracle-free-23ai configure
Oracle Net Listener configured.
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database FREE.
Enter SYS user password: 
***
Enter SYSTEM user password: 
****
Enter PDBADMIN User Password: 
*****
Prepare for db operation
7% complete
Copying database files
29% complete
Creating and starting Oracle instance
30% complete
33% complete
36% complete
39% complete
43% complete
Completing Database Creation
47% complete
49% complete
50% complete
Creating Pluggable Databases
54% complete
71% complete
Executing Post Configuration Actions
93% complete
Running Custom Scripts
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/FREE.
Database Information:
Global Database Name:FREE
System Identifier(SID):FREE
Look at the log file "/opt/oracle/cfgtoollogs/dbca/FREE/FREE.log" for further details.
Connect to Oracle Database using one of the connect strings:
    Pluggable database: pve4/FREEPDB1
    Multitenant container database: pve4

On the first attempt, there was unfortunately no successful completion, and we received the error:

Listener configuration failed. Check log '/opt/oracle/cfgtoollogs/netca/netca_configure_out.log' for more details.

And it says inside:

The information provided for this listener is currently in use by other software on this computer.

In the listener.ora file ($ORACLE_HOME/network/admin), there is a port 1539, hmm, I don't recognize that, Oracle usually uses port 1521.
Or, as described above, you may have already changed the port, in which case everything should work fine.

Now, you can start using your SQL / DBA / APEX skills... or maybe first take a course with us?
No problem, with 44 different courses, there is certainly something for you!