.. _running-label: ======================= Start/Stop OSAAS Server ======================= Starting and stopping of *OSAAS* server depends on your installation. This chapter describes the two most frequent ways. Init script ----------- If you want to start *OSAAS* server using the init script, you need to pay attention of two things: - the script requires your configuration at ``/etc/osaas/osaas-config.xml`` - the script needs to have executable permissions - the script requires an osaas-user to run under If both points are clear, you are able to start *OSAAS* server with the following command:: /etc/init.d/osaas start To stop *OSAAS* server, just type:: /etc/init.d/osaas stop Start/Stop *OSAAS* from sources ------------------------------- To start *OSAAS* server from sources, you will have to use the ``startosaas.py`` script. Change to the directory where the script is located and type:: ./startosaas.py --config-file=your-config.xml This line starts *OSAAS* server with a configuration located in ``your-config.xml``. Note, that all of the settings from config file, except of the DBRules, can be specified on the command line as well. You can find a list of all available command line options below: --config-file=CONFIG_FILE\ Use this option to specify the osaas configuration that should be used to run *OSAAS*. --port=PORT\ Use this option to specify the port the *OSAAS* server will listen on. --access-log=ACCESS_LOG\ This option specifies the destination of the access log. *ACCESS_LOG* is the path to a file. Note, that the user that runs *OSAAS* needs to have write permissions for this file. --error-log=ERROR_LOG\ This option specifies the destination of the error log. *ERROR_LOG* is the path to a file. Note, that the user that runs *OSAAS* needs to have write permissions for this file. --pid-file=PID_FILE\ This option specifies the file where to write the PID. --log-level=LOG_LEVEL\ This option specifies the detail level of the logging. Supported log levels are *CRITICAL*, *ERROR*, *WARNING*, *INFO* and *DEBUG*. --userdb-file=USERDB_FILE\ This option specifies the user database file that is used for the user authentication of *OSAAS*. *USERDB_FILE* is a path to a valid *OSAAS* user database file. --db-type=DB_TYPE\ This option specifies the database type. Currently, the supported types are *oracle* and *postgresql*. --db-parameter=DB_PARAMETERS\ This option specifies the parameters used to connect to a PostgreSQL database. *DB_PARAMETERS* is a single string. --db-user=DB_USER\ This option specifies the user that is used to connect to a Oracle database. --db-password=DB_PASSWORD\ This option specifies the password that is used to connect to a Oracle database. --db-dsn=DB_DSN\ This option specifies the dsn that is used to connect to a Oracle database. To stop *OSAAS* server, just kill the process (Ctrl+C). *OSAAS* will stop listening in the socket, wait until any pending requests have been processed and then terminates.