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

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

sinye56 2024-10-01 20:08 4 浏览 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)

相关推荐

linux安装FTP

1、在nkftp目录下安装ftp,进入到nkftp里面[root@localhostbin]#cd/data/nkftp执行安装命令:[root@localhostnkftp]#rpm-i...

LINUX下搭建FTP服务器

FTP服务器介绍FTP是FileTransferProtocol(文件传输协议)的英文简称,而中文简称为“文传协议”。用于Internet上的控制文件的双向传输。同时,它也是一个应用程序(App...

Linux下如何进行FTP设置

目录:一、Redhat/CentOS安装vsftp软件二、Ubuntu/Debian安装vsftp软件一、Redhat/CentOS安装vsftp软件1.更新yum源yumupdate-y2.安...

推荐使用集串口 SSH远程登录和FTP传输三合一工具MobaXterm

来源:百问网作者:韦东山本文字数:1216,阅读时长:4分钟在以前的资料里,串口和SSH远程登使用SecureCRT,window与ubuntu数据传输使用filezilla,窗口切换来切换去,麻烦也...

如何搭建FTP服务器(Linux系统)

上次说了Windows操作系统下搭建的FTP服务器,那有朋友问我,说买的XX轻量应用服务器都是属于Linux的操作系统,我该如何为搭建FTP服务器呢?...

Linux 命令 ncftp(文件传输)——想玩转linux就请一直看下去

我是IT悟道,点击右上方“关注”,每天分享IT、科技、数码方面的干货。Linuxncftp命令...

如何用 ftp 实现一键上传

简介ftp是Internet标准文件传输协议的用户界面,它允许用户与远程网络站点之间传输文件...

Linux安装ftp

1安装vsftpd组件安装完后,有/etc/vsftpd/vsftpd.conf文件,是vsftp的配置文件。[root@bogon~]#yum-yinstallvsftpd2添加一个...

一天一点点:linux - ftp命令

linuxftp命令设置文件系统相关功能。FTP是ARPANet的标准文件传输协议,该网络就是现今Internet的前身。语法ftp[-dignv][主机名称或IP地址]参数:-d详细显示指令执...

Centos 7 搭建FTP

目录安装软件以及启动服务添加防火墙规则关闭selinuxftp配置常用常用参数详解特殊参数配置文件没有的参数也可以添加到配置中1.安装软件以及启动服务yuminstall-yvsftpdsys...

【Linux】Linux中ftp命令,没有你想的那么简单

本文介绍了Linux中FTP命令的基本用法,包括连接与登录远程服务器,以及解析了FTP协议中五个最常用的操作命令的使用和解析过程。同时,提供了一个包含常用FTP操作命令的表格,供读者参考。通过熟练掌握...

linux 命令行操作ftp

以下是linuxftp命令参数的详解。FTP>!从ftp子系统退出到外壳?FTP>?显示ftp命令说明??和help相同?格式:?[command]说明:[com...

多学习才能多赚钱之:linux如何使用ftp

linux如何使用ftp步骤1:建立FTP连接想要连接FTP服务器,在命令上中先输入ftp然后空格跟上FTP服务器的域名'domain.com'或者IP地址例如:ftpdom...

linux常用网络操作方法:ftp命令使用方法

常用网络操作方法Linux提供了一组强有力的网络命令来为用户服务,这些工具能够帮助用户登录到远程计算机上、传输文件和执行远程命令等。本节介绍下列几个常用的有关网络操作的命令:ftp传输文件tel...

Linux 5.15有望合并Memory Folios方案 内核构建速度可提升7%

甲骨文公司的长期内核开发人员MatthewWilcox已经研究了“内存对开区”概念相当长的一段时间,这可以改善Linux的内存管理,使其具有更大的效率。例如,使用内存对开的基准测试表明,内核的构建速...

取消回复欢迎 发表评论: