一、系统需求
Jdk1.5tomcat5.5.+mysql5.0
我用的是jdk1.5tomcat5.528
有以下注意事项:
(1)如果安装了Jdk1.6和tomcat6都将不会运行成功!
(2)Jdk1.5经过更新后,如果通过命令java-version得到1.6等信息,也运行不成功。
(3)配置JA V A_HOME CLASSPATH PATH信息
二、tomcat配置
(1)定义CATALINA_HOME环境变量,以及PATH
(2)在tomcat的根目录${CATALINA_HOME}目录下定义sakai目录,在sakai 目录内定义sakai.properties文件,文件内容包括连接数据等信息。
(3)在tomcat的${CATALINA_HOME}/common/lib文件夹内,增添mysql的驱动jar包。mysql-connector-java-5.0.8-bin.jar
(4)在tomcat的${CATALINA_HOME}/bin文件内定义setenv.bat文件,文件内容为set JAVA_OPTS=-server-XX:+UseParallelGC-Xmx768m-XX:MaxPer mSize=160m-Djava.awt.headless=true-Dorg.apache.jasperpiler.Parser. STRICT_QUOTE_ESCAPING=false
这个定义语句,要写在一条线上不能换行,不然总是出错,当tomcat启动的时候。
以上文件,我在附件里,都有。
三、l设置
我的是这样设置的,在附件里也有备份:
<settings xmlns="/POM/4.0.0"
xmlns:xsi="/2001/XMLSchema-instance"
xsi:schemaLocation="/POM/4.0.0
/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>tomcat5x</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<appserver.id>tomcat5x</appserver.id>
<appserver.home>D:\apache-tomcat-5.5.28</appserver.home>
&at.home>D:\apache-tomcat-5.5.28</at.home>
<sakai.appserver.home>D:\apache-tomcat-5.5.28</sakai.appserver.home>
&portFormat>plain</portFormat>
<surefire.useFile>false</surefire.useFile>
</properties>
</profile>
</profiles>
</settings>
定义好l文件后放在${user}/.m2目录下,供maven2使用。
四、数据库定义
(1)数据库定义:名称为sakai
create database sakai default character set utf8;
grant all on sakai.*to sakai@'localhost'identified by ironchef;
flush privileges;
(2)确认用客户端访问工具或命令,能用用户名sakai和密码ironchef访问sakai 数据库。
用户名和密码要和${CATALINA_HOME}/sakai/sakai.properties文件里统一。
在sakai.properties文件里有这两句话是设置用户名和密码的
username@javax.sql.BaseDataSource=sakai
password@javax.sql.BaseDataSource=ironchef
以下为连接数据库信息在sakai.properties文件中
vendor@org.sakaiproject.db.api.SqlService=mysql
driverClassName@javax.sql.sql.jdbc.Driver hibernate.dialect=org.hibernate.dialect.MySQLDialect
url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUni code=true&characterEncoding=UTF-8
validationQuery@javax.sql.BaseDataSource=select1from DUAL defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTIO N_READ_COMMITTED
mysql下载jar包五、MAVEN2设置
(1)假设已经设置好了maven2的环境变量,以下是设置办法:
1Unzip the distribution apache-maven-2.2.1-bin.zip to the directory you wish to install Maven2.2.1.These instructions assume you chose C:\Program Files\Apache Software Foundation.The subdirectory apache-maven-2.2.1will be created from the archive.
2Add the M2_HOME environment variable by opening up the system properties(WinKey+Pause),selecting the"Advanced"tab,and the"Environment Variables"button,then adding the M2_HOME variable in the user variables with the value C:\Program Files\Apache Software Foundation\apache-maven-2.2.1.Be sure to omit any quotation marks around the path eve
n if it contains spaces.Note: For Maven<2.0.9,also be sure that the M2_HOME doesn't have a'\'as last character.
3In the same dialog,add the M2environment variable in the user variables with the value%M2_HOME%\bin.
4Optional:In the same dialog,add the MA VEN_OPTS environment variable in the user variables to specify JVM he value-Xms256m-Xmx512m.
This environment variable can be used to supply extra options to Maven.
5In the same dialog,update/create the Path environment variable in the user variables and prepend the value%M2%to add Maven available in the command line.
6In the same dialog,make sure that JA V A_HOME exists in your user variables or in the system variables and it is set to the location of your C:\Program Files\Java\jdk1.5.0_02and that%JA V A_HOME%\bin is in your Path environment variable.
7Open a new command prompt(Winkey+R then type cmd)and run mvn--version to verify that it is correctly installed.
(2)在${M2_HOME}/bin/mvn.bat文件内新添以下定义:
set MA VEN_OPTS='Xms256m-Xmx512m-XX:PermSize=64m-XX:MaxPermSize=128m
六、安装SAKAI环境
现在的最新realease版本是sakai2.6.2实际上2.7.2.8都出来了。
(1)下载sakai2.6.2的源码用svn客户端或者用eclipse svn插件
(2)当下载完成后,从命令行进入源码的根目录执行以下命令
Cd master
Mvn clean install
Cd..
st=true clean install sakai:deploy
以上命令是首先进入mast目录下,先执行Mvn clean install命令,然后回到源码根目录再执行Mvn-Dm
st=true clean install sakai:deploy。其中-st=true最好加上,不然的话执行时间是相当的长,还有可能build 失败!当这个语句执行完毕,可以看到tomcat的webapps下面有新发布的很多war 包。
七、安装Sakai App Builder
1Start Eclipse
2Under the"Window"menu,select"Preferences"
3Expand the"Java"heading on the left side
4Expand the"Build Path"subheading
5Single-click the"Classpath Variables"subheading
6Click the"New"button
7For the Name,enter"M2_REPO"
8Click the"Folder"button,then navigate to the location of your local maven2repository (you want the r
epository directory:~/.m2/repository)
9Click"OK"to close the folder browsing dialog.
10Click"OK"to close the"New Variable Entry"dialog.
11Click"OK"to close the preferences window.
12Under the"Help"menu,select"Software Updates",then"Find and Install".
13Highlight the radio button marked"Search for new features to install",then click"Next".
14Click the button marked"New Remote Site".
15For the Name,enter"AppBuilder Site"
16For the URL,enter /appbuilder/update/
17Make sure the checkbox next to the new remote site is checked,then click"Finish"
18Check the box next to the latest version of Sakai AppBuilder,then click"Next"
19Read the license agreement,select the radio button indicating that you agree to the terms, then click"Finish"
20Select an alternate installation path if desired,then click"Finish"again
21Click"Install"on the next screen
八、安装artifactory
(1)artifactory包解压后,即可执行artifactory。
(2)输入用户名和密码,默认admin password
(3)不作特别设置,用户都可以匿名访问。在Admin/Repositores下可新建new romote repositores这样就可以把/maven2添加进来。
(4)我们artifactory的访问路径是:localhost:8081/artifactory/repo localhost可为你需要的地址。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。