The method for enabling automatic startup on the Solaris 10 platforms is different from that for Solaris 9. Both are described below.
On Solaris 9 operating system, scripts that enable automatic startup are placed in the /etc/rc* directory tree during Message Queue installation. To enable the use of these scripts, you must edit the configuration file imqbrokerd.conf (located in IMQ_HOME/etc/ for installations from IPS packages and in /etc/imq/ for installations from SVR4 packages) as follows:
To start the broker automatically at system startup, set the AUTOSTART property to YES.
To have the broker restart automatically after an abnormal exit, set the RESTART property to YES.
To set startup command line arguments for the broker, specify one or more values for the ARGS property.
To disable automatic broker startup at system startup, edit the configuration file /etc/imq/imqbrokerd.conf and set the AUTOSTART property to NO.
Rather than using an rc file to implement automatic broker startup when a computer reboots, the following procedure makes use of the Solaris 10 Service Management Facility (SMF).
For more information on using the Service Management Facility, please refer to Solaris 10 documentation.
Copy and change permissions on the mqbroker startup script.
# cp /var/svc/manifest/application/sun/mq/mqbroker /lib/svc/method
# chmod 555 /lib/svc/method/mqbroker
Import the mqbroker service into the SMF repository.
# svccfg import /var/svc/manifest/application/sun/mq/mqbroker.xml
Verify that the import was successful by checking the state of the mqbroker service.
# svcs mqbroker
Output resembles the following:
STATE STIME FMRI disabled 16:22:50 svc:/application/sun/mq/mqbroker:default |
The service is initially shown as disabled.
Eanable the mqbroker service.
# svcadm enable svc:/application/sun/mq/mqbroker:default
Enabling the mqbroker service will start the imqbrokerd process. A reboot will subsequently restart the broker.
Configure the mqbroker service to pass any desired arguments to the imqbrokerd command.
The options/broker_args property is used to pass arguments toimqbrokerd. For example to add -loglevel DEBUGHIGH, do the following:
# svccfg svc:> select svc:/application/sun/mq/mqbroker svc:/application/sun/mq/mqbroker> setprop options/broker_args="-loglevel DEBUGHIGH" svc:/application/sun/mq/mqbroker> exit |