Veröffentlicht am Freitag, 2 Juni 2023 Docker: Install Oracle 23cFREE and APEX 23.1 Kategorie Oracle (Database & Co) Wie installiert man Oracle 23cFREE and APEX 23.1 mit Docker?Konfigurationsmöglichkeiten für Podman (Docker) siehe hier.Oracle 23cFREE docker pull container-registry.oracle.com/database/free:latest docker volume create --opt type=none --opt o=bind --opt device=<my_local_path> OracleDBData # docker run -d -it --name 23cfree -p <host port>:1521 -p <host port>:5500 -p <host port>:8080 -p <host port>:8443 -e ORACLE_PWD=<MY_PW> -v OracleDBData:/opt/oracle/oradata container-registry.oracle.com/database/free:latest docker run -d -it --name 23cfree -p 8521:1521 -p 8500:5500 -p 8023:8080 -p 9043:8443 -e ORACLE_PWD=E -v OracleDBData:/opt/oracle/oradata container-registry.oracle.com/database/free:latestAPEX 23.11. Enter bashdocker exec -it 23cfree /bin/bash2. Get APEXcurl -o apex-latest.zip https://download.oracle.com/otn_software/apex/apex-latest.zip3. Unpack and enter APEXunzip apex-latest.zip rm apex-latest.zip cd apex 4. Let your database settle for at least a few minutes5. Open SQL*Plus with sqlplus / as sysdbasqlplus / as sysdba 6. Run the APEX installeralter session set container = freepdb1; @apexins.sql sysaux sysaux temp /i/ If you get the PLS-00201: identifier ‘SYS.DBMS_DB_VERSION’ must be declared an error, just keep re-trying this step until it works.7. Unlock the public user accountalter user apex_public_user account unlock; alter user apex_public_user identified by E;8. Change the password@apxchpwd.sql exit 9. Create the following foldersmkdir /home/oracle/software mkdir /home/oracle/software/apex mkdir /home/oracle/software/ords mkdir /home/oracle/scripts 10. Copy the APEX images & change the foldercp -r /home/oracle/apex/images /home/oracle/software/apex cd /home/oracle/ 11. Install sudo & nanosu dnf update dnf install sudo -y dnf install nano -y 12. Edit the sudo listnano /etc/sudoers In the Defaults section, add: Defaults !lectureAt the very end of the file add: oracle ALL=(ALL) NOPASSWD: ALL 13. Install Javadnf install java-17-openjdk -y 14. Setup ORDS folders & check JAVAmkdir /etc/ords mkdir /etc/ords/config mkdir /home/oracle/logs chmod -R 777 /etc/ords java -version openjdk version "17.0.7" 2023-04-18 LTS15. Whilst still as su, install ORDSyum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL8/oracle/software/x86_64 dnf install ords -y 16. Configure ORDSexport _JAVA_OPTIONS="-Xms512M -Xmx512M" ords --config /etc/ords/config install The configuration you should use looks like this:Installation Type > Choose option [2] Enter Connection Type > Choose option [1] Enter host name > Enter listen port > Enter service name > Enter administrator username > SYS password > E default tablespace > Enter temp tablespace > Enter features > Enter Start ORDS > [1] Enter <-- Standalone Mode protocol > [1] < http port > [1] <-- 8080 Static Resources > /home/oracle/software/apex/images Oracle REST Data Services version : 23.1.3.r1371032 Oracle REST Data Services server info: jetty/10.0.12 Oracle REST Data Services java info: OpenJDK 64-Bit Server VM 17.0.7+7-LTS17. Do a quick test and close ORDShttp://localhost:8023/ords/18. Create a start_ords.sh filenano /home/oracle/scripts/start_ords.shexport ORDS_HOME=/usr/local/bin/ords export _JAVA_OPTIONS="-Xms512M -Xmx512M" LOGFILE=/home/oracle/logs/ords-`date +"%Y""%m""%d"`.log nohup ${ORDS_HOME} --config /etc/ords/config serve >> $LOGFILE 2>&1 & echo "View log file with : tail -f $LOGFILE"19. Create a stop_ords.sh filenano /home/oracle/scripts/stop_ords.shkill `ps -ef | grep [o]rds.war | awk '{print $2}'` manual run viash /home/oracle/scripts/start_ords.sh sh /home/oracle/scripts/stop_ords.sh20. Create an ORDS startup scriptnano /opt/oracle/scripts/startup/01_auto_ords.sh sudo sh /home/oracle/scripts/start_ords.sh 21. Exit from root and docker bashexit exit 23. If you are using Docker on Unix, enable lingerPrevent user processes from being killed once the session is completed sudo loginctl enable-linger $UID24. Stop your Docker container, and then start it againdocker restart 23cfree 25. Wait a moment, and try logging inhttp://localhost:8023/ords/Workspace > INTERNAL Username > ADMIN Password > Your Complex Password Quelle: https://pretius.com/blog/oracle-apex-docker-ords