Installation Guide
Table of Contents |
---|
1. Requirements
- JDK 1.5+ installed (required for compilation and runtime)
- For MAVEN 1 deployments only: the following must be manually added to local maven repository:
- Manually copy Ajax4JSF 1.1.1 to local Maven repository:
- copy from {
sitestats_src}/lib/ajax4jsf-1.1.1.jar
to~/.maven/repository/org.ajax4jsf/jars/
- copy from {
- Manually copy xmlgraphics-commons 1.1 to local Maven repository:
- copy from {
sitestats_src}/lib/xmlgraphics-commons-1.1.jar
to~/.maven/repository/org.apache.xmlgraphics/jars/
- copy from {
- Manually copy Ajax4JSF 1.1.1 to local Maven repository:
2. Installation (offline)
- Download source code from Subversion to your Sakai source directory (be sure to pick the most recent tag/branch - see main page):
svn co https://source.sakaiproject.org/contrib//ufp/sitestats/tags/a_sitestats_tag/ sitestats
- Change your current directory to the recently downloaded folder
cd sitestats
- Edit pom.xml file and change the version tag to reflect sakai version
- Run Maven to compile SiteStats (replace {tomcat_folder} with the path to your tomcat folder):
- For sakai <= 2.4.x, use Maven 1:
maven -Dmaven.tomcat.home={tomcat_folder} sakai
- For sakai >= 2.5 or trunk, use Maven 2:
mvn -Dmaven.tomcat.home={tomcat_folder} clean install sakai:deploy
- For sakai <= 2.4.x, use Maven 1:
- Make sure there are no multiple versions of sitestats jars in {tomcat_folder/shared/lib} (named sakai-sitestats-*.jar)
2.1. External database
For using an external database with SiteStats (recommended), the database must be previously created before starting sakai.
- Create the database. MySQL, Oracle and HsqlDB are officially supported (may work on other dbs as well). As an example, this a typical procedure for MySQL table creation:
- create database sitestats default character set utf8;
- grant all on sitestats.* to sakaiuser@'localhost' identified by 'sakaipassword';
- grant all on sitestats.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword';
- grant all on sitestats.* to sakaiuser@'some.other.server.ip' identified by 'sakaipassword';
- Follow this section for related configuration details.
3. Upgrading from previous releases (offline)
- If upgrading from previous releases, you may need to execute some sql script placed at
\sitestats_src\updating
folder. - Also, make sure to delete the previous API jar named {tomcat_folder}/shared/lib/sakai-sitestats-*.jar
4. Tomcat configuration
Please make sure you add -Djava.awt.headless=true to your JAVA_OPTS environment variable.
5. SiteStats configuration (offline)
Please refer to the Configuration Options page for more information.
6. modjk/mod_proxy_ajp configuration (offline)
If using Apache + mod_jk (or mod_proxy_ajp) in front of Tomcat, please make sure the url "/sakai-sitestats-tool" is also mapped to Tomcat.
7. Sakai setup (online)
7.1. Setup tool permissions
- Startup tomcat if not started yet
- Setup tool permissions for the maintain and Instructor role on the !site.template and !site.template.course templates:
- Click Realm
- Click !site.template
- Click Role Id - maintain
- Check:
- sitestats.view box to grant an user permission to the SiteStats tool
- sitestats.admin.view box to grant an user permission to the SiteStats Admin tool
- Click the Done Button
- Repeat for the Instructor role on the !site.template.course realm
- Repeat for the realms of existing sites or use a script for the effect
Note: the SiteStats Admin tool allow to view statistics for any Sakai site
7.2. Add the SiteStats tool to a site
Use the 'Worksite setup' or the 'Site Info' tool to add SiteStats to a sakai site:
- click 'Add tools' link
- select SiteStats tool
- click 'Continue' to save changes
7.3. Add the SiteStats admin view (site list) to a site
Use the 'Sites' tool from the 'Administrator Workspace' to add SiteStats admin view to a sakai site:
- click the desired site id link
- click the 'Pages' button
- click 'New Page' link at the top
- give the page a name (eg, SiteStats Admin) and click 'Tools'
- click 'New Tool' link at the top
- check the sakai.sitestats.admin box
- click 'Save' to save changes
Note: to use the tool, an user must have the sitestats.admin.view permission