Sunteți pe pagina 1din 27

Oracle WebLogic Installation Steps

Oracle WebLogic Server is J2EE Server (earlier known as BAEWebLogic Server) similar to Oracle Application Server. This post covers installation of Oracle WebLogic Server with available installation Mode and Components. You can download Oracle WebLogic Software from here (Currently it is available on Windows, Linux and Solaris and can be installed on Windows Vista also) A. Installation Mode BEA products can be installed in following mode i) Graphical Mode Interactive GUI based ii) Console Mode Interactive Text Based (-mode=console) iii) Silent Mode- Non Interactive method using XML properties file (-mode=silent -silent_xml=properties_xml_file) B. Installation Type i) Complete or ii) Custom C. Installation Component Depending on type of installer you choose, you get following kind of component 1) WebLogic Server Server Server Examples Server Add-ons 2) Workshop Workshop for WebLogic Workshop Runtime Framework 3) WebLogic Integration Integration Server Workshop Integration Extension Integration Examples 4) WebLogic Portal Portal Server Workshop Portal Extension Portal Examples

D. Installation Requirement i) Hard Disk- Approx 3.5 GB for complete installation. ii) Memory Minimum 1GB as per documentation (will work on 500MB as well) iii) JDK - JDK (Java Development Kit Not required on windows on Unix install JDK 4,5 or 6) iv) BEA HOme Directory This directory is repository for common files used by multiple BEA products. v) Product Installation Directory- Specific to particular BEA product like WebLogic Server, Workshop for WebLogic, WEbLogic Integration vi) Temp Directory approx 2.5 times of total installation (this will be cleaned up after installation) E. Things to consider 1. Try NOT to give space in directory for BEA_HOME (like Program Files) 2. Try Not to exceed 12 characters when naming BEA_HOME 3. You can specifiy installation log file during installation like -log=/myinstalllog.log 4. To start installation in console mode use -mode=console 5. To start in silent mode, create silent.xml file containing all values and use -mode=silent silent_xml=<location of silent.xml> F. Installation Steps 1. Welcome 2. Choose BEA Home 3. Choose Install Type (Complete , Custom). If you selected Custom, Go to 4 else go to 5 4. Choose Product and Component (mentioned in step C above) 5. Choose Product Installation Directories 6.Install Windows SErvice (only if installation is on windows AND You have administrative privileges AND this is first installation AND this is CUSTOM installation) 7. Installation complete Start Installation on Windows/Linux Go to location where you have download software and start installation as server1001_win32.exe -mode=console -log=c:\weblogic.log Replace server1001_win32.exewith executable name on Linux/Solaris and change location to directory as per Unix like /home/bea/weblogic.log (This will install BEA in interactive console mode)

Domain , Administration & Managed Server, Cluster in Oracle WebLogic


Before creating domains let us understand Domain, Administration Server,Managed Server and Cluster in Oracle WebLogic. In next post Well learn how to create basic Domain (Administration Server only) and Domain with Managed Server Cluster (one Administration Server and two Managed Server in cluster) using Configuration Manager.

What is domain in WebLogic ?

Domain is logical grouping of resources and services and consist of Administration Server, Managed Server and cluster. There can only be one administration Server in domain and zero to N Managed Server. What is Administration Server ? Administration Server is WebLogic Server instance that maintains configuration data for a domain. You can deploy your application on administration Server but it is recommended to create managed Server and deploy your application in managed server and leave Administration domain for configuration and maintenance. There will always be atleast one Administration Server in a domain. What is Managed Server ? Any WebLogic Server instance apart from Administration Server is called asManaged Servers. This is weblogic server where you deploy your application (Though you can deploy your application in Administration server as well but it is not recommended in production/UAT instance)

What is Cluster in WebLogic ? Group of WebLogic Managed Server Instances that work together to provide high availability and scalability for applications is called cluster. WebLogic Servers with in cluster can run on same machine or different machines. These are also called as managed Server cluster. Things you should know before creating domain in WebLogic Server ? You use configuration wizard to create or extend domain but this can be used only in offline mode (when weblogic server is not running) You can also use WLST (WebLogic Scripting Tool), command line tool to create and extend domains in WebLogic Server. You can also use unpack command to create new domain. This command cantbe used to extend domain. Extending a domain means, you already created domain and now wish to extend it (use more application, add managed server, create cluster) Configuration wizard can be run in Graphical Mode (interactive GUI) or Console Mode (interactive text based) For silent mode use WLST (WebLogic Scripting Tool) While creating domain you specify Startup Mode (Development orProduction). In development mode, you get autodeploy option and security is low. In production mode you need username/password to deploy applications. When you create domain, it creates following directories i) autodeploy ii) bin iii) config (config.xml for domain sits here) iv) console-ext v)lib vi) security vii) servers You use config.cmd (windows) or config.sh (unix) from $BEA_HOME/ wlserver_<ver>/ common/ bin to start configuration manager to create domain Below Flowchart (image from Oracle Documentation) displays steps to create domain

Create Domain in Oracle WebLogic


After WebLogic installation Here, next step is to create Domain. This post cover steps to create Domain in WebLogic (Simple Administration Server or Advanced one Administration Server and two Managed Server in a Cluster). There are multiple ways to create domain, steps mentioned here are usingConfiguration Manager Wizard (config.sh or config.cmd). For Unix/Windows start configuration wizard using $BEA_HOME/ wlserver_10.0/ commom/ bin/ config.cmd (windows) or config.sh(UNix) To Start configuration wizard in console mode use - config.[cmd|sh] -mode=console Screenshot below for creating Domain in WebLogic using Configurtaion Manager in GUI mode. Start Configuration Manager using command given above (config.sh / config.cmd) 1) Create or Extend Domain In First screen you select if you wish to Create new WebLogic Domain or Extend an Existing WebLogic Domain.

Extending WebLogic Domainmeans you already have WebLogic Domain and want to add more Managed Server or configure cluster or configure additional applications.

2) Select Domain Source -

3) Configure Administrator In below screen you define UserName and Password for WebLogic Domain and add/grant Administrator Role to that User (This user name /password will be used to start/stop domain if Mode of domain is Production and to login to domain Admin WebConsole)

4) Select JDK & Start Mode - In below screen, you define Mode in which you wish to start your domain and JDK (Sun, JRockit or any other JDK)

Production Mode- Domain is more secure, You need username password to start domain or deploy application. Development Mode- Not very secure, You can Autodeploy application and no need to provide username/password to start Domain.

5) Customize your domain Using below screen you can customize your domain(Create Managed Server, Cluster, JDBC Source, JMS File Store). Select initially No to create simple domain with Just one Administration Server (You can deploy your application in Administration Server but this is not recommended in Production Instance). To create Advanced Domain (one Administration Server and two Managed Server and Cluster) go to Step 8 )

6) In next screen you provide Domain Name, Location of Domain.

7) Finally, If you are installing on Windows, you can select to Start Admin Server

Click Done to finish Domain Installation. Next Step, go to Start WebLogic and access Domain Console from browser at end of this post. Create Domain with one Administration Server and two Managed Server Instance in Cluster Steps here are to create new Domain with one Administration Server (AdminServer), two Managed Server (MS1 & MS2) in cluster (cluster_1) - Administration Server and both Managed Server are installed on single machine (you can configure them on multiple servers as well). Administration Server Name AdminServer Listen Address All IP address on machine Listen port 7003 SSL Listen Port 7004 Managed Server 1 Name ms1 Listen Address All IP address on machine Listen port 7103 SSL Listen Port 7104

.Managed Server 2 Name ms2 Listen Address All IP address on machine Listen port 7203 SSL Listen Port 7204. Cluster Details Cluster Name cluster_1 Multicast Address 239.192.0.0 Multicast Port 8050 Cluster Address 127.0.0.1 Cluster Member ms1 & ms28 ) Start with step 1) to 4) as shown above on screen 5) Customize Environment select Yes as shown below

9) Configure Administration Server - configure Administration Server using this screen like Name, Listen & SSL Listen Port

10) Configure Managed Server - click on Add to add managed Server

11) Configure Managed Server Add two managed server (ms1:7103:7104 & ms2:7203:7204)

12) Configure Cluster click on Add to create cluster and add Managed Server in Cluster. If you have NOT defined any managed server in previous screen, you will NOT get this screen.

13) Configure Cluster- Define cluster with Cluster Name, Multicast Address, Port and address.

14) Assign Server to Cluster Use this screen to add Managed Server on Left hand side to Cluster on right hand side.

15) Assign Server to Cluster as shown in below screen shot, We added MS1 & MS2 to cluster_1

16) Configure Machine Use this screen if you have more than one machine in your system. In our configuration Administration Server and all Managed Server are on single machine.

17) Review WebLogic Domain

18) Create WebLogic Domain define Domain Name and Domain Location on this screen. This screen is similar to step 6) above

Start WebLogic Domain Once you have successfully created domain, next step is to start weblogic domain and access Administration Console. (Steps here are to start basic domain only one Administration Server, Start/Stop WebLogic Server Administration and Managed Server coming soon ) Startup Script $BEA_HOME/user_projects/domain/<domain_name>/bin/startWebLogic.sh (Unix) $BEA_HOME\user_projects\domain\<domain_name>\bin\startWebLogic.cmd(Windows) I installed domain with name base_domain and my BEA_HOME is c:\bea hence to start my domain c:\bea\user_projects\ domains\ base_domain\ bin\ startWebLogic.cmd Access Administration Console Default Administration Port is 7001 so use port as 7001 (else use port you entered while creating WebLogic Domain) http://<servername>.domain:7001/console or http://localhost:7001/console (If you are accessing from server directly) Login to WebLogic Admin Console using UserName/Password created during WebLogic Domain Creation.

After successful login you should get screen like below.

Oracle WebLogic Server Startup/Shutdown


Next step after WEbLogic Installation and Domain Creation here Domain Creation is to know about startup/shutdown in WebLogic Server. Before starting services in Oracle WebLogic, ensure that you are familiar withDomain, Administration & Managed Server There are multiple ways to start WebLogic Server(listed below). This post covers WebLogic Startup/Shutdown using scripts. Start WebLogic using Node Manager, WLST (WebLogic Scripting Tool) or other tools coming soon There are two type of WebLogic Server instance in a domain,Administration Server and Managed Server. You can start Managed Server without Administration Server with exception for first time. If you are starting Managed Server for first time]then Administration Server should be Up. Managed Server can cache config files locally(in its local config directory) and later Managed Server can start on its own. To start Managed Server using script, supply Admin Server protocol, Server Name and Listen Port(check startup command for more information).

If startup mode of domain is production then startup will prompt you for username & password to start services (You can create define username/password inboot.properties file. Coming soon !!!). If you create domain and startup mode is development then startup will not prompt for username/password as username password are stored in boot identity file in security directory of Domain at BEA_HOME / user_projects / domains / <domainName> / servers/ <serverName>/ security / boot.properties

. Ways to start Administration Serverin Oracle WebLogic 1.Using startup script 2. From Windows Start Menu (windows only) 3. Using java weblogic.Server command 4. Using WLST (WebLogic Scripting Tool) and Node Manager 5. Using WLST without Node Manager . Ways to start Managed Serverin Oracle WebLogic 1.Using startup script 2. Using Administration Console 3. Using WLST and Node Manager 4. Using java weblogic.Server command . 1. Starting Administration Server (startWebLogic.cmd or .sh) 2. Starting Managed Server (startManagedWebLogic.sh or .cmd) . A. To Start WebLogic Administration Server Instance Go to domain for which you wish to start Administration Server cd $BEA_HOME/user_projects/domains/<domain_name>/bin startWebLogic.cmd (for Windows) startWebLogic.sh (for Unix)

confirm that WebLogic Adminstration Server started properly by looking at message Service started RUNNING mode. Log file in below picture shows thatAdminSever is listening on Port 7001 and all IP addresses on specific machine.

Startup/Shutdown Log file can be found at $BEA_HOME/ user_projects/ domains/ <domain_name> /servers/<ServerName> /logs / <ServerName>.log . B. Start Managed Server Instance If you created Managed Server while creating domain then you can start Managed Server using startManagedWebLogic command $BEA_HOME/user_projects/domains/<domain_name>/bin startManagedWebLogic.cmd <managed_server_name> <admin_url> (for Windows) startManagedWebLogic.sh <managed_server_name> <admin_url> (for Unix) I created Managed Server MS1 with Admin Port as 7003 startManagedWebLogic.cmd ms1 http://localhost:7003 (Windows)

Deploy Application on Oracle WebLogic Server


Things good to know before deploying application on Oracle WLS i) User with Admin or Deployer role can deploy application

ii) Weblogic supports following type of deployment unit a) EAR file (Enterprise Archive) b) WAR file (Web Archive) c) JAR files, EJB (Enterprise Java Beans) d) RAR (Resource Adapter/Connector ) e) Web Services (WAR/JAR) f) J2EE Library g) CAR (Client Application Archive) Web Archive configuration file is usually ../WEB-INF/web.xml Enterprise Application (EAR) configuration file is usually /META-INF/application.xml iii) Application name can contain only following character (a-z, A-Z, 0-9, underscore, hyphen, . period/dot) iv) Application name with only period/dot (like . or .. or ) is not valid name, it should contain at least one other character. v) Application Name should be 215 character or less . Tools used to deploy/configure applications 1) weblogic.Deployer command line interface 2) Administration Console Web based interface 3) WLST(WebLogic Scripting Tool) command line tool to automate deployment configuration and operation 4) Tool for developers (wldeploy, weblogic.PlanGenerator, API, autodeploy) . Steps to Deploy Application using Administration Console In this post Ill cover steps to deploy application using Administration Console Download Sample Application from here use this file to deploy on WebLogic Server. 1. Start Administration Console if its not Up already (In my case Administration Server is listening on port 7001)

2) Access Administration console using URL http(s):// <hostName>:<port>/console 3) Login using User (with admin or deployer role) weblogic in my case 4) First step is to acquire Lock as shown in screen

5) Click on deployment

6) Click on Install button

7) Select Application (war, jar, ear) File . You should get this application (war, ear, jar) file from development team.

Select Install this deployment as Application and click Next

9) Activate Canges by clicking on button on left as shown in screen

10) Start Application by clicking on Start Button

S-ar putea să vă placă și