Sun Java System Instant Messaging 7.2 Administration Guide

Creating Multiple Instances from a Single Instant Messaging Installation

You can create multiple instances of Instant Messaging on a single host from one installation. You may want to do this in order to create a secure version of Instant Messaging, or to support multiple directory namespaces. A namespace is a node in the directory under which each UID is unique. All instances of Instant Messaging on a single host share binaries but have unique versions of runtime and configuration files.

ProcedureTo Create an Additional Instance of Instant Messaging from an Existing Installation

This procedure assumes that you have used default installation and configuration values for im-svr-base and im-runtime-base. If you installed using the default values, the original runtime directory would be as follows:

Solaris: /var/opt/SUNWiim/default

Linux: /var/opt/sun/im/default

If you used paths other than the defaults, you will need to substitute your paths for the paths used in this procedure.

  1. Create a runtime directory for the new instance:

    For example, to create a new runtime directory for instance xyz:

    Solaris: mkdir /var/opt/SUNWiim/xyz

    Linux: mkdir /var/opt/sun/im/xyz

  2. Create a log directory for the new instance:

    For example, to create a new log directory for instance xyz:

    Solaris: mkdir /var/opt/SUNWiim/xyz/log

    Linux: mkdir /var/opt/sun/im/xyz/log

  3. If you are using a file-based property store for user data, you need to create a database directory (im-db-base) for the new instance:

    For example, to create a new database directory for instance xyz:

    Solaris: mkdir /var/opt/SUNWiim/xyz/db

    Linux: mkdir /var/opt/sun/im/xyz/db

  4. Copy the contents of the im-svr-base directory and all of its subdirectories into the newly created directories:

    For example:

    Solaris: cp -r /etc/opt/SUNWiim/default /etc/opt/SUNWiim/xyz

    Linux: cp -r /etc/opt/sun/im/default /etc/opt/sun/im/xyz

  5. Open the new instance's imadmin script in a text editor.

    By default, this script is stored under the im-svr-base directory you just created for the new instance:

    Solaris: /etc/opt/SUNWiim/xyz/imadmin

    Linux: /etc/opt/sun/im/xyz/imadmin

  6. In the imadmin script, change the configuration file path to the path for the new configuration file for the new instance

    For example:

    On Solaris, change /etc/opt/SUNWiim/default/config/iim.conf to /etc/opt/SUNWiim/xyz/config/iim.conf.

    On Linux, change /etc/opt/sun/im/default/config/iim.conf to /etc/opt/sun/im/xyz/config/iim.conf.

  7. Save and close the imadmin script.

  8. Open the new instance's iim.conf file in a text editor.

    By default, the iim.conf file is stored in the im-cfg-base directory you created for the new instance:

    Solaris: /etc/opt/SUNWiim/xyz/config/iim.conf

    Linux: /etc/opt/sun/im/xyz/config/iim.conf

  9. Modify the port numbers in iim.conf so they do not conflict with the original instance.

    The default port numbers are as follows:

    • Server port (iim_server.port) – 5269

    • Multiplexor listen port (iim_mux.listenport) – 5222

    • Multiplexor to server communication port (iim_mux.serverport) – 45222

    For more information about these parameters, see Appendix A, Instant Messaging Configuration Parameters in iim.conf.

  10. Modify iim.instancedir to point to im-svr-base.

    See Instant Messaging Server Directory Structure for information on im-svr-base.

  11. Modify iim.instancevardir to point to the runtime directory for the new instance.

    For example:

    On Solaris, change /var/opt/SUNWiim/default to /var/opt/SUNWiim/xyz.

    On Linux, change /var/opt/sun/im/default to /var/opt/sun/im/xyz.

  12. Save and close iim.conf.

  13. Ensure that file and directory ownership and permissions are the same for all instances.

  14. Make renamed copies of im-svr-base/html/locale/im.html, im.jnlp, and index.html resource files , and modify the copies to point to the new instance's port number.

  15. Redeploy the renamed resource files.

    See Redeploying Resource Files for instructions.

  16. Start the new instance:

    Solaris: /etc/opt/SUNWiim/xyz/imadmin start

    Linux: /etc/opt/sun/im/xyz/imadmin start