D:\oracle\standalone-wl\wlserver_10.3\common\bin>config_builder.cmd
wls:/offline> createDomain ('D:/Middleware/wlserver_10.3/common/templates/domains/basic_Domain10.3.4.0.jar','D:/Middleware/user_project s/domains/hal','weblogic','PASSWORD')
wls:/offline>
Thursday, September 29, 2011
Create Managed Servers
ls:/offline/hal>create ('ManagedServer Name "example la"', 'Server')
Proxy for la: Name=la, Type=Server
wls:/offline/hal>cd ('Server/la')
wls:/offline/hal/Server/la>set ('ListenPort', 8102)
wls:/offline/hal/Server/la>set ('ListenAddress', 'Host Name')
wls:/offline/hal/Server/la>cd ('/')
Create The second Managed Server
wls:/offline/hal>create ('usa', 'Server')
Proxy for usa: Name=usa, Type=Server
wls:/offline/hal>cd ('Server/usa')
wls:/offline/hal/Server/usa>set ('ListenPort', 8103)
wls:/offline/hal/Server/usa>set ('ListenAddress', 'Host Name')
Proxy for la: Name=la, Type=Server
wls:/offline/hal>cd ('Server/la')
wls:/offline/hal/Server/la>set ('ListenPort', 8102)
wls:/offline/hal/Server/la>set ('ListenAddress', 'Host Name')
wls:/offline/hal/Server/la>cd ('/')
Create The second Managed Server
wls:/offline/hal>create ('usa', 'Server')
Proxy for usa: Name=usa, Type=Server
wls:/offline/hal>cd ('Server/usa')
wls:/offline/hal/Server/usa>set ('ListenPort', 8103)
wls:/offline/hal/Server/usa>set ('ListenAddress', 'Host Name')
Start Weblogic without providing password
In order to start Weblogic "AdminServe'r or ManagedServer" without password, you'll need to follow these steps;
Starting weblogic without password need a file call boot.properties. In this file you'll provide the weblogic user name & password.
- login as WLSowner
- cd /Weblogic_home/user_projects/domain/base_domains/server/"server_name" create a direcotry "security" # mkdir security
- cd security, vi boot.properties
- in the boot.properties file as the following lines
username= weblogic
password= XXXXXX
- save this file
- cd Weblogic_home/user_projects/domain/base_domains/bin
- on the prompt #nohup ./startWebLogic.sh &
Starting weblogic without password need a file call boot.properties. In this file you'll provide the weblogic user name & password.
- login as WLSowner
- cd /Weblogic_home/user_projects/domain/base_domains/server/"server_name" create a direcotry "security" # mkdir security
- cd security, vi boot.properties
- in the boot.properties file as the following lines
username= weblogic
password= XXXXXX
- save this file
- cd Weblogic_home/user_projects/domain/base_domains/bin
- on the prompt #nohup ./startWebLogic.sh &
NodeManager unreachable
If you meet one of the following problems
- NodeManager unreachable or you are not able to start your managed Server
- The domain was not registered in the nodemanager.domains file and dynamic domain registration is not supported. Please register the domain in the nodemanager
You will need to follow these steps;
1- Start Admin Server with start script startweblogic.sh. you can find this script under /BEA_HOME/Domains/YOUR_DOMAIN NAME/bin
2- Start WLS (Wblogic Scripting Tools)under /BEA_HOME/wlserver_10.3/common/bin/(wlst.sh)
3- Start Node Manager (you can start NodeManager with or without connecting to Admin Server
wls:/offline> startNodeManager()
4- Connect to Admin Server
wls:/offline> connect ('weblogic','XXXXXX','t3://YOUR HOST_NAME:7002')
Connecting to t3://XXXXXXXXX:7002 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
5- Enroll NodeManager
wls:/base_domain/serverConfig> nmEnroll('BEA_HOMEuser_projects/domains/base_domain',BEA_HOMEcommon/nodemanager')
Successfully enrolled this machine with the domain directory at /BEA_HOME/domains/base_domain.
wls:/base_domain/serverConfig>
Updated on 18-2-2012
After finishing with Enroll you'll need to execute a couple of things.
See http://docs.oracle.com/cd/E12839_01/web.1111/e13740/nodemgr_config.htm
You can start Managed server through the following ways;
- You can start a Managed Server using Node Manager through the Administration Console.
- Node Manager monitors the Managed Servers that it has started.
- Automatic restart of Managed Servers is enabled. Node Manager restarts server instances that it killed or were killed by another method.
To enable ManagedServer to be started through one of the above ways. You'll need to execute all of following steps
Now after starting AdminServer, you'll need to go to AdminServer Console (http://localhost:7001/console
1- Change this parameters to ture (default is false) StartScriptEnabled=true, StopScriptEnabled=true in nodemanager.properties,
for each server (incl. AdminServer) in the environment, go to the server start tab and put in the appropriate values.
- Java Home (D:\weblogic\Oracle\wls11g\jrockit_160_14_R27.6.5-32)
- Java Vendor Oracle
- BEA Home D:\weblogic\Oracle\wls11g
- Root Directory D:\weblogic\Oracle\wls11g\user_projects\domains\my_domain
- Classpath is empty (reason this pramaeter is included in Startscriptenbaled
- Arguments -Xnohup ( Arguments If you’re using Sun JDK instead of JRockit, then use –Xrs instead of –Xnohup )
- Security Policy File D:\weblogic\Oracle\wls11g\wlserver_10.3\server\lib\weblogic.policy
-User Name ex. weblogic ( The user name to use when booting this server. The Administration Console inserts the user name that you supplied when you logged in to the console)
- Password *************
- Confirm Password ***********
- Save
- Now do the same thing for each managed server.
- Activate the changes if required
Setting Node Manager Domain Username and Password
- Set the Node Manager username/password for the domain in the console
- Clickin the console navigator
- Select Security tab
- Expand to the "Advanced" options about half-way down the page
- Choose a Node Manager username/password and put it in the username/password/confirm boxes your credentials, these could be unique from your user used to start the AdminServer, but I chose to keep the same weblogic/*******. If you change this user name and password, then you’ll need to specify both when using the command nmConnect.
The node manager username & password are svaed under this direcotry
nm_password.properties: This file stores the Node Manager username and password.
This file is located in DOMAIN_HOME/config/nodemanager.
Test the NodeManager (Have NodeManager Start and Stop the Servers)
- Stop Admin Server or kill that process
- Now we will connect with Node Manager to start Admin Server and also Managerd Servers
wls:/base_domain/serverConfig> nmConnect('weblogic','XXXX password','You Host_ANME','5556','base_domain','/BEA_HOME/user_projects/domains/base_domain'
Connecting to Node Manager ...
Successfully Connected to Node Manager.
- Start Admin Server
wls:/nm/base_domain> nmStart ('AdminServer')
Note: during the start of AdminServer or even the ManagerServer, may be you'll need manually to create boot.properties file
You will need to create boot.properties file under /BEA_HOME/user_projects/domains/base_domain/servers/AdminServer/data/nodemanager. Just put the follwoing lines in this file. Just put these two lines
password= (password for adminserver)
username= weblogic
save file & start AdminServer again
- start Managed Server
wls:/nm/base_domain> start ('blog1')
Successfully started server blog1 ...
wls:/nm/base_domain> start ('blog2')
- Check the status of your servers
wls:/nm/base_domain> nmServerStatus ('AdminServer')
RUNNING
wls:/nm/base_domain> nmServerStatus ('blog1')
RUNNING
wls:/nm/base_domain> nmServerStatus ('blog2')
RUNNING
Another problem, Starting Managed Server without NodeManager
You can do that by adding boot.properites file to the security directory under your server_name\security
WL_\user_projects\domains\base_domain\servers\blog2\security.
Cheers,
- NodeManager unreachable or you are not able to start your managed Server
- The domain was not registered in the nodemanager.domains file and dynamic domain registration is not supported. Please register the domain in the nodemanager
You will need to follow these steps;
1- Start Admin Server with start script startweblogic.sh. you can find this script under /BEA_HOME/Domains/YOUR_DOMAIN NAME/bin
2- Start WLS (Wblogic Scripting Tools)under /BEA_HOME/wlserver_10.3/common/bin/(wlst.sh)
3- Start Node Manager (you can start NodeManager with or without connecting to Admin Server
wls:/offline> startNodeManager()
4- Connect to Admin Server
wls:/offline> connect ('weblogic','XXXXXX','t3://YOUR HOST_NAME:7002')
Connecting to t3://XXXXXXXXX:7002 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
5- Enroll NodeManager
wls:/base_domain/serverConfig> nmEnroll('BEA_HOMEuser_projects/domains/base_domain',BEA_HOMEcommon/nodemanager')
Successfully enrolled this machine with the domain directory at /BEA_HOME/domains/base_domain.
wls:/base_domain/serverConfig>
Updated on 18-2-2012
After finishing with Enroll you'll need to execute a couple of things.
See http://docs.oracle.com/cd/E12839_01/web.1111/e13740/nodemgr_config.htm
You can start Managed server through the following ways;
- You can start a Managed Server using Node Manager through the Administration Console.
- Node Manager monitors the Managed Servers that it has started.
- Automatic restart of Managed Servers is enabled. Node Manager restarts server instances that it killed or were killed by another method.
To enable ManagedServer to be started through one of the above ways. You'll need to execute all of following steps
Now after starting AdminServer, you'll need to go to AdminServer Console (http://localhost:7001/console
1- Change this parameters to ture (default is false) StartScriptEnabled=true, StopScriptEnabled=true in nodemanager.properties,
for each server (incl. AdminServer) in the environment, go to the server start tab and put in the appropriate values.
- Java Home (D:\weblogic\Oracle\wls11g\jrockit_160_14_R27.6.5-32)
- Java Vendor Oracle
- BEA Home D:\weblogic\Oracle\wls11g
- Root Directory D:\weblogic\Oracle\wls11g\user_projects\domains\my_domain
- Classpath is empty (reason this pramaeter is included in Startscriptenbaled
- Arguments -Xnohup ( Arguments If you’re using Sun JDK instead of JRockit, then use –Xrs instead of –Xnohup )
- Security Policy File D:\weblogic\Oracle\wls11g\wlserver_10.3\server\lib\weblogic.policy
-User Name ex. weblogic ( The user name to use when booting this server. The Administration Console inserts the user name that you supplied when you logged in to the console)
- Password *************
- Confirm Password ***********
- Save
- Now do the same thing for each managed server.
- Activate the changes if required
Setting Node Manager Domain Username and Password
- Set the Node Manager username/password for the domain in the console
- Click
- Select Security tab
- Expand to the "Advanced" options about half-way down the page
- Choose a Node Manager username/password and put it in the username/password/confirm boxes your credentials, these could be unique from your user used to start the AdminServer, but I chose to keep the same weblogic/*******. If you change this user name and password, then you’ll need to specify both when using the command nmConnect.
The node manager username & password are svaed under this direcotry
nm_password.properties: This file stores the Node Manager username and password.
This file is located in DOMAIN_HOME/config/nodemanager.
Test the NodeManager (Have NodeManager Start and Stop the Servers)
- Stop Admin Server or kill that process
- Now we will connect with Node Manager to start Admin Server and also Managerd Servers
wls:/base_domain/serverConfig> nmConnect('weblogic','XXXX password','You Host_ANME','5556','base_domain','/BEA_HOME/user_projects/domains/base_domain'
Connecting to Node Manager ...
Successfully Connected to Node Manager.
- Start Admin Server
wls:/nm/base_domain> nmStart ('AdminServer')
Note: during the start of AdminServer or even the ManagerServer, may be you'll need manually to create boot.properties file
You will need to create boot.properties file under /BEA_HOME/user_projects/domains/base_domain/servers/AdminServer/data/nodemanager. Just put the follwoing lines in this file. Just put these two lines
password= (password for adminserver)
username= weblogic
save file & start AdminServer again
- start Managed Server
wls:/nm/base_domain> start ('blog1')
Successfully started server blog1 ...
wls:/nm/base_domain> start ('blog2')
- Check the status of your servers
wls:/nm/base_domain> nmServerStatus ('AdminServer')
RUNNING
wls:/nm/base_domain> nmServerStatus ('blog1')
RUNNING
wls:/nm/base_domain> nmServerStatus ('blog2')
RUNNING
Another problem, Starting Managed Server without NodeManager
You can do that by adding boot.properites file to the security directory under your server_name\security
WL_\user_projects\domains\base_domain\servers\blog2\security.
Cheers,
Wednesday, June 29, 2011
Installation Oracle 11g Rel2 on Linux Redhat 5.5
Before you start,you'll need to do the following steps
1- on the linux system (root user)
In order to avoid pre-requisite check problem, you must install the following packages;
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
Most of these package will be on media 2,3 and 5
2- Add the following lines to the "/etc/sysctl.conf" file
a- vi /etc/sysctl.conf
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
b- update your sysctl.conf
# /sbin/sysctl -p
3- Add the following lines to the "/etc/security/limits.conf" file
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
4- Add the following lines to the "/etc/pam.d/login" file
session required pam_limits.so
5- Disable secure linux by editing the "/etc/selinux/config", normal this parameter is setting to Enable
SELINUX=disabled
6- Create groups and user
groupadd -g 502 oinstall
groupadd -g 503 dba
useradd -u 504 -g oinstall -G dba oracle
passwd oracle
7- Add the following lines to oracle user profile
# vi /home/oracle/.bash_profile
umask 022
# User specific environment and startup programs
export ORACLE_BASE=/mnt/orc5/app/oracle/product/db
export ORACLE_HOME=$ORACLE_BASE/11.2.0/dbhome
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMPDIR=/tmp
8- check /etc/hosts
The hosts file must have the following lines
127.0.0.1 localhost.localdomain localhost
XXX.XXX.XXX.XXX full qualified domain name hostname
example
192.168.4.0 hamdy.blogspot.com hamdy
9- Start installation
In order to run teh GUI interface, you'll need an Xserver running on the Linux server ex. vncserver (I use vncserver)
a- on the linux server login as Oracle user
#/usr/bin/vncserever, vnc session will be started
b- on you local machine
You'll need vncviewer and Xserver
c- login as Oracle user on the vncviewer( hummingbird )
export DISPLAY to you local machine example
DISPLAY=:0.0; export Display
d- start the Xserver on you local-machine
f- check if you Display variable is okay,
# xclock, if everthing is okay, just go further to the following step
10- Move to the Oracle software location &unzip the files
11- runInstaller
12- #./runInstaller
1- on the linux system (root user)
In order to avoid pre-requisite check problem, you must install the following packages;
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
Most of these package will be on media 2,3 and 5
2- Add the following lines to the "/etc/sysctl.conf" file
a- vi /etc/sysctl.conf
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
b- update your sysctl.conf
# /sbin/sysctl -p
3- Add the following lines to the "/etc/security/limits.conf" file
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
4- Add the following lines to the "/etc/pam.d/login" file
session required pam_limits.so
5- Disable secure linux by editing the "/etc/selinux/config", normal this parameter is setting to Enable
SELINUX=disabled
6- Create groups and user
groupadd -g 502 oinstall
groupadd -g 503 dba
useradd -u 504 -g oinstall -G dba oracle
passwd oracle
7- Add the following lines to oracle user profile
# vi /home/oracle/.bash_profile
umask 022
# User specific environment and startup programs
export ORACLE_BASE=/mnt/orc5/app/oracle/product/db
export ORACLE_HOME=$ORACLE_BASE/11.2.0/dbhome
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export TEMP=/tmp
export TMPDIR=/tmp
8- check /etc/hosts
The hosts file must have the following lines
127.0.0.1 localhost.localdomain localhost
XXX.XXX.XXX.XXX full qualified domain name hostname
example
192.168.4.0 hamdy.blogspot.com hamdy
9- Start installation
In order to run teh GUI interface, you'll need an Xserver running on the Linux server ex. vncserver (I use vncserver)
a- on the linux server login as Oracle user
#/usr/bin/vncserever, vnc session will be started
b- on you local machine
You'll need vncviewer and Xserver
c- login as Oracle user on the vncviewer( hummingbird )
export DISPLAY to you local machine example
DISPLAY=
d- start the Xserver on you local-machine
f- check if you Display variable is okay,
# xclock, if everthing is okay, just go further to the following step
10- Move to the Oracle software location &unzip the files
11- runInstaller
12- #./runInstaller
Wednesday, June 15, 2011
Create and configure Cluster
wls:/offline/hal>create ('hamdy', 'Cluster')
Proxy for hamdy: Name=hamdy, Type=Cluster
wls:/offline/hal>assign ('Server', 'la,usa','Cluster', 'hamdy')
wls:/offline/hal>cd ('Cluster/hamdy')
wls:/offline/hal/Cluster/hamdy>set ('MulticastAddress', '239.2.0.3')
wls:/offline/hal/Cluster/hamdy>set ('MulticastPort',9200)
wls:/offline/hal/Cluster/hamdy>
Write your update to the domain & close the domain template
wls:/offline/hal/Cluster/hamdy>updateDomain()
wls:/offline/hal/Cluster/hamdy>closeDomain()
wls:/offline>exit()
Proxy for hamdy: Name=hamdy, Type=Cluster
wls:/offline/hal>assign ('Server', 'la,usa','Cluster', 'hamdy')
wls:/offline/hal>cd ('Cluster/hamdy')
wls:/offline/hal/Cluster/hamdy>set ('MulticastAddress', '239.2.0.3')
wls:/offline/hal/Cluster/hamdy>set ('MulticastPort',9200)
wls:/offline/hal/Cluster/hamdy>
Write your update to the domain & close the domain template
wls:/offline/hal/Cluster/hamdy>updateDomain()
wls:/offline/hal/Cluster/hamdy>closeDomain()
wls:/offline>exit()
Subscribe to:
Posts (Atom)