Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Wednesday, July 16, 2014

Create weblogic domain using silent install

Create weblogic domain using silent file.



Create the silent file that you will use for domain creation:-
=====================================

vi /weblogic_path/stage/response_files/wl_create_domain_demo.rsp
************ File starts here ***********
read template from "/weblogic_path/WL_DEMO/wlserver_10.3/common/templates/domains/wls.jar";

set JavaHome "/weblogic_path/java/jdk1.8.0_05"; //Set JDK to use

set ServerStartMode "dev"; //production mode or development mode

//To create a Admin server find it from wls template
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "";
set AdminServer.ListenPort "8001";
set AdminServer.SSL.Enabled "true";
set AdminServer.SSL.ListenPort "8002";

//We can directly create a new managed server.
create Server "ms1" as MS1;
set MS1.ListenAddress "";
set MS1.ListenPort "8003";
//set MS1.SSL.Enabled "true";
//set MS1.SSL.ListenPort "7004″;

//Craeting Cluster
//create Cluster "MyCluster" as MyCl;

//Putting managed servers into the cluster
//assign Server "MS1″ to Cluster "MyCluster";
//assign Server "MS2″ to Cluster "MyCluster";

//Create Machine
create Machine "shaiksameer.com" as Machinename;

//Create JDBC datasource and targeting it to cluster
//create JDBCConnectionPool "demoPool" as mypool;
//set mypool.DriverName "com.pointbase.jdbc.jdbcUniversalDriver";
//set mypool.URL "jdbc:pointbase:server://localhost:9092/demo";
//set mypool.Password "PBPUBLIC";
//set mypool.Properties "user=PBPUBLIC";
//assign JDBCConnectionPool "*" to target "MyCluster";

//Create File Store
//create JMSFileStore "FileStore" as filestore;
//set filestore.Directory "d:\FStore";
//create JMS server
//create JMSServer "JMSServer" as jmsserver;
//set jmsserver.PersistentStore "FileStore"; //Add persistence store to the JMS server
//assign JMSServer "*" to target "MS1″;

//create JMS queue, default subdeployment will be created and targeted. Not sure
//create JMSQueue "Queue" as queue;
//set queue.JNDIName "jms/queue"; //JNDI name for Queue
//set queue.JMSServer "JMSServer"; //Target queue to JMS server

//use templates default weblogic user
find User "weblogic" as u1;
set u1.password "weblogic4u";

//create a new user
create User "shaiksameer" as u2;
set u2.password "weblogic4u";

write domain to "/weblogic_path/WL_DEMO/user_projects/domains/demo_domain"; // The domain name will be "demo-domain"

close template;

********File end here ********


Start the domain creation:-
==================
/weblogic_path/WL_DEMO/wlserver_10.3/common/bin> ./config.sh -mode=silent -silent_script=/weblogic_path/stage/response_files/wl_create_domain_demo.rsp -logfile=/weblogic_path/WL_DEMO/create_domain.log

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
<< read template from "/weblogic_path/WL_DEMO/wlserver_10.3/common/templates/domains/wls.jar"
>>  succeed: read template from "/weblogic_path/WL_DEMO/wlserver_10.3/common/templates/domains/wls.jar"
<< set config option JavaHome to "/weblogic_path/java/jdk1.8.0_05"
>>  succeed: set config option JavaHome to "/weblogic_path/java/jdk1.8.0_05"
<< set config option ServerStartMode to "dev"
>>  succeed: set config option ServerStartMode to "dev"
<< find Server "AdminServer" as AdminServer
>>  succeed: find Server "AdminServer" as AdminServer
<< set AdminServer attribute ListenAddress to ""
>>  succeed: set AdminServer attribute ListenAddress to ""
<< set AdminServer attribute ListenPort to "8001"
>>  succeed: set AdminServer attribute ListenPort to "8001"
<< set AdminServer attribute SSL!Enabled to "true"
>>  succeed: set AdminServer attribute SSL!Enabled to "true"
<< set AdminServer attribute SSL!ListenPort to "8002"
>>  succeed: set AdminServer attribute SSL!ListenPort to "8002"
<< create Server "ms1" as MS1
>>  succeed: create Server "ms1" as MS1
<< set MS1 attribute ListenAddress to ""
>>  succeed: set MS1 attribute ListenAddress to ""
<< set MS1 attribute ListenPort to "8003"
>>  succeed: set MS1 attribute ListenPort to "8003"
<< create Machine "shaiksameer.com" as Machinename
>>  succeed: create Machine "shaiksameer.com" as Machinename
<< find User "weblogic" as u1
>>  succeed: find User "weblogic" as u1
<< set u1 attribute Password to "********"
>>  succeed: set u1 attribute Password to "********"
<< create User "shaiksameer" as u2
>>  succeed: create User "shaiksameer" as u2
<< set u2 attribute Password to "********"
>>  succeed: set u2 attribute Password to "********"
<< write Domain to "/weblogic_path/WL_DEMO/user_projects/domains/demo_domain"
...............................................................................................
>>  succeed: write Domain to "/weblogic_path/WL_DEMO/user_projects/domains/demo_domain"
<< close template
>>  succeed: close template

2 comments:

Young Wong said...

hello,
when i " assign Server "MS1" to Cluster "MyCluster" ",
it is error!!!
CFGFWK-60550: Script execution aborted. The script may contain an error.
Unable to find the specified application or service

why?can you tell me?
Thanks!

Young Wong said...

Hi,
I have solved this problem,you can fix it by " assign Server "ms1" to Cluster "MyCluster" ".
The "MS1" is wrong!!!
It need the Name of the server that you want to assign to the cluster!!!