安装 Oracle Form 12 in Linux
因为工作原因需要安装 Oracle Form,这是一个比较旧的技术,网上的资料不多,整理和记录安装的过程。
一、安装 Oracle Middleware Infrastructure
二、 安装 Oracle Form
三、安装 Oracle Repository Creation Utility - RCU
四、配置 Oracle Form
五、配置 Oracle Report
配置 Oracle Report
准备工作,已经成功完成上面所列的四大步骤。配置Oracle Report 步骤与配置Oracle Form 步骤比较类似,可以参考。
- 进入 in home/oracle/Oraclehome/Middleware/Oracle_Home/oracle_common/common/bin 目录,运行命令【./config.sh】,进入安装界面,默认就是按照系统默认选项一步步安装。
因为之前已经建立了domain, 目前所做工作是将oracle report 也放到与oracle form 同一个weblogic 一起来管理,所以要选择 Update an existing domain.
2.选择 Oracle Report Bridge, Oracle Report Application[reports], Oracle HTTP Server(Collocate)[ohs] 这些项目,如果系统有默认项目,保留默认项目。
4.DBMS/Service 是之前建立的pluggable database(PDB), Schema Owner 是之前建立 BOOK前缀【具体见 配置 oracle form】,按照屏幕选择来操作。
5.直接点击下一步
6.如果正常,测试成功。
7. 选择Topology 与 Deployments and Services
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.最后一步,成功后出现 weblogic console url, 这里 myhouse.com就是localhost, 在/etc/hosts 定义。
23. 安装步骤完成了, 还需要进一步设置。 可以在 find -name startNodeManager.sh, 找到此文件来启动 node manager, 见图
24. 同理来运行【./startWebLogic.sh】启动 weblogic service. 见图
25. 同理 找到 wlst.sh 文件并运行。此文件运行之后就进入wls 命令状态,在 【wls:/***>】大于号 之后分别运行4个命令
connect(“weblogic”,“Seventh7”, “localhost:7001”) 前两个参数是weblogic 用户名和密码, 换成你的密码
createReportsServerInstance(instanceName=‘myReportsServer’,machine=‘AdminServerMachine’)
createReportsToolsInstance(instanceName=‘myReportsTools’, machine=‘AdminServerMachine’)
exit() 设置好3个命令就可以退出
instanceName 后面可以改变为你需要的名字,这4个命令在记事本中写好,直接贴到 >
后面,屏幕所显示的命令不知道为什么看不完全。见图。
26. 同理找到 startManagedWebLogic.sh, 运行 【./startManagedWebLogic.sh WLS_REPORTS】,见图
27. 启动服务后,会要求输入weblogic 用户名和密码
28. 设置 Report Builder 在 web 运行 “Run to web”
先找到 find -name _WL_user 目录,在进入 子目录 reports_12.2.1 会发现 一个随机数字 目录,我这里是 5ah7s6, 记下来 _WL_user/reports_12.2.1/5ah7s6/war 一串字符串,一会用到。
在找到 rwbuilder.conf 文件, 这个目录非常长,编辑此文件。见图
29. 找到 这一行,在后面加入
</pluginParam>
<webLayout port="9002" docroot="/scratch/rrpai/wls2/user_
projects/domains/test1/servers/WLS_REPORTS/tmp/_WL_user/reports_
12.2.1/5ah7s6/war"/>
, 其中一部分就是28 步骤的字符串。见图
30. rwbuilder.sh in /home/oracle/Oraclehome/Middleware/Oracle_Home/user_projects/domains/base_domain/reports/bin 目录,修改了文件,主要
16行,系统中没有 jdbc/lib/ojdbc6dms.jar, 有jdbc/lib/ojdbc8dms.jar,修改文件。rwbuilder.sh 目录很长用 find -name rwbuilder.sh 找到文件目录。
#!/bin/sh
#
# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
#
DOMAIN_HOME=/home/oracle/Oraclehome/Middleware/Oracle_Home/user_projects/domains/base_domain
export DOMAIN_HOME
. ${DOMAIN_HOME}/reports/bin/reports.sh
COMPONENT_NAME=myReportsTools; export COMPONENT_NAME
COMPONENT_CONFIG_PATH=${DOMAIN_HOME}/config/fmwconfig/components/ReportsToolsComponent/${COMPONENT_NAME}; export COMPONENT_CONFIG_PATH
REPORTS_INSTANCE=${COMPONENT_CONFIG_PATH}; export REPORTS_INSTANCE
#bk old detail
#REPORTS_CLASSPATH=${ORACLE_HOME}/jdbc/lib/ojdbc6dms.jar:${REPORTS_CLASSPATH};
REPORTS_CLASSPATH=${ORACLE_HOME}/jdbc/lib/ojdbc8dms.jar:${REPORTS_CLASSPATH}; export REPORTS_CLASSPATH
## Linux specific settings
if [ `/bin/uname -s` = 'Linux' ]
then
if echo $LANG | /bin/grep -i '\.utf.*8' > /dev/null
then
export LANG=`echo $LANG | /bin/sed 's#\.[u|U][t|T][f|F].*8.*##'`
fi
fi
exec $ORACLE_HOME/bin/rwbuilder "$@"
- 在与上面相同目录有 reports.sh, 修改了大概第28 行,修改 PATH=/usr/lib/jdk1.8/bin:${ORACLE_HOME}/oracle_common/jdk/bin,这个/usr/lib/jdk1.8/bin 是java directory. 修改大概第119 行, 加入 LD_LIBRARY_PATH,
因为 /usr/lib/jdk1.8/jre 是 jre directory, debug 调试 .sh 文件,可以在文件开始加入 set -x(单独一行), 就可以打印出来每条运行命令,帮助调试、看到 .sh 文件如何运行。
#!/bin/sh
#
# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
#
## Example file to set environment variables in Bourne-shell or K-shell
## for Oracle Reports 10gR2. Refer to Install Doc for more detail on each
## of these environment variables. You need to modify some of the environment
## variables before doing source on this file ( % . reports.sh ).
## DISPLAY=< your unix machine name:0.0 >; export DISPLAY
set -x
## Set the ORACLE_HOME environment variable
MW_HOME=/home/oracle/Oraclehome/Middleware/Oracle_Home
export MW_HOME
ORACLE_HOME=${MW_HOME}
export ORACLE_HOME
DOMAIN_HOME=/home/oracle/Oraclehome/Middleware/Oracle_Home/user_projects/domains/base_domain
export DOMAIN_HOME
COMMON_COMPONENTS_HOME=${ORACLE_HOME}/oracle_common; export COMMON_COMPONENTS_HOME
## if you need more than one diretory in your path, all directories should be
## separated by ':'
#add my jdk library in the front.
PATH=/usr/lib/jdk1.8/bin:${ORACLE_HOME}/oracle_common/jdk/bin:${ORACLE_HOME}/bin:${PATH}; export PATH
## Platform specific settings
## HP-UX settings (PA-RISC & Itanium)
if [ `uname -s` = 'HP-UX' ]
then
if [ `uname -m` = 'ia64' ]
then
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/IA64W:${ORACLE_HOME}/oracle_common/jdk/jre/lib/IA64W/server:${ORACLE_HOME}/oracle_common/jdk/jre/lib/IA64W/native_threads:${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}
SHLIB_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/IA64W:${ORACLE_HOME}/oracle_common/jdk/jre/lib/IA64W/server:${ORACLE_HOME}/lib:${SHLIB_PATH}
export LD_LIBRARY_PATH
export SHLIB_PATH
else
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/PA_RISC2.0W:${ORACLE_HOME}/oracle_common/jdk/jre/lib/PA_RISC2.0W/serveri:${ORACLE_HOME}/oracle_common/jdk/jre/lib/PA_RISC2.0W/native_threads:${ORACLE_HOME}/lib:${ORACLE_HOME}/lib:/usr/dt/lib:${LD_LIBRARY_PATH}
SHLIB_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/PA_RISC2.0W:${ORACLE_HOME}/oracle_common/jdk/jre/lib/PA_RISC2.0W/server:${ORACLE_HOME}/oracle_common/jdk/jre/lib/PA_RISC2.0W/native_threads:${ORACLE_HOME}/lib:${ORACLE_HOME}/lib:/usr/dt/lib:${SHLIB_PATH}
export LD_LIBRARY_PATH
export SHLIB_PATH
fi
## Fix for Reports in-process server on HP-UX 11.11 platform
HOME=${HOME:-%HOME%}; export HOME
## Linux settings (32-bit & x86-64)
elif [ `uname -s` = 'Linux' ]
then
if [ `uname -m` = 'ia64' ]
then
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/ia64/native_threads:${ORACLE_HOME}/oracle_common/jdk/jre/lib/ia64:${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib:${ORACLE_HOME}/oracle_common/jdk/jre/lib/ia64/jrockit:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
elif [ `uname -m` = 'x86_64' ]
then
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64/native_threads:${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64:${ORACLE_HOME}/lib:${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64/server:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
else
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/i386:${ORACLE_HOME}/oracle_common/jdk/jre/lib/i386/server:${ORACLE_HOME}/oracle_common/jdk/jre/lib/i386/native_threads:${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib:/usr/X11R6/lib:/usr/openwin/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
fi
## Fix for Reports in-process server on Linux platform
HOME=${HOME:-%HOME%}; export HOME
## Set LD_ASSUME_KERNEL for RedHat 3.x systems
if [ -f "/etc/redhat-release" ]
then
RHVER=`/bin/rpm -qf /etc/redhat-release --qf "%{VERSION}\n" 2>/dev/null`
case $RHVER in
3*AS | 3*ES)
export LD_ASSUME_KERNEL=2.4.19
;;
esac
fi
## Compaq Tru64 settings (OSF1)
elif [ `uname -s` = 'OSF1' ]
then
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/alpha:${ORACLE_HOME}/lib32:${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
## AIX settings
elif [ `uname -s` = 'AIX' ]
then
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/ppc64:${ORACLE_HOME}/oracle_common/jdk/jre/lib/ppc64/classic:${ORACLE_HOME}/lib:/usr/dt/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
LIBPATH=${ORACLE_HOME}/lib:/usr/dt/lib:${ORACLE_HOME}/oracle_common/jdk/jre/lib/ppc64:${ORACLE_HOME}/oracle_common/jdk/jre/lib/ppc64/classic:${LIBPATH}; export LIBPATH
LDR_CNTRL=USERREGS@MAXDATA=0x80000000; export LDR_CNTRL
## Solaris Intel64 settings.
elif [ `uname -s` = 'SunOS' ] && [ `uname -m` = 'i86pc' ]
then
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64/server:${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64/native_threads:${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64:${ORACLE_HOME}/lib:/usr/lib/64:/usr/dt/lib/amd64:/usr/openwin/lib/amd64:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
## Default settings
else
## Solaris Sparc
LD_LIBRARY_PATH=${ORACLE_HOME}/oracle_common/jdk/jre/lib/sparcv9/server:${ORACLE_HOME}/oracle_common/jdk/jre/lib/sparcv9/native_threads:${ORACLE_HOME}/oracle_common/jdk/jre/lib/sparcv9:${ORACLE_HOME}/lib:/usr/dt/lib/sparcv9:/usr/openwin/lib/sparcv9:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
## Fix for Reports in-process server on other platforms
HOME=${HOME:-%HOME%}; export HOME
## Set REPORTS_SOLARIS_9 for Solaris 2.9 systems
if [ "`uname -rs`" = "SunOS 5.9" ]
then
REPORTS_SOLARIS_9=YES; export REPORTS_SOLARIS_9
fi
## end platform specific settings
fi
##add LD_LIBRARY_PATH.
##/usr/lib/jdk1.8/jre
echo "change LD_LIBRARY_PATH"
LD_LIBRARY_PATH=/usr/lib/jdk1.8/jre/lib/amd64:/usr/lib/jdk1.8/jre/lib/amd64/server:/usr/lib/jdk1.8/jre/lib/amd64/native_threads:${ORACLE_HOME}/lib:${ORACLE_HOME}/oracle_common/jdk/jre/lib/amd64/server:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
## You need to set TNS_ADMIN and TWO_TASK or ORACLE_SID to connect to database
## Some default values have been set below
if [ "$TNS_ADMIN" = "" ]
then
if [ -f "/etc/tnsnames.ora" ]
then
TNS_ADMIN="/etc"; export TNS_ADMIN
else
TNS_ADMIN=${DOMAIN_HOME}/config/fmwconfig; export TNS_ADMIN
fi
fi
## TWO_TASK=< two task name >; export TWO_TASK
## ORACLE_SID=< ORACLE SID >; export ORACLE_SID
## setting for Reports Runtime
RW=${ORACLE_HOME}/reports; export RW
REPORTS_PATH=${ORACLE_HOME}/reports/templates:${ORACLE_HOME}/reports/samples/demo:${ORACLE_HOME}/reports/printers:${DOMAIN_HOME}/reports/fonts:${REPORTS_PATH}; export REPORTS_PATH
if [ "$REPORTS_TMP" = "" ]
then
REPORTS_TMP=/tmp; export REPORTS_TMP
fi
if [ "$REPORTS_NO_DUMMY_PRINTER" = "" ]
then
REPORTS_NO_DUMMY_PRINTER=TRUE; export REPORTS_NO_DUMMY_PRINTER
fi
REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar; export REPORTS_TAGLIB_URI
REPORTS_CLASSPATH=${ORACLE_HOME}/reports/jlib/rwbuilder.jar:${ORACLE_HOME}/reports/jlib/rwrun.jar:${ORACLE_HOME}/jlib/zrclient.jar; export REPORTS_CLASSPATH
## Icon variable for Solaris platform
TK_ICON=${ORACLE_HOME}/reports/plugins/resource; export TK_ICON
REPORTS_DEFAULT_DISPLAY=YES; export REPORTS_DEFAULT_DISPLAY
if [ `uname -s` = 'Linux' ]
then
if [ `uname -m` = 'ia64' ]
then
## FOR Linux ia64 This must be set to NO
## DONOT Change the following setting
REPORTS_DEFAULT_DISPLAY=NO; export REPORTS_DEFAULT_DISPLAY
fi
if [ `uname -m` = 's390x' ]
then
## FOR Linux s390x This must be set to NO
## DONOT Change the following setting
## This is fixed by poring team with rpradhan_mrg_ppc_rw
REPORTS_DEFAULT_DISPLAY=NO; export REPORTS_DEFAULT_DISPLAY
fi
fi
if [ "$NLS_LANG" = "" ]
then
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
fi
REPORTS_FONT_DIRECTORY=${DOMAIN_HOME}/reports/fonts; export REPORTS_FONT_DIRECTORY
- 执行 /home/oracle/Oraclehome/Middleware/Oracle_Home/user_projects/domains/base_domain/reports/bin 下 ./rwbuilder.sh, 可以运行 Oracle Report.
祝贺 配置 Oracle Report 成功。
相关资源
安装 Oracle Middleware Infrastructure
安装 Oracle Form
安装 Oracle Repository Creation Utility – RCU
配置 Oracle Form
配置 Oracle Report
其他资源
https://docs.oracle.com/middleware/1221/formsandreports/install-fnr/FRINS.pdf
https://docs.oracle.com/middleware/1221/formsandreports/install-fnr/install.htm
https://oracle-base.com/articles/12c/oracle-forms-and-reports-12c-installation-on-oracle-linux-6-and-7
https://oracle-base.com/articles/19c/oracle-db-19c-installation-on-oracle-linux-7