1.安装weblogic
2.安装xmanager
3.创建域
3.1.在aix unix下创建域
先通过
xmanager
登录系统,用户
root
口令
root
在
terminal
下执行
cd /bea/weblogic81/common/bin
./ config.sh
建新域的操作同下面的
windows
的操作
3.2在windows下创建域
1.
启动开始菜单的
quickstart
,
执行
create a new domain configuration
…
2
.下一步
3
.下一步,选自定义
4
.下一步,
name=myserver,listen port:6001
5
.下一步
6
.下一步,
user=weblogic password=weblogic
7
.下一步
8
.下一步,选择生产模式
aix
机器要选用
ibm
提供的
jdk,
路径:
/usr/java14
9
.下一步
10
.创建,完成
4.配置服务
4.1服务配置:
4.1.1启动口令配置文件:
在管理服务器的主目录中,例如:
/bea/user_projects/domains/mydomain
,创建文件
boot.properties
加入两行
username=weblogic
password=weblogic
4.1.2启动命令配置
在启动命令
startWebLogic.sh
最后加上
-DINDIGO_HOME=/bea/app
4.1.3系统环境设置
no -p -o udp_sendspace=32768
4.2集群服务配置:
4.2.1管理服务器配置----代理服务器
1.http://
管理服务器
:6001/console
2.
部署一个
web
应用
proxy.war
proxy.war
中的
web.xml
的地址需要作相应修改
,
参与
cluster
的服务器都需要加上。例如:
localhost1:9001|localhost2:9001
4.2.2管理服务器配置----cluster
1.http://
管理服务器
:6001/console
2.
新建一个
cluster
name = jungleCluster(
任意
)
clusteraddress =
被管理服务器
1:9001,
被管理服务器
2:9001
multicast Address = 237.0.0.1
multicast Port = 6000(
不能和
6001--
管理服务器和
9001--
被管理服务器重复
)
4.2.3管理服务器配置----managed server
1.http://
管理服务器
:6001/console
2.
新建一个
server
属于上面所建的
cluster
cluster = myCluster
name = MyServer1
listen address =
当前物理机器
ip
port = 6001
4.2.4被管理服务器配置
1.
从已建domain目录中,拷贝startManagedWebLogic.sh为startm.sh
2.
修改startm.sh文件,有五处要修改,下面有全部拷贝及其修改说明。
3.
用nohup ./startm.sh&启动
4.
如果要在别的物理服务器新建被管理服务器,在该服务器上安装bea,bea_home选择同样的目录
5.
从已建domain目录拷贝setEnv.sh,startm.sh,serializedsystemini.dat到该被管理服务器同样目录中
6.
修改startm.sh文件中SERVER_NAME= cluster中配置的服务器名
7.chmod 777 *
8.
用nohup ./starm.sh&启动
///////////////////////////////////
startm.sh
共五处要修改,修改完成后用如下命令启动:
nohup ./startm.sh&
///////////////////////////////////
#!/bin/sh
# ****************************************************************************
# This script is used to start a managed WebLogic Server for the domain in the
# current working directory. This script reads in the SERVER_NAME and
# ADMIN_URL as positional parameters, sets the SERVER_NAME variable, then
# starts the server.
#
# Other variables that startWLS takes are:
#
# WLS_USER - cleartext user for server startup
# WLS_PW - cleartext password for server startup
# PRODUCTION_MODE - Set to true for production mode servers, false for
# development mode
# JAVA_OPTIONS - Java command-line options for running the server. (These
# will be tagged on to the end of the JAVA_VM and MEM_ARGS)
# JAVA_VM - The java arg specifying the VM to run. (i.e. -server,
# -hotspot, etc.)
# MEM_ARGS - The variable to override the standard memory arguments
# passed to java
#
# For additional information, refer to the WebLogic Server Administration Guide
# (/ConsoleHelp/startstop.html).
# ****************************************************************************
# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="/bea/weblogic81"
# set up common environment
# Set Production Mode. When this is set to true, the server starts up in
# production mode. When set to false, the server starts up in development
# mode. If it is not set, it will default to false.
PRODUCTION_MODE=""
# Set JAVA_VENDOR to java virtual machine you want to run on server side.
JAVA_VENDOR="IBM"
# Set JAVA_HOME to java virtual machine you want to run on server side.
JAVA_HOME="/usr/java14"
. "${WL_HOME}/common/bin/commEnv.sh"
# Set SERVER_NAME to the name of the server you wish to start up.
ADMIN_URL=http://10.140.129.140:6001
#
旧:
SERVER_NAME=
#
新:
SERVER_NAME=server45
SERVER_NAME=server141
# Set WLS_USER equal to your system username and WLS_PW equal
# to your system password for no username and password prompt
# during server startup. Both are required to bypass the startup
# prompt.
#
旧:
WLS_USER=
#
新:
WLS_USER=weblogic
WLS_USER=weblogic
#
旧:
WLS_PW=
#
新:
WLS_PW=weblogic
WLS_PW=weblogic
# Set JAVA_VM to java virtual machine you want to run on server side.
# JAVA_VM=""
# Set JAVA_OPTIONS to the java flags you want to pass to the vm. If there
# are more than one, include quotes around them. For instance:
# JAVA_OPTIONS="-Dweblogic.attribute=value -Djava.attribute=value"
usage()
{
echo "Need to set SERVER_NAME and ADMIN_URL environment variables or specify"
echo "them in command line:"
echo 'Usage: ./startManagedWebLogic.sh [SERVER_NAME] [ADMIN_URL]'
echo "for example:"
echo './startManagedWebLogic.sh managedserver1 http://localhost:7001'
exit 1
}
# Check for variables SERVER_NAME and ADMIN_URL
# SERVER_NAME and ADMIN_URL must by specified before starting a managed server,
# detailed information can be found at /adminguide/startstop.html.
if [ ${#} = 0 ]; then
if [ "x${SERVER_NAME}" = "x" -o "x${ADMIN_URL}" = "x" ]; then
usage
fi
elif [ ${#} = 1 ]; then
SERVER_NAME=${1}
if [ "x${ADMIN_URL}" = "x" ]; then
usage
fi
elif [ ${#} = 2 ]; then
SERVER_NAME=${1}
ADMIN_URL=${2}
else
usage
fi
# Start WebLogic server
# Reset number of open file descriptors in the current process
# This function is defined in commEnv.sh
resetFd
CLASSPATH="${WEBLOGIC_CLASSPATH}${CLASSPATHSEP}${POINTBASE_CLASSPATH}${CLASSPATHSEP}${JAVA_HOME}/jre/lib/rt.jar${CLASSPATHSEP}${WL_HOME}/server/lib/webservices.jar${CLASSPATHSEP}${CLASSPATH}"
export CLASSPATH
# Start WebLogic server
echo CLASSPATH="${CLASSPATH}"
echo
echo PATH="${PATH}"
echo
echo "***************************************************"
echo "* To start WebLogic Server, use a username and *"
echo "* password assigned to an admin-level user. For *"
echo "* server administration, use the WebLogic Server *"
echo "* console at http://:/console *"
echo "***************************************************"
#
旧:
#
新:
MEM_ARGS="-Xms256m -Xmx512m -Xrs"
MEM_ARGS="-Xms256m -Xmx512m -Xrs"
"$JAVA_HOME/bin/java" ${JAVA_VM} ${MEM_ARGS} ${JAVA_OPTIONS} /
-Dweblogic.Name=${SERVER_NAME} /
-Dweblogic.management.username=${WLS_USER} /
-Dweblogic.management.password=${WLS_PW} /
-Dweblogic.management.server=${ADMIN_URL} /
-Djava.security.policy="${WL_HOME}/server/lib/weblogic.policy" /
weblogic.Server
新加
-Djava.awt.headless=true
4.2.5weblogic配置和管理
1
.管理服务器的
queue=
被管理服务器
queue
的和
+1
配置页面:
beadomain> Servers> admin> Execute Queue> weblogic.kernel.Default>Thread Count:
2
.启动命令
startWebLogic.sh
需配置
-DINDIGO_HOME=/bea/app
4.3 weblogic配置:
4.3.1启动服务:
一.
aix unix
操作系统:
通过
xmanager
登录系统,在
terminal
下执行
cd /bea/user_projects/domains/mydomain/
./startWebLogic.sh
二.
windows
的操作
在开始菜单启动服务
4.3.2打开控制台
http://地址:端口/console
如:
http://10.158.212.45:7001/console
Username
:
weblogic
Password: weblogic
4.3.3Listen Address配置:
配置如图所示页面中
Listen Address:
为应用服务器地址
4.3.4SSL Listen Port配置:
4.3.5数据库连接配置:
一、连接池配置:
在
配置连接池
第一步, Configure a new JDBC Connection Pool...
第二步,按图所示选择
oracle
,按
continue
第三步,按下面配置要求配置数据库
第四步,可根据数据库实际配置修改
url
配置
Name
|
URL
|
Driver Classname
|
Deployed
|
|
thin_amber
|
jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.158.212.49)(PORT=1521)))(CONNECT_DATA =(SERVICE_NAME = ciswf)))
|
oracle.jdbc.OracleDriver
|
true
|
|
thin_dlyx
|
jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.158.212.49)(PORT=1521)))(CONNECT_DATA =(SERVICE_NAME = ciswf)))
|
oracle.jdbc.OracleDriver
|
true
|
|
thin_owf_mgr
|
jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.158.212.49)(PORT=1521)))(CONNECT_DATA =(SERVICE_NAME = ciswf)))
|
oracle.jdbc.OracleDriver
|
true
|
|
thin_wf_amber
|
jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.158.212.49)(PORT=1521)))(CONNECT_DATA =(SERVICE_NAME = ciswf)))
|
oracle.jdbc.OracleDriver
|
true
|
|
第五步,创建部署完成
重复上面操作,配置所有的连接池连接
二、数据源配置:
在
配置数据源
第一步, Configure a new JDBC Data Source
第二步,按下面配置配置
name
、
JNDI name
Name
|
JNDIName
|
Pool Name
|
Row Prefetch Enabled
|
Enable Two Phase Commit
|
Stream Chunk Size
|
Row Prefetch Size
|
Deployed
|
|
ds_amber
|
indigo/jdbc/default
|
thin_amber
|
false
|
false
|
256
|
48
|
true
|
|
ds_dlyx
|
indigo/jdbc/dlyx
|
thin_dlyx
|
false
|
false
|
256
|
48
|
true
|
|
ds_owf_mgr
|
indigo/jdbc/wf_oracle
|
thin_owf_mgr
|
false
|
false
|
256
|
48
|
true
|
|
ds_wf_amber
|
indigo/jdbc/wf_Indigo
|
thin_wf_amber
|
false
|
false
|
256
|
48
|
true
|
|
第三步,选择
pool name
,
continue
第四步,
create
重复上面的操作,将全部数据源配置完成
4.3.6数据库连接其他配置
在
页面中点击
选中
Test Reserved Connections
在
Test Table Name:
输入SQL SELECT 1 FROM DUAL
在Init SQL:
输入SQL ALTER SESSION SET NLS_LANGUAGE= 'SIMPLIFIED CHINESE'
重复上面的操作,对每一个连接池连接都做配置
4.3.7JMS配置
在
配置JMS服务
第一步, Configure a new JMS Connection Factory...
第二步,配置JNDI name为weblogic.examples.jms.TopicConnectionFactory,然后create完成配置
4.3.8证书设置
第一步、修改本地文件
ca.bat
中
代理服务器地址改为服务器地址,放在
bea/weblogic81/server/lib/
(
genSSL
)
并执行
sh < ca.bat
copy myKeyStore.jks
到
/bea/weblogic81/server/lib/
第二步、在下面页面上点击
change
第三步、选择
Keystores:
,continue
第四步、按照下面配置输入相应设置
Custom Identity Keystore: /bea/weblogic81/server/lib/myKeyStore.jks
Type: JKS
Passphrase: password
Custom Trust Keystore: /bea/weblogic81/server/lib/myKeyStore.jks
Type: JKS
Passphrase: password
Private Key Alias: longshinekey
Passphrase: password
最后
apply
完成
4.4部署应用服务
在下图左侧树中点application,点击 Deploy a new Application...部署新应用服务
在下图中选择应用程序路径,应用程序放在
{bea_home}/
点击
target application
部署应用
选择
server
,
continue
部署完成