How to Run WSO2 WSAS as a Unix Daemon

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By Afkham Azeez
  • 29 Oct, 2007

/etc/init.d wsas [start | stop | restart]


Locate the script in the WSAS_HOME directory. Make sure that the file is executable;

cd $WSAS_HOME/bin
chmod +x

Make sure that all the files in WSAS_HOME/bin/native are executable

cd $WSAS_HOME/bin/native
chmod +x *

Now from WSAS_HOME/bin, you can run the as follows:

  1. './ console' - Run WSAS in console mode. All output will appear on the current console
  2. './ start' - Start WSAS. Now WSAS will run as a background process
  3. './ stop' - Stop a WSAS process which was started using the above command
  4. './ restart' - Restart the running WSAS instance

You could also create a symbolic link from the /etc/init.d/ directory to the WSAS script as follows:

cd /etc/init.d/
  ln -s $WSAS_HOME/bin/ wsas

Now you can start, stop and restart WSAS as follows:

/etc/init.d wsas [start | stop | restart]

To automatically start WSAS as a daemon when the machine boots up, you can add WSAS to the default run level as follows

  1. Download and install chckconfig.
  2. run, chkconfig --add wsas
  3. To verify that WSAS has been added to the proper run levels; chkconfig --list
  4. edit the $WSO2WSAS_HOME/conf/wrapper.conf file and provide the absolute path to the java command as the value of the entry.
  5. Reboot your machine
  6. Check the $WSO2WSAS_HOME/logs/wrapper.log and $WSO2WSAS_HOME/logs/wso2wsas.log files to make sure that WSAS has been properly started
  7. Access the WSAS Console at http://localhost:9762/


Applies To

WSO2 WSAS 2.1 & higher versions

Unix, Linux, Sun Solaris, MAC OS X

More Information

Rest of the WSAS HOWTO Series