|
TABLE OF CONTENTS 1. Overview 2. Set up Environment 3. Build and Deploy 4. Post-Installation Configuration 5. Database Configuration 6. Troubleshooting |
4. Post-Installation ConfigurationThis section contains only enough information to successfully complete a basic installation. For a more complete treatment refer to the Sys Admin Guide. 4.1. Create folder for properties filesSakai runs with a default set of configuration properties for its various components. To override them you'll want to specify them in a properties file which should be located in $CATALINA_HOME/sakai by default. This directory is not created by maven, so you'll have to do so manually.
You'll need to make sure that this location is readable and writable to Tomcat. 4.2. The sakai.properties fileThe main configuration file for Sakai is called sakai.properties, and you can either create it from scratch or copy in a known working copy. A sample sakai.properties file which self-documents many of the standard properties in its comments can be found in the source under sakai-src/reference/docs/sakai.properties, while the properties file that the OOTB software uses as its default may be found in sakai-src/kernel/component/src/config/org/sakaiproject/config/sakai.properties. New value settings can be freely added to the sakai.properties file. Since any component property can in principle be overridden here, any sample sakai.properties will show only a small fraction of all the possible settings.
4.3. HTTP proxyIn environments where local network policy or firewalls require use of an upstream http proxy / cache, Sakai needs to be configured accordingly. Otherwise components or services which use http requests, such as BasicNewsService for RSS feeds in the News tool, cannot retrieve data from the target URLs. This can be fixed with the following JAVA_OPTS arguments: export JAVA_OPTS="-Dhttp.proxyHost=cache.some.domain -Dhttp.proxyPort=8080" You'll need to set additional JAVA_OPTS for memory tuning (see below), and the appropriate ones can simply be appended. 4.4. Email configurationSakai needs to be set up for two email functions: receiving email sent to Sakai sites, and sending out email messages and notifications. For sending mail Sakai needs the address (name or IP) of an SMTP server that will accept mail from Sakai, and this needs to be set in your sakai.properties file: smtp@org.sakaiproject.email.api.EmailService=some.smtp.org To enable Sakai to receive mail you'll need to set the following: # dns addresses used for incoming email smtp.dns.1 = 255.255.255.1 smtp.dns.2 = 255.255.255.2 # SMTP port on which our SMTP server runs. Default is 25. #Recommend running on 8025, and using a standard mailer on 25 to forward mail to Sakai. smtp.port = 25 # flag to enable or disable our SMTP server for incoming email (true | false) smtp.enabled = true # email address used as the "from" address for any email sent by Worksite Setup tool or Site Info tool. # Recipients may not receive notifications if this address isn't valid. #setup.request=address@somedomain To disable the SMTP server for incoming email, use this line in sakai.properties: smtp.enabled=false Sakai's SMTP server is James, and to run with the above configuration which runs James on the standard SMTP port 25 you must be running with admin privileges. Most admins won't want to let Tomcat run with those permissions, and would rather run a standard mailer like postfix on port 25 and configure it to forward requests to Sakai. You might also already have a mailer service running on port 25 (Linux usually has it running by default), and so you'd want to change the James port simply to avoid a conflict. For example: smtp.port = 8025 4.5. JVM TuningThe default Java virtual machine is not adequate to run an application of Sakai's size, and several JVM parameters must be increased to a certain threshold for Sakai to run, while some may be further adjusted for optimal performance on your machines.
The standard way to control the JVM options when Tomcat starts up is to have an environment variable JAVA_OPTS defined with JVM startup options. Since any given Sakai instance may be deployed for a variety of purposes - ranging from developers doing private testing to large-scale deployments - it's hard to recommend a single set of such options as the preferred ones for every case. We can, however, start with a bare minimum which will at least avoid "Out of Memory" errors, and be suitable for developer installs of the software: JAVA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:NewSize=192m -XX:MaxNewSize=384m" This is an adequate - if minimal - starting point: it selects server mode, sets an adequate heap size, and sizes the permanent generation to accommodate more longer-persisting objects. These settings will allow things to be functional for testing and development, but for pilot or production deployments you'll want to give closer attention to the appropriate values for your server. See the Sys Admin Guide for more detailed tips. Once you set JAVA_OPTS Tomcat will see this environment variable upon startup and use it. Instead of putting this in an environment variable you might create your own startup script to do so.
4.6. Test SakaiAt this stage your installation of Sakai has not yet been configured to use your preferred database (it will use its own HSQLDB by default), but you should now be able to bring it up as a working web application by simply starting Tomcat, and it can be helpful at this point to know if any problems exist before you try to connect it to another database. Tomcat will take a minute or so to start up, depending on the speed of your machine, and it's a good idea to watch the Tomcat log as it comes up to catch any errors (see Troubleshooting). From $CATALINA_HOME you can start up Tomcat with the command:
Once Tomcat has loaded the Sakai application (again, this can take a minute or so) point your browser to http://localhost:8080/portal. If the gateway page does not come up, check the Tomcat logs (see the Troubleshooting section) for any errors and stack traces. If the gateway page does come up, log in with the default admin account (the username and password are both 'admin'). If you can log in without errors you should be able to stop Tomcat and proceed with Database configuration, if needed.
|