sakai配置(英文版)
来源:互联网 发布:淘宝开网店技巧 编辑:程序博客网 时间:2024/04/28 22:16
This is a walkthrough for setting up a
Notes for windows users
- change the "/" to "/" for all directory paths except those specified in the maven build.properties file
- add the drive letter (C:) to your paths
- use %VARIABLE% instead of $VARIABLE with environment variables
- set your environment variables in Control Panel -> System -> Advanced -> Environment Variables
All of sakai and related programs should be installed in an opt directory which you will need full write access to, put this directory anywhere you want, this document will assume you have placed it in your root directory
1. Install/Verify you have Java 1.5
1. To check: Run java -version on the command line
2. If not correct, download the J2SE SDK from:
§ http://java.sun.com/j2se/1.5.0/download.jsp
§ Mac OS X users will have Java 1.5 by default
3. Install it (the SDK) to /opt/java
§ Note: Install the JRE to a different directory (probably the default, especially under windows)
§ or you will have problems
4. Set environment variable: JAVA_HOME=/opt/java
§ Mac users: JAVA_HOME=/Library/Java/Home
§ Windows users default: JAVA_HOME=C:/j2sdk
5. Add $JAVA_HOME/bin to PATH
6. Set JAVA_OPTS for tomcat in the tomcat/bin/setenv file (see Install Tomcat 5.5)
7. JAVA_OPTS='-server -XX:+UseParallelGC -Xmx
§ These settings are for developers
§ More info on JVM tuning: Sakai 2.2 developer JVM tuning
2. Install/Verify you have MySQL 4.1
o MySQL - http://www.mysql.com
§ Some have reported that MySQL 5.0.x works just fine as well. If you already have this version, there's likely no point in downgrading to 4.1.*.
2. To check: Run mysql --help on the command line
3. If not, download MySQL from:
§ http://dev.mysql.com/downloads/
4. Custom install to /opt/mysql (options vary slightly based on operating system)
§ Linux users should install MySQL using a package or binaries if possible
2. Choose standard configuration
3. Install as a windows service (Windows only)
4. Launch automatically (recommended)
§ If you choose not to do this, make sure that you startup MySQL before you try to run
5. Include the bin directory in Path
6. Don't use an anonymous account
7. Set your root password to "mysqlpwd1"
3. Setup
0. Create the
1. Run the following from a command line prompt:
2. mysql -uroot -pmysqlpwd1
§ Note: You can also do the following if you prefer to be prompted for the password: mysql -uroot -p
3. Then run these commands from the mysql prompt (one command per line):
4. create database
5. grant all privileges on sakai.* to '
6. flush privileges;
7. quit
8. [Optional] Download and install mysql query browser
0. http://dev.mysql.com/downloads/query-browser/1.1.html
1. You do not have to do anything with query browser now
4. Download and setup Maven 1.0.2 stable package
o Maven - http://maven.apache.org/
1. Download Maven 1.x - http://maven.apache.org/maven-1.x/start/download.html
§ Note - although Maven 2.0 is out and stable, it does not currently work with
2. Extract to /opt (should create maven-
3. Set environment variable: MAVEN_HOME=/opt/maven-
4. Add $MAVEN_HOME/bin to PATH/
5. Set the MAVEN_OPTS environment variable
6. MAVEN_OPTS='-Xms
5. Install/Verify you have Subversion
o Subversion - http://subversion.tigris.org/
1. To check: Run svn --version on the command line
§ http://subversion.tigris.org/project_packages.html
§ Get the subversion binaries and not the source, if possible
§ If there are no binaries for your platform, get the source and use the configuration
§ options --with-ssl and --with-libs
2. Extract to /opt (should create subversion-
§ Windows users will want to rename the extracted directory
§ Unix users will probably want to use a package for their flavor
3. Set environment variable: SUBVERSION_HOME=/opt/subversion-
4. Add $SUBVERSION_HOME/bin to PATH
6. Download and setup tomcat 5.5.17+ (stable only)
o Apache Tomcat - http://tomcat.apache.org/
1. Note: Always do a fresh install of Tomcat
2. Download tomcat 5.5 - http://tomcat.apache.org/download-55.cgi
§ Windows users should get the zip file instead of installing a service
It makes viewing the tomcat logs easier and it is easier to configure
3. Extract to /opt (symlink the apache-tomcat-5.5.x directory to tomcat after extracting)
§ Windows users should just rename the directory since they cannot symlink
4. Download the jav
5. Extract the files to the same location as tomcat itself
6. Modify conf/server.xml for international character support
0. Add URIEncoding="UTF-8" to the Connector element
§ <Connector port="8080" URIEncoding="UTF-8" ...
7. Set environment variable: CATALINA_HOME=/opt/tomcat
8. Add $CATALINA_HOME/bin to PATH
9. Setup the SETENV file in the tomcat/bin directory with JAVA_OPTS (from Install Java 1.5)
0. Mac/Linux: Create a file called setenv.sh with the following:
export JAVA_OPTS="-server -XX:+UseParallelGC -Xmx
1. Windows(PC): Create a file called setenv.bat with the following:
set JAVA_OPTS=-server -XX:+UseParallelGC -Xmx
7. Download and setup MySQL Connector/J stable
o Mysql Connector J - http://www.mysql.com/products/connector/j/
1. Download connector for your version of MySQL
0. If running mySQL 4.1
Download version
1. If running MySQL 5.0.x
Download version
2. Extract the file to /opt
3. Copy mysql-connector-java-<version>-bin.jar to $CATALINA_HOME/common/lib
4. Delete the extracted folder
8. Use Subversion to download
0. Change to the /opt directory
1. svn checkout https://source.sakaiproject.org/svn/cafe/branches/2-2-x/
0. If you want a version other than this one, browse the tags at
1. https://source.sakaiproject.org/svn/cafe/
2. subversion will create a "2-2-x" directory for you,
you can use any directory name you like, just add a name after the checkout location:
svn checkout https://source.sakaiproject.org/svn/cafe/branches/2-2-x/
2. Checkout will take about 5-10 minutes
3. The directory created by subversion will be referred to as <sakai-src> directory
9. Setup sakai.properties file
0. Create
§ $CATALINA_HOME should be /opt/tomcat if you have been following these instructions
§ Note: There were previously two configuration files, sakai.properties and placeholder.properties. These have now been combined into sakai.properties. You can attempt to manually combine the two files from a previous version,
§ but it's better to start with the sample included with the
1. Copy sakai.properties from <sakai-src>/reference/docs to $CATALINA_HOME/sakai
§ Note: This file may not be in your checkout if you have acquired
§ one of the older versions of cafe - you can fetch it manually from
§ here https://source.sakaiproject.org/svn/reference/trunk/docs/sakai.properties
Make sure you get the sakai.properties for the version of
http://source.sakaiproject.org/svn/reference/branches/sakai_2-2-x/docs/sakai.properties
2. Edit the sakai.properties file for a MySQL dev environment.
3. Starting at the section # DATABASE CONFIGURATION:
0. Set BaseDataSource username
1. Set username@javax.sql.BaseDataSource=sakai
1. Set BaseDataSource password
0. Set password@javax.sql.BaseDataSource=ironchef
2. Find the section: ## HSQLDB settings and comment out 7+ lines in it
3. ## HSQLDB settings - on by default
4. #vendor@org.sakaiproject.service.framework.sql.SqlService=hsqldb
5. #driverClassName@javax.sql.BaseDataSource=org.hsqldb.jdbcDriver
6. #hibernate.dialect=org.hibernate.dialect.HSQLDialect
7. #validationQuery@javax.sql.BaseDataSource=select 1 from SYSTEM_USERS
8. # two hsqldb storage options: first for in-memory (no persistence between runs), second for disk based
9. #url@javax.sql.BaseDataSource=jdbc:hsqldb:.
10. #url@javax.sql.BaseDataSource=jdbc:hsqldb:${sakai.home}/db/sakai.db
11. Find the section: ## MySQL settings and uncomment the 6+ lines in it
12. ## MySQL settings - make sure to alter as appropriate
13. vendor@org.sakaiproject.db.api.SqlService=mysql
14. driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
15. hibernate.dialect=org.hibernate.dialect.MySQLDialect
16. url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding=UTF-8
17. validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
18. defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
§ Note that this line may be incorrect in the default file, it should read as shown:
§ vendor@org.sakaiproject.db.api.SqlService=mysql
4. Save the changes to the file
10. Create maven build.properties file
0. Create a new text file in your user home directory
§ Note: This is probably c:/documents and settings/<username> in Windows
1. Add the following lines:
2. maven.repo.remote = http://source.sakaiproject.org/maven/
3. maven.tomcat.home = /opt/tomcat/
§ Note: The trailing slashes are required
§ Note: You must use forward slashes
§ Note: You must have spaces around the "="
§ Note: Do not change / to / if using windows
§ Note: DO add c: to the path if using windows
11. Use Maven to build Sakai
0. Open a command line shell
1. Change directory to /opt/<sakai-src>
2. Execute maven bld to build
§ Do NOT use maven
§ Note: The build will take an extra 5-10 minutes to download dependencies the first time
3. Execute maven dpl to deploy
4. Add the maven plugin to allow for partial builds in
Run the following command from the
5. maven plugin:download -DartifactId=
You can now do a "maven
6. For future builds, use maven
(it is basically the same as doing maven cln bld dpl)
12. Start Tomcat and check to make sure
0. Start tomcat using $CATALINA_HOME/bin/startup
1. Allow 1 minute+ for tomcat to start up
2. Open http://localhost:8080/
3. Open http://localhost:8080/portal
4. Login to
5. Shutdown Tomcat using $CATALINA_HOME/bin/shutdown
13. Install Eclipse 3.2+ stable
o Eclipse - http://www.eclipse.org/
§ Note: If you already have eclipse 3.1.x installed, your best best is to start over with a fresh install rather than attempting to upgrade
§ Note: If you have not installed eclipse already, you should download the WebTools
1. Download the newest stable version http://www.eclipse.org/
2. Extract the downloaded file to /opt
§ Windows users should extract to c:/
§ Mac users should use the installer and put it in Applications
3. Run eclipse to verify it works (/opt/eclipse/eclipse)
§ Windows users: c:/eclipse/eclipse.exe to run eclipse
§ Note: If it does not work, there is probably a problem with your java install
4. Set the memory settings for Eclipse
§ The default memory settings for Eclipse are much too low to handle the number of webapps in a full
1. Shutdown eclipse if it is running
2. Edit the eclipse.ini file in the directory you extracted/installed eclipse
3. Change the settings from this:
4. -vmargs
5. -Xms
6. -Xmx
to this:
-vmargs
-Xms
-Xmx
§ Windows users should not use notepad to edit this file, use wordpad or edit (command line)
§ Mac users will need to take additional steps to edit the eclipse.ini file
2. Control-click on the Eclipse Application icon and select Show Package Contents
3. Double-click on the Contents folderD
4. Double-click on the MacOS folder, the eclipse.ini file should be here
5. Full path: eclipse/Eclipse.app/Contents/MacOS/eclipse.ini
5. Set the JVM
§ The default JVM will be the one in the JRE, things will work better if you change this to the one in the J2SE
1. Startup eclipse if it is not running
2. Select Window -> Preferences -> Java -> Installed JREs
3. Select the current installed JRE
4. Click the Edit button
5. Click Browse and navigate to the home directory of your JAVA installation (e.g. /opt/java)
6. Click OK to save and then OK to Finish
§ Running Eclipse with a different JVM from the default
Add -vm /opt/java/bin/java after the eclipse executable
§ You must include the full path to the java executable file
o More Eclipse tips here: ARW:Eclipse notes
14. Add Eclipse Web Tools Project (WTP)
o Web Tools Project - http://www.eclipse.org/webtools/
1. Manual installation (faster)
§ http://www.eclipse.org/webtools/
1. Download WTP 1.5+ to your desktop
2. Shutdown Eclipse
3. Extract the package to your Eclipse installation directory
4. Startup Eclipse
2. Install using the Eclipse updater (easier)
0. Start eclipse
1. Select Help -> Software Updates -> Find and Install
2. Select Search for new features to install, click Next
3. Choose the Eclipse.org Update Site and click Finish
4. Select WTP 0.7 (or newer)
§ Note: If it is not listed, use the following update URL:
http://download.eclipse.org/webtools/updates/
5. Click Select Required
6. Click Next and follow installation instructions
7. Accept terms, click Finish
8. Click Install All
9. Restart the workbench when asked
3. WebTools Platform: All-in-one (fastest)
§ http://www.eclipse.org/webtools/
§ This should only be used if you do not already have Eclipse installed
2. Click on downloads
3. Click on the most current 1.5 build version
§ Note: There does not appear to be an all-in-one package for
4. Locate the All-in-one packages and download the appropriate one for your platform
5. Extract the package to whereever you want to install eclipse (normally your drive root)
6. Startup Eclipse
15. Add subclipse to Eclipse
o Subclipse - http://subclipse.tigris.org/
1. Startup eclipse
2. Select Help -> Software Updates -> Find and Install
3. Select Search for new features to install, click Next
4. Click New Remote Site
5. Enter Subclipse for the name
6. Enter http://subclipse.tigris.org/update_1.2.x
§ If you are using Eclipse 3.1 or older, you must use http://subclipse.tigris.org/update_1.0.x
Note: We highly recommend you upgrade to eclipse 3.2+
7. Click Finish
8. Check the Subclipse box and click Next
9. Accept terms, click Next, click Finish, click Install All
10. Restart the workbench when asked
o Add bin and target to global svn ignore in Eclipse (Optional)
§ This will keep you from committing bin and target directory files when you add projects to svn
1. Click on Window -> Preferences
2. Select Team -> Ignored Resources
3. Click on Add Pattern and enter "bin"
4. Click on Add Pattern and enter "target"
5. Click on Apply and then OK
16. Add SpringIDE to Eclipse
o SpringIDE - http://springide.org/project
1. Startup Eclipse
2. Select Help -> Software Updates -> Find and Install
3. Select Search for new features to install, click Next
4. Click New Remote Site
5. Enter Spring IDE updatesite for the Name
6. Enter http://springide.org/updatesite/
7. Click OK
8. Check the box marked "Spring IDE updatesite" and click Finish
9. Check the Spring IDE box and click Next
10. Accept terms, click Next, click Finish, click Install All
11. Restart the workbench when asked
17. Import Sakai source code into Eclipse
0. Startup eclipse if it is not running
1. Create a new workspace for
0. Click on File -> Switch Workspace
1. Enter "WS-Sakai" in place of the default "workspace" directory
2. Click OK (eclipse will restart)
§ The following steps should be done in the WS-Sakai workspace
2. Add Maven Repository libraries to classpath
0. Select Window -> Preferences -> Java -> Build Path -> Classpath Variables
1. Add MAVEN_REPO classpath variable with the path to the local maven repository
§ The path should be: $USER_HOME/.maven/repository
3. Switch to the Java perspective (Window -> Open Perspective -> Java)
§ Make sure you are in the package explorer
4. Turn off Automatic builds
§ Select Project and uncheck Build automatically
5. Select File -> Import -> Existing Projects into Workspace
0. Enter the full path to the
§ This should be /opt/cafe-2.2.x if you followed the steps in this document
1. Click Deselect All to unselect all projects
2. Select the following projects (you only need most of the APIs, a few utils, and all of the db projects)
alias-api
announcement-api
archive-api
authz-api
component-api
content-api
courier-api
db-api
db-impl
db-util
entity-api
email-api
event-api
jsf
message-api
master
site-api
site-manage-api
tool-api
user-api
util-api
util-util
velocity
3. Click Finish to import the selected projects
§ This will take awhile, probably 5+ minutes
6. Create a working set for
§ You do not have to create a working set, these are here in case you want to
1. Switch to the Java perspective
2. In the Package Explorer pane click the drop-down arrow menu and choose Select Working Set
3. Click the New button from the Select Working Set Dialog window
4. Choose Java for the Working Set Type and click Next
5. Enter
6. Select the imported
7. Build
§ Initially you will get build failures on almost every
1. Clean all
0. Select Project -> Clean
1. Select Clean all projects
2. Check Start a build immediately
3. Click OK
2. Build All (Project -> Build All)
§ Do this if using working sets:
Build the
§ Repeat this step until no errors remain (should be no more than 3-4 times)
§ There will be hundreds of warnings, do not worry about these
8. Turn back on Automatic builds
§ Select Project and check Build automatically
Children Hide Children | View in hierarchy
- sakai配置(英文版)
- sakai配置(中文版)(一)
- sakai配置(中文版)(三)
- sakai配置(中文版)(四)
- Sakai
- sakai
- windows下sakai配置过程
- sakai properties文件的配置
- windows 下sakai 2.9.0源码的配置启动
- sakai简介
- sakai使用说明
- sakai编译
- eclipse + sakai
- Debian Lenny英文版安装后配置
- Debian Lenny英文版安装后配置
- 英文版VS2010驱动开发环境配置
- firefox默认浏览器配置 英文版eclipse配置中文显示
- Sakai工具开发
- 快速上手Spring--8. 集合对象注入
- 人文之美辉映技术理性
- 快速上手Spring--9. Lookup方法注入
- JSTL 入门,第4部分: 访问SQL和XML内容
- 快速上手Spring--10. 任意方法的替换
- sakai配置(英文版)
- RealOne播放器脚本指南(RealOne Player Scripting Guide)
- 快速上手Spring--11. 自动绑定和依赖检查
- JSP 最佳实践: 使用JSTL来更新JSP页面
- JSP最佳实践
- 数据集(DataSet)通过ObjectDataSource与GridView连动(1)
- axis部署的ant脚本
- 关于测试与调试的日子
- 基于贪心算法的0/1背包问题