Linux上安装oracle application express

我们两清 提交于 2019-11-30 21:54:19

虚拟化平台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安装包 

  • 开机启动安装 

  • 当然此处可以用WMware Workstation连接虚拟机进行安装 


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

  • 一路Next 

  • Next 

  • Next 

  • Next 

  • Next 

  • Next apex18.oracle11g 

  • Next 192.168.75.1 255.255.255.0 192.168.75.254 DNS:202.194.40.1 

-Next 

-Next root密码:apex18.1 

-Next 

  • Next 

  • Next 

  • Next 

  • 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中文补丁的安装和配置 以后稍后更新

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!