Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2004Q2 Administration Guide 

Chapter 18
Creating and Deleting Instances of the Server

An instance is a server that listens on a particular port, bound to either one or more IP addresses. For the Sun Java™ System Portal Server, an instance corresponds to a web server process listening on a port and running a single Java™ Virtual Machine (JVM™).


Multiple-instances are supported only with Sun Java™ System Web Server.

To Create an Instance of the Server

  1. Log in to the server running the Portal Server.
  2. Go to the Sun Java™ System Identity Server utilities directory
  3. cd identity-server-install-root/SUNWam/bin

  4. Run the following command:
  5. ./amserver create

  6. Enter a name for the new instance when prompted.
  7. Enter an unused port for the new instance when prompted.
  8. If you want to create more instances, type y and press Enter when asked the question:
  9. Do you want to create more server instances? y/[n] y.

    Repeat Step 4 and Step 5 for each instance that you wish to create. Otherwise press Enter to create the server instances.

  10. Enter the amadmin password when prompted.
  11. Go to the web server install directory.
  12. To verify that the instance has been created, use the ls command.
  13. Go to the directory for the newly created instance.
  14. cd https-new-instance-name

  15. Run the start script for the newly created instance.
  16. ./start

  17. Go to the Portal Server utilities directory.
  18. cd portal-server-install-root/SUNWps/bin

  19. Run the multiserverinstance script.
  20. ./multiserverinstance

  21. Enter the name of the instance from Step 4.
  22. Enter the port of the new instance from Step 5.
  23. If you have portlets, redeploy them. For instructions to redeploy portlets, consult Chapter 21 of this guide.
  24. After the multiservinstance script exits, go to the web server instance directory.
  25. cd web-server-install-root/https-new-instance-name

  26. Stop the web server instance.
  27. ./stop

  28. Restart the web server instance.
  29. ./start

  30. Go to the newly created instance in a browser.
  31. Repeat steps Step 9 through Step 20 for each newly created instance.
  32. In a browser, enter:
    • http://hostname.domain:instance-portnumber/amconsole to access the administration console through the new instance
    • http://hostname.domain:instance-portnumber/portal to access the default URL for the Portal Desktop through the new instance

If you create any additional server instances and you want to run them as non-root or nobody, comment out the following lines for each instance at identity-server-install-root/SUNWam/bin/amserver.instance-nickname

if [ "$uid" != "0" ];


  echo "‘$gettext ’You must be root user to run’‘ $0."

  exit 1


To Delete an Instance of the Server

  1. Log in to the server running the Portal Server.
  2. Change directories to portal-server-install-root/SUNWps/bin.
  3. cd portal-server-install-root/SUNWps/bin

  4. If you have portlets, remove them. For instructions, see Chapter 21, "Command-Line Utilities"in this guide.
  5. Enter:
  6. ./multiserverinstance delete -instance instance-name

  7. If you are also removing the Sun Java System Identity Server, change directories to the Identity Server utilities directory.
  8. cd identity-server-install-root/SUNWam/bin

  9. Enter:
  10. ./amserver delete instance-name

Previous      Contents      Index      Next     

Copyright 2004 Sun Microsystems, Inc. All rights reserved.