Sunday, November 15, 2009

creation of profiles in WAS 7

When you execute wasprofile command in WAS 7, it will throw error :

C:\IBM\WebSphere\AppServer\bin>wasprofile.bat
CWMBU0001I: The wasprofile.bat script has been deprecated and replaced by the ma
nageprofiles.bat script.
manageprofiles requires an argument
Run manageprofiles -help or visit our Information Center at: http://www14.software.ibm.com/webapp/wsbroker/redirect?version=p
ix&product=was-nd-dist&topic=rxml_manageprofiles

1. To list number of profiles, execute command

manageProfiles -listProfiles

eg. C:\IBM\WebSphere\AppServer\bin>manageProfiles -listProfiles

2. To delete all the existing profiles, execute
C:\IBM\WebSphere\AppServer\bin>manageProfiles.bat -deleteAll
INSTCONFSUCCESS: Success: All profiles are deleted.

Once profile is deleted, remove left directories manually.
To delete directories recursively in windows use command :
rmdir /s /q

3. Create new prfoiles including deployment manager
Now this could be interesting which directory could be recommended, many user creates profiles under path WebSphere\AppServer\profiles\\, now this works without issue in unix flavor but in case if 32 bit Windows there is limitation of 255 characters in path. So many people prefer to create profiles like :\IBM\Profiles\\

Command to create new profile :
Syntax : manageProfiles -create -profileName -profilePath -templatePath -nodeName -cellName -hostname -serverName -startingPort 10000 -winserviceCheck

eg : C:\IBM\WebSphere\AppServer\bin>manageProfiles -create -profileName AppSrv01 -profilePath C:\IBM\profiles\AppSrv01 -nodeName AppSrv01Node -cellName AppSrv01Cell -hostname localhost -serverName server -startingPort 10000 -winserviceCheck false

gives output as

INSTCONFSUCCESS: Success: Profile AppSrv01 now exists. Please consult C:\IBM\pro
files\AppSrv01\logs\AboutThisProfile.txt for more information about this profile.

4. to check the ports assigned and other details for new profiles check the file at
\logs\AboutThisProfile.txt

C:\IBM\WebSphere\AppServer\bin>type \IBM\profiles\AppSrv01\logs\AboutThisProfile.txt

5.

start Deployment Manager by some other command

Wow, I got amazed when I tried this today, and it worked when I executed the below command to start the Deployment Manager.

\wasprofile\\bin\startServer.sh dmgr - to start
\wasprofile\\bin\stopServer.sh dmgr - to stop
One can also use the command startManager command to start/stop the DMGR