sakai安装步骤

1、获取sakai源代码

可以通过svn下载最新代码,或者下载其发布的稳定版本。

2.0 验证安装 Java 1.6

可通过在系统命令行中运行  java -version

如果安装了java,会显示如下:

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
2.1 设置JAVA环境变量
JAVA必须设置一些相关的环境变量.对于UNIX操作系统,一种典型的配置方式 在如  ~/.bash_login . 对于Windows, 通过图形界面设置   JAVA_HOME  

设置 JAVA_HOME 指向安装JAVA的根目录并添加JAVA的/bin 目录到PATH环境变量.

(info) 如果变量JRE_HOME 已经设这,或者你想要使用一个特殊的JRE

Variable

Unix

Mac

Windows

JAVA_HOME

export JAVA_HOME=/usr/java/java-current

export JAVA_HOME=/Library/Java/Home

JAVA_HOME=C:\jdk1.6.0_24

PATH

export PATH=$PATH:$JAVA_HOME/bin/

export PATH=$PATH:$JAVA_HOME/bin/

;C:\jdk1.6.0_24\bin

设置 JAVA_OPTS

默认的JAVA虚拟机对于sakai应用的大小是不够用的,所以为了运行sakai,一些java虚拟机的参数必须增大,其他的可能需要为了优化性能进行调整。 至少添加以下属性设置到你的JAVA_OPTS环境变量.

(tick) 我们建议在Tomcat的/bin 目录中setenv.sh (Unix/Mac)或setenv.bat (Windows)文件中设置这些配置. 通过Tomcat查看更多细节.

Unix/Mac:

 
export JAVA_OPTS='-server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:NewSize=192m -XX:MaxNewSize=384m -Djava.awt.headless=true -Dhttp.agent=Sakai -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax=true'
 

Windows:

set JAVA_OPTS=-server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:NewSize=192m -XX:MaxNewSize=384m -Djava.awt.headless=true -Dhttp.agent=Sakai -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax=true


额外需要的配置:
一些JSF工具 (聊天, portfolios, 测试与测验)不能在JAVA1.6中正确的编译. 工作区需要增加系统属性allowArraySyntax来避免数组反序列化的瓶颈。 (see SAK-17578 - Compiling with Java 1.6 breaks tools in Sakai - CLOSED ). 

第二, Tomcat 5.5.27+ 实施严格的引号转义, a change in *.jsp handling that has yet to be addressed in certain tools such as portfolios (see SAK-15736 - NPE when trying to preview portfolios when running in tomcat 5.5.27 and websphere - CLOSED ).

 最后, specify an HTTP user agent other than "Java/xxxxx" in order to resolve Google and other RSS feeds (see SAK-10159 - Unable to interpret RSS from Google News - CLOSED , SAK-13353 - Unable to render news from Times Higher Education Supplement (THES) - CLOSED and SAK-18044 - Add -Dhttp.agent=Sakai to demo startup scripts to resolve Google RSS feed issues - CLOSED ).

-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false
-Dhttp.agent=Sakai


指定区域和语言

当启动sakai是你可以通过系统属性: -Duser.language and -Duser.region.来定义默认的 语言/区域。想了解支持的语言请查看发布日志或访问 i18N工作组空间.


-Duser.language=pt
-Duser.region=PT


指定一个HTTP 代理(可选)
In 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 the 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:

-Dhttp.proxyHost=cache.some.domain
-Dhttp.proxyPort=8080


4.0安装Maven 2.2.1

Apache Maven 项目管理框架为sakai提供了一组构建标准、存储模型 、软件引擎用来管理和描述项目. 作为安装过程的一部分您将使用Maven作为一个构建工具来编译、测试和部署sakai到一个servlet容器。如Apache Tomcat。

(minus) Maven 3.0目前不支持sakai2.8.

你可以在这里下载maven:http://maven.apache.org/download.html

Extract the distribution archive into your installation directory of choice, e.g. /opt/maven/apache-maven-2.2.1. Confirm that you have installed the correct version of Maven and can start it by issuing mvn --version from the terminal. At this point your environment is prepared to build and deploy the Sakai source code.

mvn --version
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.3" arch: "x86_64" Family: "mac"
4.1 设置Maven环境变量
为最优Maven性能一些环境变量必须设置.对于Unix操作系统,一个典型的设置是在如 ~/.bash_login文件的启动文件中设置和导出 shell变量,而Mac用户可以在 .bash_profile中设置并导出环境变量 . 对于Windows, :

Variable

Unix/Mac

Windows

MAVEN_HOME

export MAVEN_HOME=/opt/maven/apache-maven-2.2.1

set MAVEN_HOME=C:\apache-maven-2.2.1

PATH

export PATH=$PATH:$MAVEN_HOME/bin

;C:\apache-maven-2.2.1\bin

(warning) Windows: append string to the end of the Path system variable

MAVEN_OPTS

Maven 不在启动时读取JAVA_OPTS ,结果偶尔当构建sakai时出现“内存溢出” .为了确定在构建sakai工程时有充足的内存, 你需要增加一个像下方定义的MAVEN_OPTS环境变量。对于Unix操作系统一种典型修改是在如 ~/.bash_login的启动文件中来设置和导出shell变量。Mac用户在 .bash_profile. 对于WIndows可以通过图形化界面。

export MAVEN_OPTS='-Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m'
4.2 创建一个本地Maven 库
在你的主目录中创建一个Maven库:

Unix/Mac

cd $HOME
mkdir -p .m2/repository

Windows

mkdir %HOMEDRIVE%%HOMEPATH%\.M2\repository

(info) 在Windows中,默认的家路径是C:\Documents and Settings\yourusername. Windows also establishes it through environment variables by combining your "home drive" location and your "home path" location, i.e. %HOMEDRIVE%%HOMEPATH%. (The %-sign is how Windows brackets environment variables).

4.3创建一个Maven settings.xml 文件
在你的  .m2  目录中创建一个名为  settings.xml的文件. 增加以下行,指定你的Tomcat的主目录的实际位置 (in this example /opt/tomcat ).

(minus) 不要在目录路径的结尾包含 / 或 \ 
(warning) Sakai不使用标准的appserver.home 所以你必须包含一个<sakai.appserver.home> 元素在你的 settings.xml 文件中. 对于Windows用户, sakai.appserver.home 的值必须为 C:\opt\tomcat.


Unix/Mac

Windows

< settings xmlns = "<a href="http://maven.apache.org/POM/4.0.0" "="" style="border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; outline-width: initial; outline-style: none; outline-color: initial; overflow-x: visible !important; overflow-y: visible !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: inherit !important; color: rgb(0, 109, 175); ">http://maven.apache.org/POM/4.0.0"
xmlns:xsi = "<a href="http://www.w3.org/2001/XMLSchema-instance" "="" style="border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; outline-width: initial; outline-style: none; outline-color: initial; overflow-x: visible !important; overflow-y: visible !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: inherit !important; color: rgb(0, 109, 175); ">http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
<a href="http://maven.apache.org/xsd/settings-1.0.0.xsd" "="" style="border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; outline-width: initial; outline-style: none; outline-color: initial; overflow-x: visible !important; overflow-y: visible !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: inherit !important; color: rgb(0, 109, 175); ">http://maven.apache.org/xsd/settings-1.0.0.xsd">
< profiles >
< profile >
< id >tomcat5x</ id >
< activation >
< activeByDefault >true</ activeByDefault >
</ activation >
< properties >
< appserver.id >tomcat5x</ appserver.id >
< appserver.home >/opt/tomcat</ appserver.home >
< maven.tomcat.home >/opt/tomcat</ maven.tomcat.home >
< sakai.appserver.home >/opt/tomcat</ sakai.appserver.home >
< surefire.reportFormat >plain</ surefire.reportFormat >
< surefire.useFile >false</ surefire.useFile >
</ properties >
</ profile >
</ profiles >
</ settings >
< settings xmlns = "<a href="http://maven.apache.org/POM/4.0.0" "="" style="border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; outline-width: initial; outline-style: none; outline-color: initial; overflow-x: visible !important; overflow-y: visible !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: inherit !important; color: rgb(0, 109, 175); ">http://maven.apache.org/POM/4.0.0"
xmlns:xsi = "<a href="http://www.w3.org/2001/XMLSchema-instance" "="" style="border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; outline-width: initial; outline-style: none; outline-color: initial; overflow-x: visible !important; overflow-y: visible !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: inherit !important; color: rgb(0, 109, 175); ">http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
<a href="http://maven.apache.org/xsd/settings-1.0.0.xsd" "="" style="border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: initial !important; border-top-width: 0px !important; border-right-width: 0px !important; border-bottom-width: 0px !important; border-left-width: 0px !important; border-style: initial !important; border-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.2em !important; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; outline-width: initial; outline-style: none; outline-color: initial; overflow-x: visible !important; overflow-y: visible !important; padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: inherit !important; color: rgb(0, 109, 175); ">http://maven.apache.org/xsd/settings-1.0.0.xsd">
< profiles >
< profile >
< id >tomcat5x</ id >
< activation >
< activeByDefault >true</ activeByDefault >
</ activation >
< properties >
< appserver.id >tomcat5x</ appserver.id >
< appserver.home >c:\opt\tomcat</ appserver.home >
< maven.tomcat.home >c:\opt\tomcat</ maven.tomcat.home >
< sakai.appserver.home >c:\opt\tomcat</ sakai.appserver.home >
< surefire.reportFormat >plain</ surefire.reportFormat >
< surefire.useFile >false</ surefire.useFile >
</ properties >
</ profile >
</ profiles >
</ settings >

Optionally,你可以以一个环境变量来指定Tomcat的位置:

< maven.tomcat.home >${env.CATALINA_HOME}</ maven.tomcat.home >
使用网络代理需要添加一个 <proxies> 节点到  settings.xml :
< proxies >
< proxy >
< active >true</ active >
< protocol >http</ protocol >
< host >www.your.proxy.host</ host >
< port >80</ port >
< username >your_username</ username >
< password >your_password</ password >
< nonProxyHosts >localhost</ nonProxyHosts >
</ proxy >
</ proxies >

(info) If you do not use a username or password for your proxy exclude the <username> and <password> elements. You only need the nonProxyHosts option if you have a local maven repo that does not require the proxy to be accessed. Maven 2.0 does not support Microsoft's NTLN authentification scheme. If you connect to a proxy like ISA you will need to use a tool such as http://ntlmaps.sourceforge.net/ to proxy your traffic.

5.0 安装Tomcat 5.5.33

(warning)   Tomcat 5.5:  we recommend Tomcat 5.5.33 in order to avoid certain Tomcat security vulnerabilities present in earlier releases.

(minus) Tomcat 6.0 / 7.0: Sakai 2.8 has not been tested in Tomcat 6.0 or 7.0 and will not run in either version of Tomcat without configuration changes. Adopters are advised to stay with the Tomcat 5.5. series.

(warning) JAVA_OPTS: running Sakai 2.x in Tomcat 5.5.27+ requires JAVA_OPTS modifications (see below).

(info) Sakai installations should always be accompanied by a fresh install of Tomcat. It provides a clean environment that simplifies troubleshooting if problems are encountered during the startup phase.

The Apache Tomcat servlet container provides an ideal environment for running Sakai as a web application. Tomcat implements both the Java Servlet and JavaServer Pages (JSP) specifications and can be run in standalone mode or in conjunction with a web application server such as the Apache HTTP server or JBoss. Sakai 2.8 works with the Tomcat 5.5 series.

Tomcat can be downloaded as a binary install from http://archive.apache.org/dist/tomcat/tomcat-5/

Choose the core distribution. Windows users have the option of downloading either a Windows Service Installer .exe or a binary *.zip archive. We recommend the *.zip archive over the installer because configuration and log viewing are easier. You can later convert the .zip install into a service install by running /bin/service.bat (see below for more details).

Unpack the Tomcat archive into your installation directory of choice, e.g. /opt/. Unix/Mac users should create a symbolic link (e.g., ln -s apache-tomcat-5.5.33) while Windows users should simply rename the base Tomcat directory to /tomcat to simplify the path.

Tomcat pathnames

Windows users should ensure that the Tomcat path includes no spaces as this causes errors with JavaServer Faces (JSF) tools in Sakai.

(thumbs up) Good: C:\opt\tomcat\, C:\sakaistuff\installs\tomcat\ 
(thumbs down) Bad: C:\program files\tomcat\, C:\opt\apache tomcat 5.5.33\

Tomcat permissions

Unix/Mac users should make sure that they have write permissions to the Tomcat servlet container files and directories before proceeding or startup permission errors may occur.

Tomcat JDK 1.4 Compatibility Package

(minus) Do not download and install the JDK 1.4 Compatibility Package. Sakai 2.8 will not run should you install it.

5.1 Set Tomcat environment variables
By convention, the base Tomcat directory (e.g.  /usr/local/apache-tomcat-5.5.33 ) is referred to as  $CATALINA_HOME . As a convenience, you should create a $CATALINA_HOME  environment variable. For UNIX operating systems one typically modifies a startup file like ~/.bash_login to set and export shell variables while Mac users typically set and export environment variables in  .bash_profile . For Windows, go to  Start -> Control Panel -> System -> Advanced -> Environment Variables  and set your Tomcat environment variables via the GUI.

Set the CATALINA_HOME environment variable to point to the base directory of your Tomcat installation and add the Tomcat /bin directory to your PATH variable:

Variable

Unix/Mac

Windows

CATALINA_HOME

export CATALINA_HOME=/opt/tomcat

CATALINA_HOME=C:\tomcat

PATH

export PATH=$PATH:$CATALINA_HOME/bin

;C:\tomcat\bin

(warning) Windows: append string to the end of the Path system variable.




  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值