Real time commands for WebLogic and web sphere in Linux environment.

This blog contains all the basic information to work with the LINUX
and WebLogic details. Every command is used in the realtime.
You can refer to this blog to get a glance at all the commands.
CPU information -- This is generally taken care of by system administrator but it is
better to have an idea on those and recheck them before starting the servers.
                #cat /proc/cpuinfo                 #cat /proc/cpuinfo | grep cores

To change the permission for any folder in the Linux machine.
                        #chown –R user:group foldername

This item to be resolved between the servers. The entries to be checked before starting the
servers.
                        more /etc/hosts

DNS entries are available in this file. These are to be checked before the process.
Verify with the system team to avoid issues.


                            more /etc/resolv.conf

The database scan names to be checked. Check the connectivity from the application servers to
DB servers. If not check the /etc/hosts entries and make surer it is resolved.  
                                nslookup <scanName>


To check the port availability and to confirm the ports are enabled from the security team you
should telnet the IP and Port as below.
                                    telnet <IP> <port>


This is an advanced feature to be checked and better to set these values of setting
PID and thread ID
                         more /proc/sys/kernel/pid_max        (recommendation 65356)   
                        more /proc/sys/kernel/threads-max   

CRONJOB

To see the list of cron jobs running in the background                         crontab -l


To set the cronjobs in the servers and execute on restart of the server
                          crontab -e

List all the java process that is running which include the server information and also the
applications that are running in the server background  
               ps -ef | grep java   

To get information about all the open ports in the server.
                            sudo lsof -i -P -n | grep LISTEN                             netstat -tulpn | grep LISTEN   
    
To get the routing table information from the server
                            netstat -rn ------------- kernel routing table(gateway check)

Get to know the WebLogic version that is running in the server
Go to directory which contains weblogic.jar ($WL_HOME/server/lib)
            kar@sys#>java -cp weblogic.jar weblogic.version                     WebLogic Server 10.3.5.0 Fri Apr 1 20:20:06 PDT 2011 1398638 Note:
                Use 'weblogic.version -verbose' to get subsystem information
                Use 'weblogic.utils.Versions' to get version information for all modules

Basic commands to get start WebLogic admin server and managed servers.
                ./startWeblogic.sh                 ./startManagedWebLogic.sh Domain_machine1 http://192.199.77.11:7000                 ./startManagedWebLogic.sh saudi_ins1_1 http://192.199.77.11:7000
Creation of security folder and provide user info which will be encrypted and used during the start of
the managed servers. boot.properties folder setup. Each and every managed server to be set with
this file. 
cd /u01/app/oracle/Middleware/user_projects/domains/DOMAINNAME/servers/AdminServer 
mkdir security
cd security
vi boot.properties
username=system
password=********
Note: The same to be done with all the managed servers.

Replace the word in the file that is in Linux machine
vi filename
press esc
%s/prdfshapp1/prdfshapp2/g
:wq!

PACK AND UNPACK commands for migration.

pack -domain=/opt/bea/bea10.3.6/user_projects/domains/DomainName
-template=/opt/bea/bea10.3/user_templates/mydomain.jar -template_name="My WebLogic Domain"


unpack -template=/opt/bea/bea10.3.6/user_templates/mydomain.jar
-domain=/opt/bea/bea10.3/user_projects/domains/NameDomain

System information related commands.
Get all the details of the host server
more /etc/redhat-release
Get the hostname
uname -a

SSH between the server. We login to the server within the same subnet and then we
SSH to the other server using below command.

ssh usename@192.115.16.12
It prompts for a password.

To copy a file from one server to another. ( SSH with port 22 should be enabled.)
scp fileName.txt username@192.168.11.12:/destination/diectory
If it is a folder
scp -r folderName username@192.168.11.12:/destination/diectory



Setting class path:

change directory to WL_HOME\server\bin\setWLSEnv.sh and set required class paths.

.

Comments

Popular posts from this blog

WEBSPHERE INTERVIEW QUESTIONS COVERING ALL TOPICS

WEBSPHERE SIMPLE NOTES

TELL ME ABOUT YOURSELF WEB SPHERE INTERVIEW