Oracle Database XE installieren (AlmaLinux/CentOS): Unterschied zwischen den Versionen

Aus RT-Wiki - IT-Notizbuch
Zur Navigation springen Zur Suche springen
KKeine Bearbeitungszusammenfassung
Zeile 50: Zeile 50:
chown oracle: -R /opt/apex
chown oracle: -R /opt/apex
cd /opt/apex
cd /opt/apex
</syntaxhighlight><syntaxhighlight lang="bash">
</syntaxhighlight>Installation starten<syntaxhighlight lang="bash">
su oracle
su oracle
sqlplus /nolog
sqlplus /nolog
Zeile 56: Zeile 56:
Enter password: SYSTEM_password
Enter password: SYSTEM_password
SQL> @apxsilentins.sql SYSAUX SYSAUX TEMP /i/ Passw0rd!1 Passw0rd!2 Passw0rd!3 Passw0rd!4
SQL> @apxsilentins.sql SYSAUX SYSAUX TEMP /i/ Passw0rd!1 Passw0rd!2 Passw0rd!3 Passw0rd!4
</syntaxhighlight>Der SQL Befehl hat folgendes Schema:<syntaxhighlight lang="bash">
@apxsilentins.sql <tablespace_apex> <tablespace_files> <tablespace_temp> <images> <password_apex_pub_user> <password_apex_listener> <password_apex_rest_pub_user> <password_internal_admin>
</syntaxhighlight>
</syntaxhighlight>
* <code>tablespace_apex</code> ist der Name des Tablespace für den Oracle Application Express 'application' Benutzer.
* <code>tablespace_files</code> ist der Name des Tablespace für den Oracle Application Express 'files' Benutzer.
* <code>tablespace_temp</code> ist der Name des temporären Tablespace.
* <code>images</code> ist der virtuelle Ordner für die Oracle Application Express images. Für gewöhnlich '/i/'
* <code>password_apex_pub_user</code> ist das Passwort für den Account '''APEX_PUBLIC_USER.'''
* <code>password_apex_listener</code> ist das Passwort für den Account '''APEX_LISTENER'''.
* <code>password_apex_rest_pub_user</code> ist das Passwort für den Account '''APEX_REST_PUBLIC_USER'''.
* <code>password_internal_admin</code> ist das Passwort für den Instanz-Administrator '''ADMIN'''.

Version vom 29. Juli 2022, 09:07 Uhr

Oracle Database Express installieren

Abhängigkeiten installieren

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

Oracle Database XE https://www.oracle.com/database/technologies/xe-downloads.html

wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm
dnf -y localinstall oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm

Bei Bedarf die Konfigurationsdatei anpassen

vi /etc/sysconfig/oracle-xe-21c.conf

Datenbank initialisieren

/etc/init.d/oracle-xe-21c configure
reboot

Oracle beim Neustart automatisch starten

systemctl enable oracle-xe-21c
systemctl start oracle-xe-21c

Zum oracle Benutzer wechseln

su oracle

Die Umgebungsvariablen für Oracle in die .bashrc einfügen

cd ~
vi .bashrc
# User specific aliases and functions
export ORACLE_SID=XE
export ORAENV_ASK=NO
. /opt/oracle/product/21c/dbhomeXE/bin/oraenv


Unter https://localhost:5500/em ist standardmäßig der Enterprise Manager zu erreichen.

Für einen externen Zugriff muss folgender Befehl ausgeführt werden (Als oracle Benutzer):

sqlplus system
Enter password: SYSTEM_password
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);

Mit ss -tulnp | grep LISTEN kann überprüft werden ob der Enterprise Manager auf dem Port 5500 läuft

tcp   LISTEN 0      128                *:5500             *:*    users:(("tnslsnr",pid=2531,fd=18))

Damit der Port von außen erreichbar ist, muss der dieser in der Firewall geöffnet werden:

su -
firewall-cmd --permanent --add-port=5500/tcp
firewall-cmd --reload

APEX installieren (In Arbeit)

https://www.oracle.com/tools/downloads/apex-downloads.html

wget https://download.oracle.com/otn_software/apex/apex_22.1.zip
unzip apex_22.1.zip -d /opt
chown oracle: -R /opt/apex
cd /opt/apex

Installation starten

su oracle
sqlplus /nolog
CONNECT SYS as SYSDBA
Enter password: SYSTEM_password
SQL> @apxsilentins.sql SYSAUX SYSAUX TEMP /i/ Passw0rd!1 Passw0rd!2 Passw0rd!3 Passw0rd!4

Der SQL Befehl hat folgendes Schema:

@apxsilentins.sql <tablespace_apex> <tablespace_files> <tablespace_temp> <images> <password_apex_pub_user> <password_apex_listener> <password_apex_rest_pub_user> <password_internal_admin>
  • tablespace_apex ist der Name des Tablespace für den Oracle Application Express 'application' Benutzer.
  • tablespace_files ist der Name des Tablespace für den Oracle Application Express 'files' Benutzer.
  • tablespace_temp ist der Name des temporären Tablespace.
  • images ist der virtuelle Ordner für die Oracle Application Express images. Für gewöhnlich '/i/'
  • password_apex_pub_user ist das Passwort für den Account APEX_PUBLIC_USER.
  • password_apex_listener ist das Passwort für den Account APEX_LISTENER.
  • password_apex_rest_pub_user ist das Passwort für den Account APEX_REST_PUBLIC_USER.
  • password_internal_admin ist das Passwort für den Instanz-Administrator ADMIN.