|
|
OverviewSetting up the Onyx server involves some or all of the following tasks:
Fine-tuning TomcatFor general tips related to Tomcat, see http://tomcat.apache.org/.
General Comments about Tomcat Memory SettingsOn most default Tomcat installations, the memory allocated to the service is insufficient. You must increase the memory allocated to Tomcat by tweaking two memory settings.
In the OS-specific procedures below (see [Allocating Memory on Ubuntu] and [Allocating Memory on Windows]), we assume that your server has 2GB of RAM. We set -Xmx to 1024 and -XX:MaxPermSize to 256m.
Using Tomcat on UbuntuTwo issues need to be addressed when running Tomcat on Ubuntu: insufficient memory and the security manager. To allocate memory on UbuntuTo allocate memory to Tomcat, you need to create an environment variable. If Tomcat was installed using apt, you must edit the /etc/default/tomcat6 file as shown below. /etc/default/tomcat6 To disable the security manager on UbuntuComment out the #TOMCAT6_SECURITY=yes and add the TOMCAT6_SECURITY=no line as shown below. /etc/default/tomcat6 Using Tomcat as a Windows ServiceTwo issues need to be addressed when running Tomcat as a service on Windows: insufficient memory and making the printer available to Tomcat. To allocate memory on Windows
To enable printing from TomcatWhen running Tomcat as a Windows Service, make sure that the user running the Tomcat service can use the printer. This is not the case by default. Permissions must be given to the tomcat user in order for Onyx to see the printer you wish to use.
Configuring MySQLTo check the database connection settingsThe default Onyx connection to the MySQL server uses the settings shown in the table below. They are defined in the onyx-config.properties file, which is Onyx's main configuration file.
Your organization may have already changed the defaults. You can check the values in the onyx-config.properties file (see What You Need from Your Organization). If the settings are different from the defaults shown in the table, note them so you can use them when Creating a Database for Onyx in MySQL. WEB-INF/config/onyx-config.properties To create a database for Onyx in MySQLYou must create a database for Onyx in MySQL, and you must also set up a user that has all privileges on that database. When Onyx starts for the first time, it will automatically create its schema in this database. In a MySQL client:
Alternatively, in the MySQL Administrator application:
Setting Up an SSL ConnectionTo set up Onyx to run over a secured connection on the local network, you must do two tasks on the Onyx server: create a keystore and configure Tomcat to use an SSL connection.
To create a keystore for the SSL connection
To configure Tomcat to use an SSL connectionEdit the file CATALINA_BASE\...\conf\server.xml as follows: 1. Comment out this section: 2. Remove comments from this section: 3. In the <Connector> element, add the following attributes: where "keystore\onyx.jks" and "password" are the values you entered when Creating a keystore for the SSL connection. Generating a Key and Certificate for Data ExportOnyx can export data to one or more export destinations (see Configuring Data Export and Purge). If your organization has decided to encrypt participant data upon export to a particular destination, you must generate a key and certificate for that destination. You can check whether or not data is supposed to be encrypted on export, look in the file export-destinations.xml which is in your custom-onyx.war file (What You Need from Your Organization). If any of the destinations include an <encrypt> element, the data will be encrypted on export. You will need the key and certificate when you carry out the procedure for Deploying Onyx. You can use a utility (like openSSL) to generate keys and certificates. For a Windows program that uses openSSL to generate keys and certificates, see Shining Light Productions. Fine-tuning the Onyx ConfigurationThe global configuration settings for Onyx are contained in the file onyx-config.properties. See What You Need from Your Organization. As a minimum, you should check the configuration settings listed in this section. If you think other settings need to be fine-tuned, see Customizing the Global Configuration in the Onyx Customization & Configuration Guide. To check the application modeOnyx should be configured to run in deployment mode. This is very important since it improve the overall performance of the application. Check that the following property onyx-config.properties is set to deployment in : WEB-INF/config/onyx-config.properties To set the printerOn startup, Onyx decides which printer to use. Onyx will try to find a printer with a particular name. If that printer does not exist, or does not support PostScript printing, then Onyx will fall back to using the system's default printer. If that printer does not support PostScript printing, Onyx will not be able to print reports. You can change the printer that Onyx should look for at startup by editing this line in onyx-config.properties. WEB-INF/config/onyx-config.properties To set up the appointment list
To set up the data export directory
To set up the keystore for data export
Deploying OnyxTo deploy Onyx, you need a war file (custom-onyx.war) containing a customized version of Onyx. If you do not already have it, see here
# Copy the war file to the webapps directory in the Tomcat installation directory $TOMCAT_HOME/webapps.
Checking the DeploymentHere are a few items to check after you have deployed Onyx:
TroubleshootingThe first place to look is Tomcat's console output which is written in the log directory. Under windows, the file is called stdout_XXX.log on Debian/Ubuntu, this file is called catalina.out. MiscellaneousConsent Form Submission ProblemsYou may encounter an error when attempting to submit a consent form, especially a large multi-page consent form written in a double-byte character set. This error occurs because the consent form is too large to be stored in the database. To get around this, you must modify the MySql database settings to allow storage of larger amounts of data. The configuration file that you must edit is my.ini on Windows and my.cnf on Linux. This is the line you need to change: To start, try a value of 3M (for 3 megabytes). If it still doesn't work, increase the value. You will need to restart the MySql database server after making the change. |
Search Onyx Documentation |
Setting Up the Server
Labels:
None