System Requirements
Have preinstalled:
- Java 1.4
- Subversion
- Maven (version 1.x)
- Maven Sakai plugin
- Tomcat 5.5.17 (with tomcat-compat package)
To get the Maven Sakai plugin, run:
maven plugin:download -DartifactId=sakai -DgroupId=sakaiproject -Dversion=2.2 -Dmaven.repo.remote=http://source.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
svn co https://source.sakaiproject.org/svn/sakai/branches/sakai_2-2-x/
If you'd like to find a specific version to download, you can open https://source.sakaiproject.org/svn and find the url for the branch you need.
2. Create a build.properties file in your home directory.
maven.repo.remote=http://source.sakaiproject.org/maven/ maven.tomcat.home=/usr/local/tomcat/
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. Edit the sakai.properties file in tomcat/sakai.
Edit the top.login and container.login areas to look like the following:
# 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. Add the Yale provider.
Copy the yale provider folder into sakai/user. If the k5auth jar isn't already in your maven repository or a repository on your search path, you'll need to add it manually.
Add the Yale provider as a dependency for the user project. Add the following code to sakai/user/user-imp/pack/project.xml:
<dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-yale-provider</artifactId> <version>${sakai.version}</version> <properties> <war.bundle>true</war.bundle> </properties> </dependency> <dependency> <groupId>yale</groupId> <artifactId>k5auth</artifactId> <version>1.0.0</version> <properties> <war.bundle>true</war.bundle> </properties> </dependency>
In sakai/user/user-impl/pack/src/webapp/WEB-INF/components.xml add the following line in the directory service block.
<bean id="org.sakaiproject.user.api.UserDirectoryService" class="org.sakaiproject.user.impl.DbUserService" init-method="init" destroy-method="destroy" singleton="true"> ... existing code ... <property name="caseSensitiveId"><value>false</value></property> <property name="provider"> <ref local="edu.yale.its.tp.sakai21.user.YaleUserDirectoryProvider"/> </property> </bean>
Next, add bean definitions for the Yale directory provider and ACS1 datasource:
<bean id="org.sakaiproject.service.legacy.user.UserDirectoryProvider" class="edu.yale.its.tp.sakai21.user.YaleUserDirectoryProvider" init-method="init" destroy-method="destroy" singleton="true"> <property name="logger"> <ref bean="org.sakaiproject.service.framework.log.Logger"/> </property> <property name="dataSource"> <ref local="directoryDataSource"/> </property> <property name="kerberosDebug"> <value>false</value> </property> </bean> <bean id="directoryDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="url"> <value>url</value> </property> <property name="driverClassName"> <value>oracle.jdbc.driver.OracleDriver</value> </property> <property name="username"> <value>username</value> </property> <property name="password"> <value>password</value> </property> <property name="testOnBorrow"> <value>true</value> </property> <property name="validationQuery"> <value>SELECT 1 FROM DUAL</value> </property> <property name="minIdle"> <value>2</value> </property> <property name="maxActive"> <value>10</value> </property> </bean>
|
For the directoryDataSource, you'll need an account that has access to the people file (production or development). Ask your friendly DBA. |
2. Add the casclient to the login dependency list.
Add the following to the end of sakai/login/login-tool/tool/project.xml:
<dependency> <groupId>cas</groupId> <artifactId>casclient</artifactId> <version>2.1.1</version> <properties> <war.bundle>true</war.bundle> </properties> </dependency>
3. Add the CAS filter to the login tool's web.xml.
Add the following to sakai/login/login-tool/tool/src/webapp/WEB-INF/web.xml:
<filter> <filter-name>CAS Filter</filter-name> <filter-class> edu.yale.its.tp.cas.client.filter.CASFilter </filter-class> <init-param> <param-name> edu.yale.its.tp.cas.client.filter.loginUrl </param-name> <param-value> https://secure.its.yale.edu/cas/login </param-value> </init-param> <init-param> <param-name> edu.yale.its.tp.cas.client.filter.validateUrl </param-name> <param-value> https://secure.its.yale.edu/cas/serviceValidate </param-value> </init-param> <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> <filter-mapping> <filter-name>CAS Filter</filter-name> <url-pattern>/container</url-pattern> </filter-mapping>
Make sure to edit the server and port.
Build Sakai
Run "maven sakai" from the main sakai directory.