|
TABLE OF CONTENTS 1. Overview 2. Set up Environment 3. Build and Deploy 4. Post-Installation Configuration 5. Database Configuration 6. Troubleshooting |
2. Set up Environment2.1. Verify Java InstallationCheck to see if you have Java (version 1.5) installed on your system by running the following command (sample output from a Linux system): $ java -version java version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b05) Java HotSpot(TM) Server VM (build 1.5.0_09-b05, mixed mode) You'll want to make sure that you have also installed the full Java SE, and not just the JRE (Sakai includes .jsp and .jws files which require some compilation). 2.2. Verify Java Environment VariablesThere are two Java environment variables you'll want to set for everything to function as it should, and though some of them may have already been set by your Java installation, you'll want to double-check them all. You can also look at the Sun Java Installation Instructions page at the Java web site for further details. First you'll need to set the JAVA_HOME environment variable to point to the base directory of your Java installation. In UNIX operating systems you typically modify a startup file like ~/.bash_login to set and export these shell variables, while for Windows XP you would go to Start -> Control Panel -> System -> Advanced -> Environment Variables and then set them to point to the correct locations through the text fields of the GUI (samples below):
Next you'll want to add Java to the PATH:
You should test that these variables are set correctly. In both Windows XP and Unix/Linux operating systems you can simply start a new shell and type the set command to see your environment variables. 2.3. Install TomcatSakai 2.4.0 was QA'ed with Tomcat 5.5.23, and so that's the version we recommend, although the latest stable version will most likely not present problems. Tomcat can be downloaded as a binary from http://tomcat.apache.org/download-55.cgi. The distribution you want is the one labeled Core. Please note that the 1.4 compatibility packge will break some items and should not be installed.
Unpack the Tomcat archive at your desired location. From this point forward these instructions will refer to the top-level Tomcat directory (e.g. /usr/local/apache-tomcat-5.5.17) as $CATALINA_HOME. You may set this as an environment variable for convenience's sake, but this is not required. Make sure that you have write permissions to the Tomcat files and directories before proceeding, or you may later run into errors during the build phase. 2.4. Configure TomcatSakai supports UTF-8, allowing for non-Roman characters, but this requires that Tomcat be configured to accept UTF-8 URLs since it ships with ISO-8859-1 as the default URL encoding. To change this setting, edit $CATALINA_HOME/conf/server.xml. Add the attribute URIEncoding="UTF-8" to the <connector> element. For example: <Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/> If you want to run Tomcat on different ports than the defaults, this would also be a good time to make those changes in the server.xml file. See Tomcat configuration documentation for more details. If you're going to run Tomcat as a standalone web server (i.e. if you're not going to connect it to the Apache web server) then you'll want to make a further minor change that may spare some confusion later. The ROOT webapp is the one served up when a request is made to your Tomcat's root URL, and so if you want users to be re-directed automatically to the Sakai application, you'll want to insert an index.html file into webapps/ROOT that prompts this re-direction. It should look something like: <html>
<head>
<meta http-equiv="refresh" content="0;url=/portal">
</head>
<body>
redirecting to /portal ...
</body>
</html>
If you don't make this change you (and your users) will need to append '/portal' to the URL entered to access Sakai each time. If you intend to connect Tomcat with Apache you can handle this issue as a matter of Apache configuration, which is however outside the scope of this document. 2.5. Install MavenMaven is the build tool used by Sakai, and the latest stable release (currently 1.0.2) can be downloaded from http://maven.apache.org/maven-1.x/start/download.html
Choose a location for Maven, and unpack the archive there. You will have a top-level directory named maven-1.0.2. 2.6. Configure MavenTo use Maven you'll need to set two more environment variables and then create a local repository using a script provided by Maven. Just as with the Java variables, MAVEN_HOME should be set, and then Maven's binary commands should be added to the Path:
Next you'll want to create your local maven repository in your home directory by running the following command:
Finally, you'll need to create a build properties file in your home directory which will define some basic parameters for your Sakai build. Simply create a new text file with the filename build.properties in your home directory, and paste in the following contents: maven.repo.remote=http://source.sakaiproject.org/maven/ maven.tomcat.home=/usr/local/tomcat/
Finally, to confirm that you can start Maven, run the command maven -v. This should start maven and cause it to report its version. At this point your environment is prepared to build and deploy the Sakai source code. |
Comments (3)
Aug 09, 2007
Jonathan Wheat says:
I've found an issue with Tomcat dealing with spaces in the path. If for example...I've found an issue with Tomcat dealing with spaces in the path.
If for example (on windows) you install / extract to C:\Program Files\apache-tomcat-5.5.23 and you start Sakai - you'll get an error "No Factories configured for this Application"
After searching, found this -
No Factories configured for this Application with Tomcat 5.5.23
Issue with myfaces and tomcat: if path to webapps has spaces in windows and tomcat 5.5.17+, there will be an error message when trying to run faces apps.
The resolution -
It all works great now
Sep 09, 2007
Clay Fenlason says:
Good note, thanks Jonathan. Added a recommendation to the "Tomcat on Windows" si...Good note, thanks Jonathan. Added a recommendation to the "Tomcat on Windows" sidebar.
Aug 20
Walter Brand says:
Make sure You'll install Maven 1.0.2 instead of Maven 1.1 (or Maven 2 for that m...Make sure You'll install Maven 1.0.2 instead of Maven 1.1 (or Maven 2 for that matter). If you follow the link above, you will probably download the latest stable version of 1.x, which is 1.1 at this moment. Just go to http://archive.apache.org/dist/maven/binaries/ that is an archive of all old versions of Maven.