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.
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:
If you used paths other than the defaults, you will need to substitute your paths for the paths used in this procedure.
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
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
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
Copy the contents of the im-svr-base directory and all of its subdirectories into the newly created directories:
Solaris: cp -r /etc/opt/SUNWiim/default /etc/opt/SUNWiim/xyz
Linux: cp -r /etc/opt/sun/im/default /etc/opt/sun/im/xyz
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:
In the imadmin script, change the configuration file path to the path for the new configuration file for the new instance
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.
Save and close the imadmin script.
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:
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.
Modify iim.instancedir to point to im-svr-base.
See Instant Messaging Server Directory Structure for information on im-svr-base.
Modify iim.instancevardir to point to the runtime directory for the new instance.
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.
Save and close iim.conf.
Ensure that file and directory ownership and permissions are the same for all instances.
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.
Redeploy the renamed resource files.
See Redeploying Resource Files for instructions.
Start the new instance:
Solaris: /etc/opt/SUNWiim/xyz/imadmin start
Linux: /etc/opt/sun/im/xyz/imadmin start