System Requirements
Have preinstalled:
- Java 1.4
- Subversion
- Maven (version 1.x)
- Maven Sakai plugin
- Tomcat 5.5.x (with tomcat-compat package)
To get the Maven Sakai plugin, run:
maven plugin:download -DartifactId=sakai -DgroupId=sakaiproject -Dversion=2.1 -Dmaven.repo.remote=http://www.ibiblio.org/maven/,http://cvs.sakaiproject.org/maven/
Environment variables to set:
- JAVA_HOME
- CATALINA_HOME
- MAVEN_HOME
Notes:
1. If you prefer, you can wait until the very end of the instructions to run "maven sakai."
2. If you're running Fedora, you'll need to set -Djava.net.preferIPv4Stack=true in both MAVEN_OPTS and CATALINA_OPTS.
3. You may need to set -Xmx and -Xms flags in MAVEN_OPTS and CATALINA_OPTS to increase the JVM size.
Install and Build Sakai
1. Download the Sakai code
export CVS_RSH=/pathto/ssh cvs -d user@server.its.yale.edu:/pathto/cvs checkout projectname
2. Create a build.properties file in your home directory.
maven.repo.remote=http://source.sakaiproject.org/maven/ maven.tomcat.home=/usr/local/tomcat/
Sakai21-dev is a local maven repository, and adding it as the first remote repository on your path will ensure that the project builds much more quickly.
If you have Java 1.5 installed on your machine, add the following to the build.properties.
maven.compile.debug = on maven.compile.source = 1.4 maven.compile.target = 1.4 maven.compile.verbose = true
You can add a local maven repository to the beginning of the maven.repo.remote string if you have one available.
|
1. Make sure maven.tomcat.home isn't set to a directory where you have anything you want to keep. 2. maven.repo.remote and maven.tomcat.home must have trailing slashes on their values. |
To complete the build, you may have to manually copy jar files into .maven/repository
Add Other Yale Information
1. Copy the Yale sakai.properties file to tomcat/sakai.
Edit the following server-specific information to match your machine name:
# identify your application server with a short name, unique among the servers in your cluster. # choose a server id even if you are running a single app server serverId=localhost # the URL to the server, including transport, DNS name, and port, if any serverUrl=http://localhost:8080 # the DNS name of the server serverName=localhost
Add/edit the following Yale-specific information:
# to include the user id and password for login on the gateway site top.login=false xlogin.enabled=true xlogin.text=Non-Yale Login login.txt=Yale NetID Login # to let the container handle login or not (set to true for single-signon type setups, false for just internal login) container.login=true
2. Copy the Oracle database driver to tomcat/common/lib.
This jar is available from Oracle's website, if you don't already have a copy.
CAS
Reference: http://bug.sakaiproject.org/confluence/display/ENTR/CASifying+Sakai
1. Edit the login tool's web.xml.
<filter> * * * <init-param> <param-name> edu.yale.its.tp.cas.client.filter.serverName </param-name> <param-value>server.its.yale.edu:port</param-value> </init-param> <init-param> <param-name> edu.yale.its.tp.cas.client.filter.wrapRequest </param-name> <param-value>true</param-value> </init-param> * * * </filter>
2. Add the directory data source to tomcat's server.xml.
|
For the directoryDataSource, you'll need an account that has access to the people file (production or development). Ask your friendly DBA. |
Add the following to GlobalNamingResources in $TOMCAT_HOME/conf/server.xml:
<Resource name="jdbc/yu_sakai@acs" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@database:1521:schemaname" username="username" password="password" testOnBorrow="true" initialSize="2" maxActive="5" maxIdle="5" maxWait="-1" minIdle="2" minEvictableIdleTimeMillis="600000" timeBetweenEvictionRunsMillis="600000"/>
Patch RWiki (Java 1.5 only)
@@ -116,12 +116,12 @@
Serializer serializer = null;
String className = p
- .getProperty(OutputProperties.S_KEY_CONTENT_HANDLER);
+ .getProperty(OutputPropertiesFactory.S_KEY_CONTENT_HANDLER);
if (null == className) {
throw new IllegalArgumentException(
"The output format must have a '"
- + OutputProperties.S_KEY_CONTENT_HANDLER
+ + OutputPropertiesFactory.S_KEY_CONTENT_HANDLER
+ "' property!");
}
Build Sakai
Run "maven sakai" from the main sakai directory.