What Is WebLogic Server?
WebLogic Server is an application server: a platform for developing and deploying multitier distributed enterprise applications. WebLogic Server centralizes application services such as Web server functionality, business components, and access to backend enterprise systems. It uses technologies such as caching and connection pooling to improve resource use and application performance. WebLogic Server also provides enterprise-level security and powerful administration facilities.
WebLogic is a server software application that runs on a middle tier, between back-end databases and related applications and browser-based thin clients.
System Requirements:
Platform configuration : A supported configuration of hardware, operating system, JDK, and database specific to the product you are installing.
Processor : 1-GHz CPU
Memory : A Minimum of 1 GB RAM
Color bit depth display and size : 8-bit color depth (256 colors) is required
http://docs.oracle.com/cd/E13196_01/platform/docs81/install/prepare.html#1130320
Administration Server is central configuration for entire domain.Also;
Hosts the Administration Console,
Start and stop servers from a central console,
To migrate servers and services within domain,
There must be absolutely one Administration Server
Managed Server is running instance that hosts application.Each of them is independent of other managed servers in the domain.(if not they are in a cluster) Its up to you that how many define managed servers in one domain.
Node Manager is running on a physical server that enables you to start,stop or suspend and restart WebLogic server remotely.(Optional)
Monitor the self-reported health of managed servers and automatically kill server instances whose health state is “failed.”
Automatically restart managed servers that have the “failed” health state, or have shut down unexpectedly due to a system crash or reboot.
Dowloand WebLogic Server:
http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
There are 3 way to install WebLogic Server
1-Graphical-Mode Installation
2-Console-Mode Installation
3-Silent-Mode Installation
if you dowloand jar file “wls1036_generic.jar” ==>
cmd >> Go to jar directory >> java -jar -D64 wls1036_generic.jar Then it’s gonna open graphical mode;
2-Choose Middleware Home Directory .İf you choose create a new Middleware Home,dont browse it just write your directory manually because of confusing.
3- You can jump register for securty updates like;
4- Choose Typical then go on
5- Dont have JDK on your Installiation graphical screen, Browse your JDK.
After Done ,Quick Start will run,
Choose “Getting started with WebLogic Server 10.3.6”
Create a new WebLogic domain
Go on
Give new Domain name and next
Give user password like “welcome1”
**************************************************************
startServer(adminServerName=”AdminServer”, domainName=”FoundationA”, jvmArgs=”-XX:MaxPermSize=256m, -Xmx512m”)
startNodeManager (verbose=”true”, SecureListener=”false”, ListenPort=”5451″)
connect(“weblogic”,”welcome1″,”t3://localhost:7001″)
***************** Change Node manager listen address
edit()
startEdit()
cd(“Machines”)
cd(“Machine_1”)
cd(“NodeManager”)
cd(“Machine_1”)
cmo.setListenPort(5451)
cmo.setNMType(“Plain”)
save()
activate()
******** Set jvm args for the managed servers
***********************************************************
start(“ManagedServer_1″,”Server”)
start(“ManagedServer_2″,”Server”)
deploy(“wlnav”,”D:\\wlnav.war”,targets=”ManagedServer_1″)
http://localhost:7003/wlnav
nmConnect(username=’weblogic’, password=’welcome1′,domainName=’FoundationA’, port=’5451′, nmType=’plain’)
nmServerStatus(“ManagedServer_1”)
shutdown(name=”ManagedServer_1″)
nmDisconnect()
shutdown()
exit()
**************************************************************
readTemplate(“D:\\root\\wls35\\user_templates\\foundationa_10.3.5.0.jar”)
setOption(“OverwriteDomain”,”true”)
setOption(“DomainName”,”FoundationB”)
writeDomain(“D:\\domains\\FoundationB”)
***************************************************************
set Path=%Path%;D:\root\Oracle\Middleware\wlserver_10.3\common\bin
pack.cmd -domain=”D:\\domains\\FoundationB” -template=”managedFoundationB.jar” -template_name=”FoundationB managed server template” -managed=true
unpack.cmd -domain=”D:\\domains\\FoundationC” -template=”managedFoundationB.jar”
**************************************************************************
Managing Security Data with WLST
————————————-
from weblogic.management.security.authentication import UserEditorMBean
realm=cmo.getSecurityConfiguration().getDefaultRealm()
atnr=realm.lookupAuthenticationProvider(“DefaultAuthenticator”)
atnr.createUser(‘mark’,’password1′,’New wls user’)
from weblogic.management.security.authentication import GroupEditorMBean
atnr.createGroup(‘plainUsers’,’Ordinary People’)
atnr.addMemberToGroup(‘plainUsers’,’mark’)
from weblogic.management.security.authentication import UserReaderMBean
realm=cmo.getSecurityConfiguration().getDefaultRealm()
atnr=realm.lookupAuthenticationProvider(“DefaultAuthenticator”)
cursor = atnr.listUsers(“*”,0)
groupReader=atnr
atnr.getCurrentName(cursor)
‘weblogic’
atnr.advance(cursor)
atnr.getCurrentName(cursor)
‘mark’
atnr.advance(cursor)
atnr.getCurrentName(cursor)
atnr.close(cursor)
disconnect()
More on: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_scripting/config_WLS.html#wp1022
**************************************************************************
Side-by-side Deployment (Production Mode)
————————————-
java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password welcome1 -deploy -name ShoppingCart -source “D:\\docs\\my_docs\\my_workshops\\WLS Foundation\\WLS 11g – Student Kit\\day2\\apps\\Shopping\\Version1\\app\\ShoppingCart.war”
java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password welcome1 -listapps
java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password welcome1 -redeploy -retiretimeout 120 -name ShoppingCart -source “D:\\docs\\my_docs\\my_workshops\\WLS Foundation\\WLS 11g – Student Kit\\day2\\apps\\Shopping\\Version2\\app\\ShoppingCart.war”
java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password welcome1 -undeploy -name ShoppingCart -appversion Version1
**************************************************************************
Admin Mode Deployment (Production Mode)
————————————-
java -Dweblogic.security.TrustKeyStore=DemoTrust weblogic.Deployer -adminurl t3s://localhost:9002 -user weblogic -password welcome1 -distribute -name ShoppingCart -source “D:\\ShoppingCart.war”
java -Dweblogic.security.TrustKeyStore=DemoTrust weblogic.Deployer -adminurl t3s://localhost:9002 -user weblogic -password weblogic1 -start -adminmode -name ShoppingCart -appversion Version1
java -Dweblogic.security.TrustKeyStore=DemoTrust weblogic.Deployer -adminurl t3s://localhost:9002 -user weblogic -password weblogic1 -listapps
https://localhost:9002/ShoppingCart/
https://localhost:9002/console
http://download.oracle.com/docs/cd/E14571_01/web.1111/e13702/config.htm#i1065371
wls:/offline> nmConnect(“weblogic”,”weblogic1″,”localhost”,”5556″,”dizzyworld”,”D:/root/wls/user_projects/domains/dizzyworld”,”ssl”)
startServer(adminServerName=”AdminServer”, domainName=”FoundationA”, jvmArgs=”-XX:MaxPermSize=256m, -Xmx512m”)
startServer (adminServerName=”AdminServer”,domainName=”FoundationA”,”weblogic”,”weblogic1″)
startManagedWebLogic.cmd ManagedServer_1
****************************************************************
Start Servers
Admin Server Command
D:\root\Oracle\Middleware\user_projects\domains\ClusterLab\bin
startWeblogic.cmd
ManagedServer 1
cd D:\root\Oracle\wls\user_projects\domains\ClusterLab\bin\
startManagedweblogic.cmd “dizzy1” http://localhost:7001
ManagedServer 2
cd D:\root\Oracle\wls\user_projects\domains\ClusterLab\bin\
startManagedweblogic.cmd “dizzy2” http://localhost:7001
ManagedServer 3
cd D:\root\Oracle\wls\user_projects\domains\ClusterLab\bin\
startManagedweblogic.cmd “dizzy3” http://localhost:7001
*****************************************************************
Deploy application
cd D:\root\Oracle\wls\user_projects\domains\ClusterLab\bin
setDomainEnv.cmd
java weblogic.Deployer -username weblogic -password weblogic -targets dizzy1,dizzy2,dizzy3 -deploy D:\browsestore.war
http://localhost:7003/browsestore
*****************************************************************
Deploy Proxy Server
cd D:\root\Oracle\wls\user_projects\domains\ClusterLab\bin\
startManagedweblogic.cmd “proxyServer” http://localhost:7001
java weblogic.Deployer -username weblogic -password weblogic -targets proxyServer -deploy D:\proxyApp.war
http://localhost:7003/browsestore
******************************************************************
install apache to C:\Apache Software Foundation\Apache2.2\
copy mod_wl_22.so to C:\Apache Software Foundation\Apache2.2\modules
change http.conf ServerRoot “C:/Apache Software Foundation/Apache2.2” in 3 places
******************************************************************
in memory session state replication
relication group: dizzyRepGroup1
preferred secondary group: dizzyRepGroup2
deploy shopping cart application
cd D:\root\Oracle\wls\user_projects\domains\ClusterLab\bin
setDomainEnv.cmd
java weblogic.Deployer -username weblogic -password weblogic -targets dizzy1,dizzy2,dizzy3 -deploy D:\ShoppingCart.war
http://localhost:7009/ShoppingCart
******************************************************************
Lab 5 – JDBC Session State Replication
create user weblogic identified by weblogic;
grant all privileges to weblogic;
CREATE TABLE “WEBLOGIC”.”WL_SERVLET_SESSIONS”
(WL_ID VARCHAR ( 100) NOT NULL
, WL_CONTEXT_PATH VARCHAR ( 100) NOT NULL
, WL_IS_NEW CHARACTER (1)
, WL_CREATE_TIME DECIMAL ( 20)
, WL_IS_VALID INTEGER
, WL_SESSION_VALUES BLOB
, WL_ACCESS_TIME DECIMAL ( 20) NOT NULL
, WL_MAX_INACTIVE_INTERVAL INTEGER,
PRIMARY KEY (WL_ID, WL_CONTEXT_PATH)
);
http://localhost:7009/ShoppingCart