Linux上安裝oracle application express

虛擬化平臺192.168.75.26:用戶root,密碼CWXT#net

操做系統:OracleLinux-R6-U3-Server-x86_64-dvd.iso

Oralce數據庫:11.2.0.1x64

JDK:11.2.0.1x64

Tomcat:apache-tomcat-8.5.32

新建虛擬機:192.168.75.1

  • 自定義虛擬機 
  • 名稱:192.168.75.1Oracle11g 
  • 選擇存儲 
  • 虛擬機8 
  • 選擇Oralce Linux 6(64bit) 
  • 若是是CentOS就選CentOS6(64bit) 
  • 雙CPU雙核 
  • 內存4G 
  • 單網卡 
  • SCSI控制器:LSI Logic並行 
  • 建立新的虛擬機 
  • 硬盤32G 
  • 虛擬設備節點 
  • 概覽 
  • 編輯虛擬機設置 
  • DVD加載服務器上的Oracle Linux安裝包 
  • 開機啓動安裝 
    html

  • 固然此處能夠用WMware Workstation鏈接虛擬機進行安裝 

    java

安裝OracleLinux-R6-U3-Server-x86_64-dvd

  • 一路Next 
  • Next 
  • Next 
  • Next 
  • Next 
    linux

  • Next apex18.oracle11g 
    c++

  • Next 192.168.75.1 255.255.255.0 192.168.75.254 DNS:202.194.40.1 
    web

-Next 
sql

-Next root密碼:apex18.1 
數據庫

-Next 
express

  • Next 
  • Next 
    apache

  • Next 
    vim

  • Next 

  • 安裝OracleLinux成功 

首次啓動Linux









  • root用戶登陸,測試網絡,ping www.baidu.com
  • 配置網絡以後,要重啓網絡服務 
    service network restart

安裝oracle11.2.0.1:192.168.75.1

  1. root用戶新建目錄,並上傳11g安裝包

 
  1. [root@apex18 ~]# cd /
  2. [root@apex18 /]# ls
  3. [root@apex18 /]# mkdir /u01
  4. [root@apex18 /]# mkdir /u01/media
  5. [root@apex18 /]# chmod -Rf 777 /u01
  • 把linux.x64_11gR2_database_1of2.zip和linux.x64_11gR2_database_2of2.zip兩個壓縮包解壓到同一個文件夾database11g中,上傳至/u01/media 
  1. 增長交換空間(至關於在windows中的設置虛擬內存)
 
  1. # 檢查當前swap文件
  2. [root@apex18 /]# swapon -s
  3. # 檢查當前磁盤空間
  4. [root@apex18 /]# df
  5. # 建立一個2GB的swap文件
  6. [root@apex18 /]# dd if=/dev/zero of=/swapfile bs=1024 count=2048k
  7. 記錄了2097152+0 的讀入
  8. 記錄了2097152+0 的寫出
  9. 2147483648字節(2.1 GB)已複製,91.2087 秒,23.5 MB/秒
  10. [root@apex18 /]# mkswap /swapfile
  11. [root@apex18 /]# swapon /swapfile
  12. # 再次檢查swap文件
  13. [root@apex18 /]# swapon -s
  14. # 將新的swap文件加入到啓用項
  15. [root@apex18 /]# echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
  16. # 賦予適當權限
  17. [root@apex18 /]# chown root:root /swapfile
  18. [root@apex18 /]# chmod 0600 /swapfile
  1. 安裝依賴包(和windows相比就這點地方噁心)
 
  1. # 設置yum下載後不刪除安裝包
  2. [root@apex18 etc]# vi /etc/yum.conf
  3. keepcache=1
  4. #
  5. yum -y install \
  6. binutils \
  7. compat-libcap1 \
  8. compat-libstdc++-33 \
  9. compat-libstdc++-33*.i686 \
  10. elfutils-libelf-devel \
  11. gcc \
  12. gcc-c++ \
  13. glibc*.i686 \
  14. glibc \
  15. glibc-devel \
  16. glibc-devel*.i686 \
  17. ksh \
  18. libgcc*.i686 \
  19. libgcc \
  20. libstdc++ \
  21. libstdc++*.i686 \
  22. libstdc++-devel \
  23. libstdc++-devel*.i686 \
  24. libaio \
  25. libaio*.i686 \
  26. libaio-devel \
  27. libaio-devel*.i686 \
  28. make \
  29. sysstat \
  30. unixODBC \
  31. unixODBC*.i686 \
  32. unixODBC-devel \
  33. unixODBC-devel*.i686 \
  34. libXp

  • 安裝結束後報錯以下:

    Total 635 kB/s | 149 MB 03:59 
    warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY 
    Retrieving key from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 
    Importing GPG key 0xEC551F03: 
    Userid: "Oracle OSS group (Open Source Software group) " 
    From : http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 
    Running rpm_check_debug 
    ERROR with rpm_check_debug vs depsolve: 
    libkadm5clnt_mit.so.8()(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64 
    libkadm5clnt_mit.so.8(kadm5clnt_mit_8_MIT)(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64 
    libkadm5srv_mit.so.8()(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64 
    libkadm5srv_mit.so.8(kadm5srv_mit_8_MIT)(64bit) is needed by krb5-workstation-1.10.3-65.el6.x86_64 
    You could try running: rpm -Va --nofiles --nodigest 
    Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx-2018-07-26-15-04Mfo_sa.yumtx

  • 使用命令安裝好libkadm5便可

 
  1. [root@apex18 ~]# yum install libkadm5
  1. 建立組和用戶
 
  1. [root@apex18 ~]# groupadd oinstall
  2. [root@apex18 ~]# groupadd dba
  3. [root@apex18 ~]# useradd -g oinstall -G dba oracle
  4. [root@apex18 ~]# passwd oracle
  5. 更改用戶 oracle 的密碼 。
  6. 新的 密碼:apex18.1
  7. 從新輸入新的 密碼:apex18.1
  8. passwd: 全部的身份驗證令牌已經成功更新。
  1. 建立目錄
 
  1. [root@apex18 ~]# mkdir -p /u01/app/
  2. [root@apex18 ~]# chown -R oracle:oinstall /u01/app/
  3. [root@apex18 ~]# chmod -R 775 /u01/app/
  1. 建立用戶環境變量 
    [root@apex18 ~]# sudo mkdir /u01/tmp 
    [root@apex18 ~]# sudo chmod a+wr /u01/tmp

  2. 安裝中易宋體

 
  1. [root@apex18 ~]# env | grep -i lang
  2. LANG=zh_CN.UTF-8
  3. [root@apex18 ~]# mkdir -p /usr/share/fonts/zh_CN/TrueType
  • 上傳中易宋體文件zysong.ttf至/usr/share/fonts/zh_CN/TrueType/
 
  1. [root@apex18 ~]# cd /usr/share/fonts/zh_CN/TrueType
  2. [root@apex18 TrueType]# mkfontscale
  3. [root@apex18 TrueType]# mkfontdir
  4. [root@apex18 TrueType]# fc-cache
  1. 修改hosts
 
  1. [root@apex18 TrueType]# vi /etc/hosts
  2. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  3. ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  4. 192.168.75.1 apex18 apex18.oracle11g
  1. 前面的準備工做作好了,正式開始安裝oracle11g
 
  1. [root@apex18 ~]# cd /u01/media/
  2. [root@apex18 ~]# chmod -R 777 database11g/
  3. [root@apex18 ~]# su - oracle
  4. [oracle@apex18 ~]$ vi .bash_profile
  5. export PATH=$PATH:$HOME/bin
  6. export TMP=/u01/tmp
  7. export TMPDIR=/u01/tmp
  8. export ORACLE_BASE=/u01/app/oracle
  9. export ORACLE_SID=orcl


 
  1. [oracle@apex18 ~]$ source .bash_profile
  1. 用oracle用戶登陸linux桌面

  2. 啓動安裝 
    cd /u01/media/database11g/ 
    ./runInstaller 

  • 一路Next 

  • Next 

  • Next 

  • Next 
  • Next 
  • Next 

  • Next apex18.1 

  • Next 

  • Next 

  • Next 
 
  1. [root@apex18 ~]# cd /tmp/CVU_11.2.0.1.0_oracle/
  2. [root@apex18 CVU_11.2.0.1.0_oracle]# ./runfixup.sh
  • 依然檢查不經過 

  • 再運行一邊依賴包的安裝(以前yum clean all了一次) 

  • 再檢查,仍是有這個最大用戶進程數的檢查沒過。 

  • 這個地方,我重啓了一下linux,而後檢查一遍.bash_profile,發現編輯時有點問題,修改過來,從新再來一遍安裝 

  • 再[修補並再次檢查],此次 ./runfixup.sh的運行結果也和上次報錯的不同了。

 
  1. [root@apex18 ~]# cd /tmp/CVU_11.2.0.1.0_oracle/
  2. [root@apex18 CVU_11.2.0.1.0_oracle]# ./runfixup.sh
  3. Response file being used is :./fixup.response
  4. Enable file being used is :./fixup.enable
  5. Log file location: ./orarun.log
  6. Setting Kernel Parameters...
  7. kernel.sem = 250 32000 100 128
  • 進到下面的界面,說明檢查經過了,這8個包實際上已經安裝了,點[所有忽略][下一步]便可。 

  • 點擊[完成],慢慢等待便可。 

  • 好慢長… 

  • 又踩坑了 ORA-00922 

  • 本身嘗試解決查看日誌 
    [root@apex18 CVU_11.2.0.1.0_oracle]# cd /u01/app/oracle/cfgtoollogs/dbca/orcl 
    [root@apex18 orcl]# ls 
    cloneDBCreation.log postScripts.log tts_example_imp.log 
    CloneRmanRestore.log rmanRestoreDatafiles.sql 
    mkplug_v3_orcl.log trace.log 
    [root@apex18 orcl]# tail trace.log 
    [Thread-10] [ 2018-07-26 17:52:54.057 CST ] [StepErrorHandler.setIgnorableErrors:250] setting Ignorable Error: ORA-01952 
    [Thread-10] [ 2018-07-26 17:52:54.057 CST ] [StepErrorHandler.setIgnorableErrors:250] setting Ignorable Error: ORA-01927 
    [Thread-10] [ 2018-07-26 17:52:54.057 CST ] [BasicStep.configureSettings:304] messageHandler being set=null 
    [Thread-10] [ 2018-07-26 17:52:54.082 CST ] [SQLEngine.setSpool:1940] old Spool = null 
    [Thread-10] [ 2018-07-26 17:52:54.082 CST ] [SQLEngine.setSpool:1941] Setting Spool = /u01/app/oracle/cfgtoollogs/dbca/orcl/postScripts.log 
    [Thread-10] [ 2018-07-26 17:52:54.082 CST ] [SQLEngine.setSpool:1942] Is spool appendable? --> true 
    [Thread-10] [ 2018-07-26 17:52:54.872 CST ] [ClonePostCreateScripts.executeImpl:274] OraNLSLanguage: SIMPLIFIED CHINESE 
    [Thread-16] [ 2018-07-26 17:52:54.905 CST ] [BasicStep.handleNonIgnorableError:430] oracle.sysman.assistants.util.UIMessageHandler@49f10a67:messageHandler 
    [Thread-16] [ 2018-07-26 17:52:54.906 CST ] [BasicStep.handleNonIgnorableError:431] ORA-00922: 選項缺失或無效 
    :msg 
    [root@apex18 orcl]#

  • 解決不了 參閱這裏

  1. 嘗試鏈接PLSQL
 
  1. [root@apex18 orcl]# su - oracle
  2. [oracle@apex18 ~]$ /u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus
  3. Error 6 initializing SQL*Plus
  4. SP2-0667: Message file sp1<lang>.msb not found
  5. SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
  6. [oracle@apex18 ~]$ vi .bash_profile
  7. [oracle@apex18 ~]$ source .bash_profile
  8. [oracle@apex18 ~]$ sqlplus /nolog
  9. SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 26 19:11:51 2018
  10. Copyright (c) 1982, 2009, Oracle. All rights reserved.
  1. 查詢SYSTEM用戶的狀態,發現居然是正常的!我不知道該怎麼辦了。
 
  1. SQL> select username,account_status from dba_users;
  2. SP2-0640: Not connected
  3. SQL> conn as sysdba ;
  4. Enter user-name: sys
  5. Enter password:
  6. Connected.
  7. SQL> select username,account_status from dba_users;
  8.  
  9. USERNAME ACCOUNT_STATUS
  10. ------------------------------ --------------------------------
  11. SYS OPEN
  12. SYSTEM OPEN
  13. SCOTT OPEN
  14. BI OPEN
  15. PM OPEN
  16. IX OPEN
  17. SH OPEN
  18. OE OPEN
  19. HR OPEN
  20. OUTLN EXPIRED & LOCKED
  21. MGMT_VIEW EXPIRED & LOCKED
  22.  
  23. USERNAME ACCOUNT_STATUS
  24. ------------------------------ --------------------------------
  25. FLOWS_FILES EXPIRED & LOCKED
  26. MDSYS EXPIRED & LOCKED
  27. ORDSYS EXPIRED & LOCKED
  28. EXFSYS EXPIRED & LOCKED
  29. DBSNMP EXPIRED & LOCKED
  30. WMSYS EXPIRED & LOCKED
  31. APPQOSSYS EXPIRED & LOCKED
  32. APEX_030200 EXPIRED & LOCKED
  33. OWBSYS_AUDIT EXPIRED & LOCKED
  34. ORDDATA EXPIRED & LOCKED
  35. CTXSYS EXPIRED & LOCKED
  36.  
  37. USERNAME ACCOUNT_STATUS
  38. ------------------------------ --------------------------------
  39. ANONYMOUS EXPIRED & LOCKED
  40. SYSMAN EXPIRED & LOCKED
  41. XDB EXPIRED & LOCKED
  42. ORDPLUGINS EXPIRED & LOCKED
  43. OWBSYS EXPIRED & LOCKED
  44. SI_INFORMTN_SCHEMA EXPIRED & LOCKED
  45. OLAPSYS EXPIRED & LOCKED
  46. ORACLE_OCM EXPIRED & LOCKED
  47. XS$NULL EXPIRED & LOCKED
  48. MDDATA EXPIRED & LOCKED
  49. DIP EXPIRED & LOCKED
  50.  
  51. USERNAME ACCOUNT_STATUS
  52. ------------------------------ --------------------------------
  53. APEX_PUBLIC_USER EXPIRED & LOCKED
  54. SPATIAL_CSW_ADMIN_USR EXPIRED & LOCKED
  55. SPATIAL_WFS_ADMIN_USR EXPIRED & LOCKED
  56.  
  57. 36 rows selected.
  58.  
  59. SQL>
  1. 索性,點擊[忽略],又報ORA-28000 

  2. 因而又看了一邊trace裏的報錯:oracle.sysman.assistants,目測和sysman這個帳號有關, 
    原本想先修改一下密碼,到網上一查,說sysman和dbsnmp的密碼修改比較特殊,不然會致使EM沒法啓動。 
    索性直接解鎖,不改密碼(密碼是多少我也知道),繼續點擊[忽略],後面發現EM能夠正常訪問。 
    alter user sysman account unlock ;

  3. 數據庫建立成功。 

  4. 執行兩段配置腳本,數據庫安裝完畢。 

 
  1. [root@apex18 orcl]# cd /u01/app/oraInventory/
  2. [root@apex18 oraInventory]# ./orainstRoot.sh
  3. [root@apex18 oraInventory]# cd /u01/app/oracle/product/11.2.0/dbhome_1/
  4. [root@apex18 dbhome_1]# ./root.sh

安裝apex18.1

  1. 卸載舊APEX
 
  1. [root@apex18 dbhome_1]# su - oracle
  2. [oracle@apex18 apex]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/apex
  3. [oracle@apex18 apex]$ sqlplus /nolog
  4. SQL> connect sys as sysdba
  5. Connected.
  6. SQL> @apxremov.sql
  7. PL/SQL procedure successfully completed.
  8. ...Application Express Removed
  9. SQL> exit
  1. 上傳apex_18.1.zip至/u01/media 
    [oracle@apex18 media]cd/u01/media/[oracle@apex18media]cd/u01/media/[oracle@apex18media] mkdir -p /u01/apex 
    [oracle@apex18 media]unzipapex18.1.zip−d/u01/[oracle@apex18media]unzipapex18.1.zip−d/u01/[oracle@apex18media]chown -R oracle:dba /u01/apex

  2. 安裝新APEX 
    [oracle@apex18 media]cd/u01/apex[oracle@apex18apex]cd/u01/apex[oracle@apex18apex] sqlplus /nolog 
    SQL> connect sys as sysdba;

  • 安裝apex18.1 
    SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/ 
    PL/SQL procedure successfully completed. 
    Thank you for installing Oracle Application Express 18.1.0.00.45 
    Oracle Application Express is installed in the APEX_180100 schema. 
    The structure of the link to the Application Express administration services is as follows: 
    http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql) 
    http://host:port/apex/apex_admin (Oracle XML DB HTTP listener with the embedded PL/SQL gateway) 
    http://host:port/apex/apex_admin (Oracle REST Data Services) 
    The structure of the link to the Application Express development interface is as follows: 
    http://host:port/pls/apex (Oracle HTTP Server with mod_plsql) 
    http://host:port/apex (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
    http://host:port/apex (Oracle REST Data Services) 
    timing for: Phase 3 (Switch) 
    Elapsed: 00:01:52.94 
    timing for: Complete Installation 
    Elapsed: 00:10:27.19 
    PL/SQL procedure successfully completed. 
    1 row selected. 
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production 
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

  • 建立APEX實例管理員(Instance Administration)及密碼,這個密碼必須包含特殊符號,不然設置不上。這個密碼很重要,是管理APEX平臺的帳號密碼,之後建立新的應用schema、解鎖帳號等都靠它,第一次登陸APEX時也要用到。 
    SQL> @apxchpwd.sql 
    ADMIN/!!11AAaa

  • 配置RESTful Services服務 
    SQL> @apex_rest_config.sql 
    APEX_LISTENER/!!11AAaa 
    APEX_REST_PUBLIC_USER/!!11AAaa
  • 禁用數據庫內置的PL/SQL網關 
    SQL> exec dbms_xdb.sethttpport(0); 
    SQL> exec dbms_xdb.setftpport(0);
  • 解鎖ORDS用戶帳號 
    SQL> alter user apex_public_user account unlock; 
    SQL> alter user apex_public_user identified by "!!11AAaa";
  • 斷開數據庫會話 
    SQL> exit

安裝Tomcat:

  • 安裝java-1.8.0-openjdk.x86_64等必須的工具包 
    [root@apex18 ~]# yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64 libaio flex bc mc net-tools.x86_64 htop iotop iftop unzip wget epel-release vim rlwrap -y 
    [root@apex18 ~]# java -version
  • 同步網絡時間 報錯 
    [root@apex18 ~]# systemctl start chronyd 
    -bash: systemctl: command not found
  • 作了以下嘗試仍是報錯果斷放棄 
    [root@apex18 ~]# vi /etc/profile 
    unset i 
    unset pathmunge 
    PATH=PATH:/sbinPATH=PATH:/sbinPATH=PATH:/usr/java1.8/bin:/usr/java1.8/jre/bin 
    :wq

  • 關閉SELinux 
    [root@apex18 ~]# vi /etc/sysconfig/selinux 
    SELINUX=disabled 
    [root@apex18 ~]# setenforce 0

  • 卸載Tomcat 
    [root@apex18 ~]# yum -y remove tomcat*

  • 添加Tomcat用戶和組 
    [root@apex18 ~]# mkdir -p /u01/tomcat 
    [root@apex18 ~]# groupadd tomcat 
    [root@apex18 ~]# useradd -s /bin/false -g tomcat -d /u01/tomcat tomcat 
    useradd:警告:此主目錄已經存在。 
    不從 skel 目錄裏向其中複製任何文件。

  • 下載Tomcat 
    [root@apex18 ~]# cd /u01/media 
    [root@apex18 ~]# wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.32/bin/apache-tomcat-8.5.32.zip

  • 安裝 Tomcat 8.5 
    ** 先將下載的zip文件解壓縮 
    [root@apex18 media]# unzip apache-tomcat-8.5.32.zip 
    ** 將解壓縮後的文件挪到安裝目錄中 
    [root@apex18 media]# mv apache-tomcat-8.5.32/* /u01/tomcat 
    ** 受權 
    [root@apex18 media]# chmod -Rf 755 /u01/tomcat/bin/ 
    [root@apex18 media]# chown -hR tomcat:tomcat /u01/tomcat

  • 新增一個tomcat.service文件 
    沒有/etc/systemd/system/目錄,囧

  • 設置 tomcat 啓動目錄權限 
    [root@apex18 ~]# chmod 755 /u01/tomcat/bin

  • 將 tomcat 服務設置成自啓動。 
    沒有systemctl命令,囧

  • 檢查 tomcat 服務是否正常啓動 
    沒有systemctl命令,囧

  • 測試Tomcat 
    [root@apex18 ~]# cd /u01/tomcat/bin 
    [root@apex18 bin]# ./catalina.sh run 

安裝配置 ORDS

  • 解壓縮安裝包 
    [root@apex18 ~]# mkdir -p /u01/ords 
    [root@apex18 ~]# unzip /u01/media/ords-18.2.0.zip -d /u01/ords/
  • 執行安裝腳本 
    [root@apex18 ~]# cd /u01/ords 
    [root@apex18 ords]# java -jar ords.war install advanced 
    輸入要存儲配置數據的位置:/u01/ords/config 
    輸入數據庫服務器的名稱 [localhost]:apex18.oracle11g 
    輸入數據庫監聽端口 [1521]: 
    輸入 1 指定數據庫服務名稱, 或輸入 2 指定數據庫 SID [1]:1 
    輸入數據庫服務名:orcl 
    若是您但願驗證/安裝 Oracle REST Data Services 方案, 則輸入 1; 或者輸入 2 跳過此步驟 [1]:1 
    輸入ORDS_PUBLIC_USER的數據庫口令:!!11AAaa 
    確認口令:!!11AAaa 
    須要 SYS AS SYSDBA 以驗證 Oracle REST Data Services 方案。 
    輸入SYS AS SYSDBA的數據庫口令:apex18.1 
    確認口令:apex18.1 
    檢索信息. 
    爲ORDS_METADATA輸入默認表空間 [SYSAUX]: 
    爲ORDS_METADATA輸入臨時表空間 [TEMP]: 
    爲ORDS_PUBLIC_USER輸入默認表空間 [USERS]: 
    爲ORDS_PUBLIC_USER輸入臨時表空間 [TEMP]: 
    若是您但願使用 PL/SQL 網關, 則輸入 1; 或者輸入 2 跳過此步驟。 
    若是正在使用 Oracle Application Express 或者正在從 mod_plsql 移植, 則必須輸入 1 [1]: 
    輸入 PL/SQL 網關數據庫用戶名 [APEX_PUBLIC_USER]: 
    輸入APEX_PUBLIC_USER的數據庫口令:apu 
    確認口令:apu 
    輸入 1 能夠爲 Application Express RESTful 服務數據庫用戶 (APEX_LISTENER, APEX_REST_PUBLIC_USER) 指定口令; 者輸入 2 跳過此步驟 [1]: 
    輸入APEX_LISTENER的數據庫口令:!!11AAaa 
    確認口令:!!11AAaa 
    輸入APEX_REST_PUBLIC_USER的數據庫口令:!!11AAaa 
    確認口令:!!11AAaa 
    七月 26, 2018 10:56:24 下午 
    信息: Updated configurations: defaults, apex, apex_pu, apex_al, apex_rt 
    正在安裝Oracle REST Data Services版本 18.2.0.r1831332 
    … 日誌文件已寫入/root/ords_install_core_2018-07-26_225624_00637.log 
    … 已驗證數據庫的先決條件 
    … 已建立 Oracle REST Data Services 方案 
    … 已建立 Oracle REST Data Services 代理用戶 
    … 已授予 Oracle REST Data Services 權限 
    … 已建立 Oracle REST Data Services 數據庫對象 
    … 日誌文件已寫入/root/ords_install_datamodel_2018-07-26_225638_00536.log 
    … 日誌文件已寫入/root/ords_install_apex_2018-07-26_225640_00718.log 
    已完成 Oracle REST Data Services 版本 18.2.0.r1831332 的安裝。用時: 00:00:17.668 
    要以獨立模式啓動, 請輸入 1; 要退出, 請輸入 2 [1]:2

 

  • 爲tomcat帳號受權 
    [root@apex18 ~]# chown -R tomcat:tomcat /u01/ords/config

  • 將 ords.war 部署到 Tomcat 如今咱們能夠將剛纔生成的ords.war文件部署到Tomcat上了。 
    [root@apex18 ~]# cp -a /u01/ords/ords.war /u01/tomcat/webapps/

  • 重啓Tomcat服務 
    [root@apex18 ~]# cd /u01/tomcat/bin 
    [root@apex18 bin]# ./catalina.sh run

  • 訪問ords 報錯 

  • 複製APEX靜態文件到Tomcat目錄 
    ** 在Tomcat的webapps目錄下新建一個名爲i的文件夾 
    [root@apex18 bin]# mkdir -p /u01/tomcat/webapps/i/ 
    ** 將APEX靜態文件複製過去 
    [root@apex18 bin]# cp -a /u01/apex/images/* /u01/tomcat/webapps/i/

  • 訪問ords 仍是報錯 


  • chmod -R -f 777 /u01
  • 手動測試鏈接 
    SQL> conn APEX_PUBLIC_USER/apu 
    ERROR: 
    ORA-28000: the account is locked 
    SQL> conn APEX_REST_PUBLIC_USER/!!11AAaa 
    ERROR: 
    ORA-01017: invalid username/password; logon denied 
    SQL> conn ORDS_PUBLIC_USER/!!11AAaa 
    Connected. 
    SQL> conn APEX_LISTENER/!!11AAaa 
    Connected.
  • 查看究竟是哪幾個用戶 
    apex.xml->APEX_PUBLIC_USER/apu 
    apex_rt.xml->APEX_REST_PUBLIC_USER/!!11AAaa 
    apex_pu.xml ORDS_PUBLIC_USER/!!11AAaa 
    apex_al.xml APEX_LISTENER/!!11AAaa
  • 從新定義密碼,解鎖用戶,注意密碼用""包裹 
    alter user APEX_PUBLIC_USER identified by apu account unlock; 
    alter user APEX_REST_PUBLIC_USER identified by "!!11AAaa" account unlock; 
    alter user ORDS_PUBLIC_USER identified by "!!11AAaa" account unlock; 
    alter user APEX_LISTENER identified by "!!11AAaa" account unlock;
  • 去(https://community.oracle.com/community/database/developer-tools/application_express)(https://www.thatjeffsmith.com/archive/2017/06/how-to-update-the-ords_public_user-password/)上查資料,媽的又踩坑,把密碼改爲不帶!的,從新安裝ords,從新部署到tomcat 
    alter user APEX_PUBLIC_USER identified by apu account unlock; 
    alter user APEX_REST_PUBLIC_USER identified by apu account unlock; 
    alter user ORDS_PUBLIC_USER identified by apu account unlock; 
    alter user APEX_LISTENER identified by apu account unlock;

  • 此次報警告了,訪問ords時,頁面顯示不完整 

  • 索性重啓Linux

  • 啓動數據庫,又踩坑 

  • 參考(https://blog.csdn.net/benson_xi/article/details/7356499
    修改kernel.sem = 250 32000 100 128以後,數據庫正常啓動

  • 啓動監聽

  • root下啓動tomcat,發現仍是ORDS頁面沒法正常顯示 

  • 索性配置一下linux防火牆,在虛擬機外面訪問 

  • 終於成功了 

Nginx的安裝和配置 之後稍後更新

APEX中文補丁的安裝和配置 之後稍後更新

相關文章
相關標籤/搜索