Home


Common Commerce commands

 

+

Search Tips   |   Advanced Search

  1. Check the Commerce Server status
  2. Start the Commerce server
  3. Stop the Commerce server
  4. Stop and start portal
  5. Check the SystemOut.log
  6. Copy static files to remote Web server
  7. Open the Commerce Accelerator
  8. Open the Commerce Administration console
  9. Open the Commerce organization administration console

  10. Start the node agent
  11. Stop the node agent
  12. Start the Deployment Manager
  13. Stop the Deployment Manager
  14. Open the WAS ND console

  15. Back up the WAS configuration

  16. Find a string in WAS property files
  17. Regenerate the IHS Plug-in
  18. Start the IHS
  19. Stop the IHS
  20. Verify the virtual host settings
  21. Map virtual hosts for Web modules
  22. Map modules to servers or cluster
  23. Access the store front
  24. Start the cluster
  25. Stop the cluster
  26. Start the Commerce Server via the ND console
  27. Stop the Commerce Server via the ND console
  28. Start the IHS via the ND console
  29. Stop the IHS via the ND console
  30. Start the IHS server
  31. Change wc-server.xml

  32. DB2 commands

 

Check the WebSphere Commerce Server status

cd /opt/WAS70/AppServer/profiles/MyCo/bin
./serverStatus.sh -all

 

Start the WebSphere Commerce server

On Dmgr...

cd /opt/WAS70/dmgr/bin
./startManager.sh

On appserver

cd /opt/WAS70/AppServer/profiles/MyCo/bin
./startNode.sh
./startServer.sh WC_MyCo

Start with non-root user "wasadmin"

 

Stop the WebSphere Commerce server

For dmgr profiles logon as wasadmin and run...

 
cd /opt/WAS70/dmgr/bin
./stopManager.sh 

On appserver...

cd /opt/WAS70/AppServer/profiles/MyCo/bin
./stopNode.sh
cd /opt/WAS70/AppServer/profiles/MyCo/bin
./stopServer.sh WC_MyCo

You must stop as non-root user "wasadmin"

 

Check the SystemOut.log

  1. Open...

    WC_profiledir/logs/WC_MyCo/SystemOut.log

  2. Scan down through the log. You can find errors by searching in the text editor with the string "E".

  3. If there are any errors in the server start-up before reaching the "Server WC_MyCo open for e-business" message, this indicates that the server did not successfully start.

  4. There are a few exceptions that appear in the start-up sequence of the SystemOut.log that you can safely ignore:

    WebApp E Error while adding servlet mapping.

    ...and...

    MetaDataLoade E loadWebContainerPorts could not find any http or https ports

 

Copy static files to remote Web server

Note this is one way to do it. This is not the MyCo way

  1. Log on to appserver

  2. Run...

    cd /opt/WAS70/AppServer/profiles/MyCo/installedApps/WC_poc_cell/WC_poc.ear

    scp -r * hostname:/opt/IHS70/htdocs/en_US

  3. Clientx has additional static files that need to be copied into...

    /opt/IHS70/htdocs/en_US

    They can be found on...

    foo5dc4sl43:/db2backup/ibm/nbaxa510/nbaxa510-static-09102008.tar.gz

  4. On webserver, go to...

    cd /opt/IHS70/htdocs

    ...and create file removeJSPJAR.pl...

    use strict;
    my $filter = $ARGV[0];
    if ( !$filter )
    {
    print "Static file extensions were not specified.\n";
    exit;
    }
    system("find en_US/ > t.out");
    open F, "< t.out";
    while ( my $file = <F> )
    {
    chomp( $file );
    my @extensions = split( /\,/, $filter );
    my $markForDelete = 1;
    # Skip thread statements that do not match
    foreach my $extension ( @extensions )
    {
    if ( $file =~ /\.$extension$/ )
    {
    $markForDelete = 0;
    last;
    }
    }
    unlink($file) if ( $markForDelete );
    }
    close F;
    unlink("t.out");
    

  5. Execute removeJSPJAR.pl

    perl ./removeJSPJAR.pl html,css,js,gif,jpg,gif,bmp

 

Open the WebSphere Commerce Accelerator

In an Internet Explorer browser, type this URL:

https://hostname:8000/accelerator

 

Open the WebSphere Commerce Administration console

In an Internet Explorer browser, type this URL:

https://hostname:8002/adminconsole

 

Open the WebSphere Commerce organization administration console

In an Internet Explorer browser, type this URL:

https://hostname:8004/orgadminconsole

 

Start the node agent

Navigate to the bin directory of your WebSphere Commerce profile and use the startNode command to start the node agent.

cd /opt/WAS70/AppServer/profiles/MyCo/bin
./startNode.sh 

You must start with non-root user "wasadmin"

 

Stop the node agent

Navigate to the bin directory of your WebSphere Commerce profile and use the startNode command to start the Node Agent.

cd /opt/WAS70/AppServer/profiles/MyCo/bin
./stopNode.sh 

You must stop with non-root user "wasadmin"

 

Start the Deployment Manager

Logon as user wasadmin.

cd /opt/WAS70/AppServer/profiles/Dmgr01/bin
./startManager.sh

You must start with non-root user "wasadmin"

 

Stop the Deployment Manager

Navigate to the bin directory of your Deployment Manager profile. Use the stopManager command to stop the Deployment Manager.

cd /opt/WAS70/AppServer/profiles/Dmgr01/bin
./stopManager.sh

You must stop with non-root user "wasadmin"

 

Open the WAS Network Deployment Manager Administration console

In an Internet Explorer browser, type this URL:

http://dmgr.ibm.com:9075/ibm/console 

Note: The port number is dependent on the ports assigned when the profile was first created.

 

Back up the Commerce configuration

See also: Backups - MyCo WCS v7

To backup application and WAS config....

cd $WC_PROFILE/bin
./backupConfig.sh /opt/install/backupConfig.`date +"%Y%m%d"` -username myadmin -password c0w...
cd $WC_PROFILE/installedApps/MyCoCell
tar cvf /opt/install/WC_MyCo.ear.`date +"%Y%m%d"`.tar WC_MyCo.ear

Backup files are created in /opt/install...

-rw-rw-r--    1 wasadmin sys       203365681 May 03 12:19 backupConfig.20110503
-rw-rw-r--    1 wasadmin sys       311910400 May 03 12:22 WC_MyCo.ear.20110503.tar

Example output...

./backupConfig.sh /opt/install/backupConfig.`date +"%Y%m%d"`

To make a backup of DB, contact DBA. If you want to do it yourself...

db2 backup database DBname to /opt/install

 

Find a string in WAS property files

cd $WC_PROFILE
find . -type f -exec grep -l MyCoCell {} \;

 

Regenerate the IBM HTTP Server Plug-in

  1. Open the WebSphere Application Server ND Administration console.

  2. Expand Servers > Web servers.

  3. Select the Web server.

  4. Click Generate Plug-in.

  5. Click Propagate Plug-in.

 

Start the IBM HTTP Server

cd /opt/IHS70/bin
sudo ./apachectl start
sudo ./adminctl start

 

Stop the IBM HTTP Server

cd /opt/IHS70/bin
sudo ./apachectl stop
sudo ./adminctl stop

 

Verify the virtual host settings

  1. Open the WebSphere Application Server ND Administration console.

  2. Expand Environment > Virtual Hosts. You see a list of virtual hosts.

  3. Click on a virtual host. For example, VH_poc

  4. Click Host Aliases.

  5. Verify that ports 80 and 443 are defined for the WebSphere Commerce servers that have been federated.

  6. Repeat Steps 4 to 6 for the other virtual hosts. Ensure that the following ports are defined as follows:

    Virtual host Port(s)
    VH_poc 80, 443
    VH_poc_Admin 8002
    VH_poc_OrgAdmin 8004
    VH_poc_Preview 8006, 8007
    VH_poc_Tools 8000

  7. Make any necessary changes.

  8. Continue with the remaining steps to save changes to the master configuration only if changes are required.

  9. Click OK.

  10. Click Save and select Synchronize changes with Nodes to ensure that the deployment manager profile immediately synchronizes the configuration changes with the other nodes.

  11. Click Save.

  12. Click OK.

  13. Regenerate the IBM HTTP Server Plug-in.

 

Map virtual hosts for Web modules

  1. Open the WebSphere Application Server ND Administration console.

  2. Expand...

    Applications | Enterprise Applications | WC_enterprise_application | Map virtual hosts for Web modules

  3. Verify that the mapping for virtual hosts to Web modules is correct.

  4. Make any necessary changes.

  5. Continue with the remaining steps to save changes to the master configuration only if changes are required.

  6. Click OK.

  7. Click Save and select Synchronize changes with Nodes to ensure that the deployment manager profile immediately synchronizes the configuration changes with the other nodes.

  8. Click Save, then OK.

 

Map modules to servers or cluster

  1. Go to...

    Enterprise Applications | WC_enterprise application | Map Modules to servers
    Select relevant application servers, cluster, and Web servers. Put a checkmark beside all of the modules listed, then click Apply. Do this for all modules that are not mapped to the application server or cluster and to all Web servers that are not mapped to the Web modules.

  2. Click Save to save your configuration.

  3. Select Synchronize changes with Nodes to ensure that the deployment manager profile immediately synchronizes the configuration changes with the other nodes.

  4. Click Save.

 

Access the store front

Use the bookmark to test the store front if one has already been created. Otherwise, complete the following to bookmark and test the store:

  1. Open the WebSphere Commerce Accelerator.

  2. Select the site and click OK.

  3. From the top menu select...

    Store Archives | Publish Status

  4. Put a checkmark beside the store that you just published and click Details.

  5. Click Launch Store to open an Internet Explorer browser with your newly published store home page. Add this home page URL to your Internet Explorer bookmarks.

  6. Browse around and verify that you can add to the cart and checkout an order.

 

Start the cluster

  1. Open the WebSphere Application Server ND Manager Administration console.

  2. Expand Servers > Clusters.

  3. Enable the checkbox next to the cluster.

  4. Click Start.

  5. If the cluster started successfully, the Status column for that particular cluster contains a green arrow.

  6. When a cluster is started, all application servers that belong to the cluster are also started. Verify that the application servers were all started successfully by following these additional steps:

    1. Expand Servers > Application servers.

    2. Verify that the Status column contains a green arrow for all application servers that are part of the cluster.

 

Stop the cluster

  1. Open the WebSphere Application Server ND Manager Administration console.

  2. Expand Servers > Clusters.

  3. Enable the checkbox next to the cluster.

  4. Click Stop.

  5. If the cluster stopped successfully, the Status column for that particular cluster contains a red cross.

  6. When a cluster is stopped, all application servers that belong to the cluster are also stopped. Verify that the application servers were all stopped successfully by following these additional steps:

    1. Expand Servers > Application servers.

    2. Verify that the Status column contains a red cross for all application servers that are part of the cluster.

 

Start the WebSphere Commerce Server via the ND Manager Administration console

  1. Open the WebSphere Application Server ND Manager Administration console.

  2. Expand Servers > Application servers.

  3. Enable the checkbox next to the application server you wish to start.

  4. Click Start.

  5. If the application server started successfully, the Status column for that particular application server contains a green arrow.

 

Stop the WebSphere Commerce Server via the ND Manager Administration console

  1. Open the WebSphere Application Server ND Manager Administration console.

  2. Expand Servers > Application servers.

  3. Enable the checkbox next to the application server you wish to start.

  4. Click Stop.

  5. If the application server stopped successfully, the Status column for that particular application server contains a red cross.

 

Start the IBM HTTP Server via the ND Manager Administration console

  1. Open the WebSphere Application Server ND Manager Administration console.

  2. Expand Servers > Web servers.

  3. Enable the checkbox next to the Web server you wish to start.

  4. Click Start.

  5. If the Web server started successfully, the Status column for that particular Web server contains a green arrow.

 

Stop the IBM HTTP Server via the ND Manager Administration console

  1. Open the WebSphere Application Server ND Manager Administration console.

  2. Expand Servers > Web servers.

  3. Enable the checkbox next to the Web server you wish to stop.

  4. Click Stop.

  5. If the Web server stopped successfully, the Status column for that particular Web server contains a red cross.

 

Change wc-server.xml after deployment.jar

If you need to make a change to wc-server.xml after deployment...

  1. cd /opt/WCS70/instances/MyCo/xml

  2. Edit poc.xml and add your change

  3. cd /opt/WCS70/bin

  4. ./config_ant.sh -DinstanceName=poc UpdateEAR

  5. Restart WC_MyCo using WAS ND console

 

Start the IBM HTTP Administrative server

Navigate to the bin directory within the IBM HTTP server installation directory and use the htpasswd command to set the IBM HTTP Server Administrative user and p. Use the adminctl command to start the IBM HTTP Administrative server.

root> cd /opt/IHS70/bin
root> ./htpasswd -c -b /opt/IHS70/conf/admin.passwd admin p

Adding p for user admin

root> ./adminctl start
./adminctl start: admin http started

 

DB2 commands

Connect to database (local)

sudo su - wasadmin

s1ad7a: /home/wasadmin==> db2 connect to db001sa user wasadmin using foo

   Database Connection Information

 Database server        = DB2/AIX64 9.7.3
 SQL authorization ID   = WASADMIN
 Local database alias   = DAT012SA


List instances


db2ilist


List current instance

s1ad7a: /home/wasadmin==> db2 get instance

 The current database manager instance is:  db2con01


List catalog for node

s1ad7a: /home/wasadmin==> db2 list node directory show detail

 Node Directory

 Number of entries in the directory = 2

Node 1 entry:

 Node name                      = A1SA12
 Comment                        =
 Directory entry type           = LOCAL
 Protocol                       = TCPIP
 Hostname                       = s1ad7b.myco.com
 Service name                   = 50121
 Remote instance name           =
 System                         =
 Operating system type          = None

Node 2 entry:

 Node name                      = POCSA12
 Comment                        =
 Directory entry type           = LOCAL
 Protocol                       = TCPIP
 Hostname                       = s1ad7b.myco.com
 Service name                   = 50010
 Remote instance name           =
 System                         =
 Operating system type          = None


Attach to Node


db2 attach to db001saN user wasadmin using wasadmin1


List tables


db2 list tables [for {user | all | system | schema schema-name}] [show detail]


View table space information


db2 list tablespaces [show detail


Attach to db


db2 attach to db001sa user wasadmin using wasadmin1


Find DB2 version


db2level
db2licm l


Check for SVCENAME from database manager configuration


db2 get dbm cfg


Update SVCENAME if needed (require restart of db2 instance)


db2 update dbm cfg using SVCENAME DB2_svr20aix


Set TCPIP communication protocol (require restart of db2 instance)


db2set DB2COMM=tcpip


Check registry to TCPIP changes


db2set -a
db2set -lr


Stop Instance


db2stop


Stop (FORCE) Instance


db2stop force


Start Instance


db2start


Create Instance


db2icrt u


Delete Instance


db2idrop


Find all databases for a certain instance


db2 list database directory


Check for active databases


db2 list active databases


Create database


db2 create db


Drop database


db2 drop db


Start/Activate database


db2 activate db


Deactivate database


db2 deactivate db


Delete tables


db2 drop table


Find table structure


db2 describe table


Catalog remote node


db2 catalog tcpip node remote server


Catalog remote database (node must be calatalog first)


db2 catalog db at node


List catalog for db


db2 list db directory show detail


Delete db catalog


db2 uncatalog db dbname


Delete node catalog


db2 uncatalog node nodename


Enable a user account that has been disabled.


db2 connect to sky_stg user wasadmin using wasadmin1
db2 "update userreg set status=1 where LOGONID='wcsadmin'"


Catalog a remote database


### Sample commands
sudo su - wasadmin
db2 catalog tcpip node db001sa remote hostname server 60004
db2 terminate
db2 list node directory show detail
db2 catalog database db001sa at node db001sa
db2 terminate
db2 list database directory
db2 connect to db001sa user wasadmin using wasadmin1
db2 list tables
db2 "terminate"
db2 "quit"

### Another catalog example db2 catalog tcpip node qasa12 remote s1qa8b.myco.com server 50120
db2 CATALOG DATABASE dqa012sa AT NODE qasa12 AUTHENTICATION SERVER
db2 update cli cfg for section dqa012sa using LockTimeout 300


Set instance for user


/opt/db2/db2_97_03/instance/db2icrt -u wasadmin