百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 优雅编程 > 正文

Oracle中间件 12c软件安装及域的创建配置

sinye56 2024-10-01 20:08 7 浏览 0 评论

软件下载地址

https://www.oracle.com/technetwork/middleware/fusion-middleware/downloads/index.html

https://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html

配置java环境变量

[bea@redhat6 data]$ source /home/tyusr/.bashrc

[bea@redhat6 data]$ java

创建应答文件

[bea@redhat6 data]$ ll

total 1825308

-rw-r--r-- 1 bea bea 838986083 Apr 26 01:13 fmw_12.2.1.3.0_wls_Disk1_1of1.zip

-rwxr-xr-x 1 bea bea 839208313 Aug 21 2017 fmw_12.2.1.3.0_wls.jar

-rw-r--r-- 1 bea bea 9063 Aug 8 2017 fmw_12213_readme.htm

drwxr-xr-x 8 bea bea 4096 Mar 28 2018 jdk1.8.0_171

-rw-r--r-- 1 bea bea 190890122 Apr 26 01:14 jdk-8u171-linux-x64.tar.gz

应答文件1

注意:用哪个用户安装weblogic,inst_group后面添加哪个账户。

[bea@redhat6 data]$ touch oraInst.loc

[bea@redhat6 data]$ cat oraInst.loc

inventory_loc=/data/oraInventory

inst_group=bea

注意两个应答文件字母拼写的不同及大小写

应答文件2

[bea@redhat6 data]$ touch wls.rsp

[bea@redhat6 data]$ cat wls.rsp

[ENGING]

Response File Version=1.0.0.0.0

[GENERIC]

ORACLE_HOME=/data/weblogic

INSTALL_TYPE=WebLogic Server

注意fmw_12.2.1.3.0_wls.jar文件的权限

[bea@redhat6 data]$ ll

total 1825312

-rw-r--r-- 1 bea bea 838986083 Apr 26 01:13 fmw_12.2.1.3.0_wls_Disk1_1of1.zip

-rwxr-xr-x 1 bea bea 839208313 Aug 21 2017 fmw_12.2.1.3.0_wls.jar

-rw-r--r-- 1 bea bea 9063 Aug 8 2017 fmw_12213_readme.htm

drwxr-xr-x 8 bea bea 4096 Mar 28 2018 jdk1.8.0_171

-rw-r--r-- 1 bea bea 190890122 Apr 26 01:14 jdk-8u171-linux-x64.tar.gz

-rw-rw-r-- 1 bea bea 49 Apr 26 01:22 oraInst.loc

-rw-rw-r-- 1 bea bea 0 Apr 26 01:22 wls.rsp

[bea@redhat6 data]$ ls

fmw_12.2.1.3.0_wls_Disk1_1of1.zip fmw_12213_readme.htm jdk-8u171-linux-x64.tar.gz wls.rsp

fmw_12.2.1.3.0_wls.jar jdk1.8.0_171 oraInst.loc

weblogic软件的安装

[bea@redhat6 data]$ java -jar fmw_12.2.1.3.0_wls.jar -silent -responseFile /data/wls.rsp -invPtrLoc /data/oraInst.loc

Launcher log file is /tmp/OraInstall2019-04-26_01-26-44AM/launcher2019-04-26_01-26-44AM.log.

Extracting the installer . . . . . . . . . Done

Checking if CPU speed is above 300 MHz. Actual 2594.160 MHz Passed

Checking swap space: must be greater than 512 MB. Actual 1983 MB Passed

Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)

Checking temp space: must be greater than 300 MB. Actual 10363 MB Passed

Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2019-04-26_01-26-44AM

Log: /tmp/OraInstall2019-04-26_01-26-44AM/install2019-04-26_01-26-44AM.log

Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.

Reading response file..

Skipping Software Updates

Starting check : CertifiedVersions

Expected result: One of oracle-6, oracle-7, redhat-7, redhat-6, SuSE-11, SuSE-12

Actual Result: redhat-6.6

Check complete. The overall result of this check is: Passed

CertifiedVersions Check: Success.

Starting check : CheckJDKVersion

Expected result: 1.8.0_131

Actual Result: 1.8.0_171

Check complete. The overall result of this check is: Passed

CheckJDKVersion Check: Success.

Validations are enabled for this session.

Verifying data

Copying Files

Percent Complete : 10

Percent Complete : 20

Percent Complete : 30

Percent Complete : 40

Percent Complete : 50

Percent Complete : 60

Percent Complete : 70

Percent Complete : 80

Percent Complete : 90

Percent Complete : 100

The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.2.1.3.0 completed successfully.

Logs successfully copied to /data/oraInventory/logs.

[bea@redhat6 data]$

[bea@redhat6 data]$

[bea@redhat6 data]$ ll ##注意,12c的zip压缩包解压后,得到的文件(fmw_12.2.1.3.0_wls.jar)没有写权限,需要手头添加

total 1825324

-rw-r--r-- 1 bea bea 838986083 Apr 26 01:13 fmw_12.2.1.3.0_wls_Disk1_1of1.zip

-rwxr-xr-x 1 bea bea 839208313 Aug 21 2017 fmw_12.2.1.3.0_wls.jar

-rw-r--r-- 1 bea bea 9063 Aug 8 2017 fmw_12213_readme.htm

drwxr-xr-x 8 bea bea 4096 Mar 28 2018 jdk1.8.0_171

-rw-r--r-- 1 bea bea 190890122 Apr 26 01:14 jdk-8u171-linux-x64.tar.gz

-rw-rw-r-- 1 bea bea 49 Apr 26 01:22 oraInst.loc

drwxrwx--- 6 bea bea 4096 Apr 26 01:29 oraInventory

drwxr-x--- 10 bea bea 4096 Apr 26 01:28 weblogic

-rw-rw-r-- 1 bea bea 108 Apr 26 01:23 wls.rsp

[bea@redhat6 bin]$ pwd

/data/weblogic/wlserver/server/bin

[bea@redhat6 bin]$ ls

eclipse.sh saveMemory.sh setWLSEnv.sh startNodeManager.sh startRSDaemon.sh stopNodeManager.sh stopRSDaemon.sh

[bea@redhat6 bin]$ ./setWLSEnv.sh

CLASSPATH=/data/jdk1.8.0_171/lib/tools.jar:/data/weblogic/wlserver/modules/features/wlst.wls.classpath.jar:

PATH=/data/weblogic/wlserver/server/bin:/data/weblogic/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.9.8.0.0/apache-ant-1.9.8/bin:/data/jdk1.8.0_171/jre/bin:/data/jdk1.8.0_171/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/bea/bin:/data/jdk1.8.0_171/jre/bin:/data/jdk1.8.0_171/bin:/data/weblogic/wlserver/../oracle_common/modules/org.apache.maven_3.2.5/bin

Your environment has been set.

[bea@redhat6 bin]$

方法1,字符

手动创建域目录

[bea@redhat6 data]$mkdir -p /data/weblogic/user_projects/domains/domain120/

查找wlst脚本工具

[bea@redhat6 weblogic]$ cd wlserver/common/templates/scripts/wlst/

[bea@redhat6 wlst]$ ls

basicWLSDomain.py

将脚本文件拷贝到域目录下

[bea@redhat6 wlst]$ cp basicWLSDomain.py /data/weblogic/user_projects/domains/domain120/

WLST:weblogic scripting tool,即weblogic脚本工具。

weblogic脚本工具是一种命令行脚本界面,系统管理员和操作员用它来监视和管理weblogic server实例以及域。wlst脚本基于java脚本解释器Python。

原始建域脚本

[root@redhat6 wlst]# cat -n basicWLSDomain.py

1 #======================================================================

2 # This is an example of a simple WLST offline configuration script. The script creates

3 # a simple WebLogic domain using the Basic WebLogic Server Domain template. The script

4 # demonstrates how to open a domain template, create and edit configuration objects,

5 # and write the domain configuration information to the specified directory.

6 #

7 # This sample uses the demo Derby Server that is installed with your product.

8 # Before starting the Administration Server, you should start the demo Derby server

9 # by issuing one of the following commands:

10 #

11 # Windows: WL_HOME\common\derby\bin\startNetworkServer.cmd

12 # UNIX: WL_HOME/common/derby/bin/startNetworkServer.sh

13 #

14 # (WL_HOME refers to the top-level installation directory for WebLogic Server.)

15 #

16 # The sample consists of a single server, representing a typical development environment.

17 # This type of configuration is not recommended for production environments.

18 #

19 # Please note that some of the values used in this script are subject to change based on

20 # your WebLogic installation and the template you are using.

21 #

22 # Usage:

23 # java weblogic.WLST <WLST_script>

24 #

25 # Where:

26 # <WLST_script> specifies the full path to the WLST script.

27 #======================================================================

28

29 #======================================================================

30 # Open a domain template.

31 #======================================================================

32

33 readTemplate("/data/weblogic/wlserver/common/templates/wls/wls.jar")

34

35 #======================================================================

36 # Configure the Administration Server and SSL port.

37 #

38 # To enable access by both local and remote processes, you should not set the

39 # listen address for the server instance (that is, it should be left blank or not set).

40 # In this case, the server instance will determine the address of the machine and

41 # listen on it.

42 #======================================================================

43

44 cd('Servers/AdminServer')

45 set('ListenAddress','')

46 set('ListenPort', 7001)

47

48 create('AdminServer','SSL')

49 cd('SSL/AdminServer')

50 set('Enabled', 'True')

51 set('ListenPort', 7002)

52

53 #======================================================================

54 # Define the user password for weblogic.

55 #======================================================================

56

57 cd('/')

58 cd('Security/base_domain/User/weblogic')

59 # Please set password here before using this script, e.g. cmo.setPassword('value')

60

61 #======================================================================

62 # Create a JMS Server.

63 #======================================================================

64

65 cd('/')

66 create('myJMSServer', 'JMSServer')

67

68 #======================================================================

69 # Create a JMS System resource.

70 #======================================================================

71

72 cd('/')

73 create('myJmsSystemResource', 'JMSSystemResource')

74 cd('JMSSystemResource/myJmsSystemResource/JmsResource/NO_NAME_0')

75

76 #======================================================================

77 # Create a JMS Queue and its subdeployment.

78 #======================================================================

79

80 myq=create('myQueue','Queue')

81 myq.setJNDIName('jms/myqueue')

82 myq.setSubDeploymentName('myQueueSubDeployment')

83

84 cd('/')

85 cd('JMSSystemResource/myJmsSystemResource')

86 create('myQueueSubDeployment', 'SubDeployment')

87

88 #======================================================================

89 # Create and configure a JDBC Data Source, and sets the JDBC user.

90 #======================================================================

91

92 cd('/')

93 create('myDataSource', 'JDBCSystemResource')

94 cd('JDBCSystemResource/myDataSource/JdbcResource/myDataSource')

95 create('myJdbcDriverParams','JDBCDriverParams')

96 cd('JDBCDriverParams/NO_NAME_0')

97 set('DriverName','org.apache.derby.jdbc.ClientDriver')

98 set('URL','jdbc:derby://localhost:1527/db;create=true')

99 set('PasswordEncrypted', 'PBPUBLIC')

100 set('UseXADataSourceInterface', 'false')

101 create('myProps','Properties')

102 cd('Properties/NO_NAME_0')

103 create('user', 'Property')

104 cd('Property/user')

105 cmo.setValue('PBPUBLIC')

106

107 cd('/JDBCSystemResource/myDataSource/JdbcResource/myDataSource')

108 create('myJdbcDataSourceParams','JDBCDataSourceParams')

109 cd('JDBCDataSourceParams/NO_NAME_0')

110 set('JNDIName', java.lang.String("myDataSource_jndi"))

111

112 cd('/JDBCSystemResource/myDataSource/JdbcResource/myDataSource')

113 create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams')

114 cd('JDBCConnectionPoolParams/NO_NAME_0')

115 set('TestTableName','SYSTABLES')

116

117 #======================================================================

118 # Target resources to the servers.

119 #======================================================================

120

121 cd('/')

122 assign('JMSServer', 'myJMSServer', 'Target', 'AdminServer')

123 assign('JMSSystemResource.SubDeployment', 'myJmsSystemResource.myQueueSubDeployment', 'Target', 'myJMSServer')

124 assign('JDBCSystemResource', 'myDataSource', 'Target', 'AdminServer')

125

126 #======================================================================

127 # Write the domain and close the domain template.

128 #======================================================================

129

130 setOption('OverwriteDomain', 'true')

131 writeDomain('/data/weblogic/user_projects/domains/basicWLSDomain')

132 closeTemplate()

133

134 #======================================================================

135 # Exit WLST.

136 #=====================================================================

137

138 exit()

修改后的建域脚本

从62(Create a JMS Server.)到127 (Write the domain and close the domain template.)所有的内容都删除。同时注意修改domain的目录(131 writeDomain的相关内容)。

[root@redhat6 domain120]# cat -n basicWLSDomain.py

1 #=================================================================

2 # This is an example of a simple WLST offline configuration script. The script creates

3 # a simple WebLogic domain using the Basic WebLogic Server Domain template. The script

4 # demonstrates how to open a domain template, create and edit configuration objects,

5 # and write the domain configuration information to the specified directory.

6 #

7 # This sample uses the demo Derby Server that is installed with your product.

8 # Before starting the Administration Server, you should start the demo Derby server

9 # by issuing one of the following commands:

10 #

11 # Windows: WL_HOME\common\derby\bin\startNetworkServer.cmd

12 # UNIX: WL_HOME/common/derby/bin/startNetworkServer.sh

13 #

14 # (WL_HOME refers to the top-level installation directory for WebLogic Server.)

15 #

16 # The sample consists of a single server, representing a typical development environment.

17 # This type of configuration is not recommended for production environments.

18 #

19 # Please note that some of the values used in this script are subject to change based on

20 # your WebLogic installation and the template you are using.

21 #

22 # Usage:

23 # java weblogic.WLST <WLST_script>

24 #

25 # Where:

26 # <WLST_script> specifies the full path to the WLST script.

27 #===============================================================

28

29 #==============================================================

30 # Open a domain template.

31 #================================================================

32

33 readTemplate("/data/weblogic/wlserver/common/templates/wls/wls.jar")

34

35 #================================================================

36 # Configure the Administration Server and SSL port.

37 #

38 # To enable access by both local and remote processes, you should not set the

39 # listen address for the server instance (that is, it should be left blank or not set).

40 # In this case, the server instance will determine the address of the machine and

41 # listen on it.

42 #==================================================================

43

44 cd('Servers/AdminServer')

45 set('ListenAddress','')

46 set('ListenPort', 7001)

47

48 create('AdminServer','SSL')

49 cd('SSL/AdminServer')

50 set('Enabled', 'True')

51 set('ListenPort', 7002)

52 #set('ServerStartMode', prod)

53 #==============================================================

54 # Define the user password for weblogic.

55 #==============================================================

56

57 cd('/')

58 cd('Security/base_domain/User/weblogic')

59 cmo.setPassword('1qaz@WSX')

60 # Please set password here before using this script, e.g. cmo.setPassword('value')

61

62

63 setOption('OverwriteDomain', 'true')

64 writeDomain('/data/weblogic/user_projects/domains/domain120')

65 closeTemplate()

66

67 #==============================================================

68 # Exit WLST.

69 #=====================================================================

70

71 exit()

注意:有些情况下用户想更改登录weblogic的用户名,可以在.py脚本里直接指定用户名“cmo.setName('weblogic')”。

解决创建域缓慢的问题

在Oracle官网中,有对域创建过程缓慢做相应的说明:

if you notice that it takes a long time to create or update a domain using WLST on a UNIX or Linux operating system, set the CONFIG_JVM_ARGS environment variable to the following value to resolve this issue:

-Djava.security.egd=file:/dev/urandom

[bea@redhat6 bin]$ export CONFIG_JVM_ARGS='-Djava.security.egd=file:/dev/urandom'

基本原理:重设了Linux系统下获取随机数的来源。

wlst创建域

路径 /data/weblogic/wlserver/common/bin

[bea@redhat6 bin]$ ./wlst.sh /data/weblogic/user_projects/domains/domain120/basicWLSDomain.py

WARNING: This is a deprecated script. Please invoke the wlst.sh script under oracle_common/common/bin.

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Exiting WebLogic Scripting Tool.

此时说明域已经创建完成。

更改域启动加载慢的问题

路径 /data/weblogic/user_projects/domains/domainXXX/bin

[bea@redhat6 bin]$ vim setDomainEnv.sh

管理控制台运行慢,在WLS_home/mydomain/bin/setDomainEnv.sh最后加:

JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.security.egd=file:/dev/./urandom"

export JAVA_OPTIONS

启动中间件管理服务器

由于通过wlst脚本工具创建的域,默认情况下是开发模式。因此需要在执行./startWebLogic.sh启动weblogic console之后,在控制台下将模式更改为生产模式。更改之后需要重启weblogic console才可以生效。



创建且启动应用实例

Administrator创建成功后,可以在console控制台上创建应用实例(受管服务器)。

应用实例的创建与10.3.6的创建方式相同,但在字符界面下启动应用实例和10.3.6有些区别(可能10.3.6启动的标准方法就是如此,只是本人之前一直侥幸用不规范的方法启动且启动成功)。

10.3.6启动应用实例的方法

进入特定的目录

./startManagedWebLogic.sh appServer

12c启动应用实例的方法

进入特定的目录

./startManagedWebLogic.sh appServer http://10.6.11.134:7001/

在前台启动应用实例后,进入server目录创建密码文件。之后再配置应用实例后台启动。

#nohup ./startManagedWebLogic.sh appServer http://10.6.11.134:7001/ > nohup8020.out &

(此应用实例使用的端口是8020)

相关推荐

一个不错的软件版本命名规范!

之前写了一篇如何自动生成版本号的文章,《让你的C程序,自动打印版本信息》初衷是让自己的程序在运行时自动打印与版本相关的信息,避免测试时因为版本信息不确定导致的一些功能对应不上去的问题,当时留了一个坑,...

国产操作系统迎来发展风口 公务领域更能培育起Linux生态

谷歌和微软在俄罗斯市场的一番套路猛如虎,就让我们深刻地意识到了,只有自己的东西才能靠得住。也由此,国内操作系统发展迎来了发展风口。我就看到有朋友就秀出了他们单位采购的纯国产的主机,一款华为的主机,纯国...

5个大有“前途”的Linux桌面发行版本

ZD至顶网CIO与应用频道08月27日专栏:Linux无处不在。你的服务器里,你的电话、汽车、手表、烤面包机、冰箱……和台式机里都有Linux的身影。虽然在桌面上见到Linux的用户比在自动调温...

Linux 常用应用软件大全

编译自:https://www.fossmint.com/most-used-linux-applications/作者:MartinsD.Okoi译者:HankChow对于许多应用程序...

Linux 4.1 系列的最大版本 4.1.18 LTS发布,带来大量修改

(LCTT译注:这是一则过期的消息,但是为了披露更新内容,还是发布出来给大家参考)著名的内核维护者GregKroah-Hartman貌似正在度假中,因为SashaLevin2016年2月16日的...

Linux发行版需要杀软吗?卡巴斯基推出免费KVRT病毒扫描清理工具

IT之家6月4日消息,你认为使用Linux发行版,需要杀毒软件吗?或许很多用户认为Linux发行版偏小众,因此受到黑客攻击的风险也相对较小,不过卡巴斯基并不这么认为,近期推出了适用于...

适合开发人员的 5款 Linux 发行版

什么是Linux?Linux是基于Unix的操作系统。由LinusTorvalds开发于1991年首次发布其内核。因为Linux是开源软件,其发行版由不同组织发布,因此不同的发行版具有不同的风格...

VMware Workstation 17.0 Pro 发布:新增 TPM 2.0 完美兼容Win11

IT之家11月18日消息,VMwareWorkstation17.0Pro现已发布,它带来了许多新特性,例如微软Windows11硬性要求:虚拟可信平台模块(TPM)2.0。...

你是否需要一个容器专用的Linux发行版本?

单单使用容器是不够的,提供商们认为你需要一个容器专用的Linux发行版本。我们可以让容器在不同的操作系统上运行,不同的操作系统都有自己的虚拟化服务,如:SolarisZones、BSDJails、...

Tizen 3.0版本发布 采用Linux 4.1内核

2015-09-2111:31:39作者:马荣【中关村在线软件资讯】9月21日消息:尽管三星靠着Android系统设备在移动市场赚钱,但是仍然没有忘记自家的Tizen开发。现在Tizen3.0版...

欧拉操作系统演进:应用累计超130万套 支持鲲鹏、英特尔、飞腾等芯片

21世纪经济报道记者倪雨晴深圳报道4月15日,在欧拉开发者大会(openEulerDeveloperDay2022)的主论坛上,欧拉首个数字基础设施全场景长周期版openEuler22.03...

Papyros:以Material Design为灵感的Linux发行版本

项目团队并不希望只是采用传统的桌面主题,而是致敬谷歌Android系统的MaterialDesign设计语言想要打造出某些不同以往足够吸引用户的Linux发行版本,自然该版本还在不断的更新和改进中,...

比特网早报:全国空间计量技术委员会成立,银河麒麟操作系统上架微信Linux4.0.0版本

2024年11月6日消息,昨夜今晨,科技圈都发生了哪些大事?行业大咖抛出了哪些新的观点?比特网为您带来值得关注的科技资讯:全国空间计量技术委员会在北京成立近日,经市场监管总局批准,全国空间计量技术委员...

2024年最稳定的5个Linux发行版,赶紧收藏!

Linux是最流行的免费开源平台之一。Linux已被广泛使用,因为它安全、可扩展和灵活。Linux发行版收集开源代码,对其进行编译,并将其组合成一个可以轻松启动和安装的操作系统。它们还提供不同的...

彰显Linux生态繁华,Ubuntu、Fedora等四发行版同时发布新版本

上周对于开源社区来说是忙碌的一周。EndeavourOS和TrueNASScale于周二(4月16日)发布,Fedora于周三(4月17日)发布,Ubuntu于周四(4月18日)发布。四个新版本中都...

取消回复欢迎 发表评论: