This document is based on installing the binary version (2.6.x) for

advertisement
This document is based on installing the binary version (2.6.x)
for the Microsoft Windows 2008 R2 64bit OS in a K-12 environment.
Installing Sakai on Windows 2008 R2 Enterprise 64bit
This installation uses:
Java version 1.5.0_18
Java Development Kit 1_5_0_21 (Windows-AMD64)
Tomcat 5.5.26
MySQL 5.1.39
MySQL-Connector-Java 5.1.10
Sakai-src-2.6.1
Refer to Sakai installation instructions http://confluence.sakaiproject.org/display/DOC/Install+Guide++Source+Install+%282.6%29 for more detailed instructions.
Install Windows 2008 R2 Enterprise server 64 bit.
Installing and setting up the Java Development Kit:
Install JDK-1_5_0_21-windows-amd64
Edit the system variables:
Add JAVA_HOME C:\Program Files\Java\jdk1.5.0_21
(Start -> Control Panel -> System -> Advanced -> Environment Variables)
Add to PATH ;C:\Program Files\Java\jdk1.5.0_21\bin
(From the command prompt) execute: set JAVA_OPTS=-server -XX:+UseParallelGC -Xmx768m XX:MaxPermSize=160m -Djava.awt.headless=true}}
Installing Tomcat:
Unzip Tomcat 5.5.26
(From the command prompt) mkdir c:\opt\Tomcat (for unzipped Tomcat)
(If you want to run Tomcat on different ports, change the server.xml file:
C:\opt\Tomcat\conf\server.xml)
Add an index.html into C:\opt\Tomcat\webapps\ROOT
Example index.html (from the Sakia install instructions):
<html>
<head>
<title>Redirecting to /portal</title>
<meta http-equiv="Refresh" content="0:URL=/portal">
</head>
<body bgcolor="#ffffff" onLoad="javascript:window.location='/portal';">
<div style="margin:18px;width:288px;backgroundcolor:#cccc99;padding:18px;border:thin solid #666600;text-align:justify">
<p style="margin-top:0px">
You are being redirected to the Sakai portal. If you are not automatically
redirected, use the link below to continue:<br/>
<a href="/portal">Take me to the Sakai portal</a>
</p>
</body>
</html>
Adjust the Tomcat memory settings:
Create a new file called setenv.sh in C:\opt\Tomcat\bin
Add to the setenv.sh:
set JAVA_OPTS=-server -XX:+UseParallelGC –Xmx4096m -XX:MaxPermSize=256m Djava.awt.headless=true
You will want to setup Tomcat as a Windows service. (reference Binary install doc 2.4)
(from command prompt) C:\tomcat\bin> service.bat install
Add CATALINA_HOME C:\opt\Tomcat
(Start -> Control Panel -> System -> Advanced -> Environment Variables)
Add to PATH ;C:\opt\Tomcat\bin
Installing and setting up MySQL
Install MySQL 5.1.39
Create the MySQL database:
(From the command prompt)
mysql -u root –p
Enter password: ******
mysql> create database sakai default character set utf8;
mysql> grant all on sakai.* to sakaiuser@'localhost' identified by 'sakaipassword';
mysql> grant all on sakai.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword';
mysql> flush privileges;
mysql> quit
Install MySQL Connector
http://dev.mysql.com/downloads/connector/j/5.0.html
Copy mysql-connector-java-5.1.10-bin.jar to C:\opt\Tomcat\common\lib
Installing Sakai
Extract the Sakai Binary
Create a new folder C:\opt\Tomcat\sakai
Go to
https://source.sakaiproject.org/svn/config/trunk/configuration/bundles/src/bundle/org/sakaiproject/co
nfig/bundle/
Select default.sakai.properties save the file to your desktop
Rename the file default.sakai.properties to sakai.properties and save it in C:\opt\Tomcat\sakai
Edit the sakai.properties file to change the database from HSQLDB to MySQL
Find the DATABASE section of the config and set the database and username.
Comment out all of the HSQLDB specific lines and uncomment the MySQL line.
(This is what the DATABASE section looks like when configured for MySQL)
# ########################################################################
# DATABASE
# ########################################################################
# set the Hibernate dialect (for shared datasource),
# HSQLDB by default, MySQL and Oracle examples
# hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.dialect=org.hibernate.dialect.Oracle9iDialect
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
# Enable hibernate SQL debugging output.
# Default=false.
hibernate.show_sql=false
# The database username and password. The defaults are for the out-of-the-box HSQLDB.
# Change to match your setup. Do NOT enable access to your database without a password.
username@javax.sql.BaseDataSource=USERNAME
password@javax.sql.BaseDataSource=PASSWORD
# HSQLDB settings (DEFAULT)
# vendor@org.sakaiproject.db.api.SqlService=hsqldb
# driverClassName@javax.sql.BaseDataSource=org.hsqldb.jdbcDriver
# hibernate.dialect=org.hibernate.dialect.HSQLDialect
# validationQuery@javax.sql.BaseDataSource=select 1 from INFORMATION_SCHEMA.SYSTEM_USERS
# Two hsqldb storage options: first for in-memory (no persistence between runs), second for disk based.
#url@javax.sql.BaseDataSource=jdbc:hsqldb:mem:sakai
#url@javax.sql.BaseDataSource=jdbc:hsqldb:file:${sakai.home}db/sakai.db
# MySQL settings
vendor@org.sakaiproject.db.api.SqlService=mysql
driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding
=UTF-8
validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
# To get accurate MySQL query throughput statistics (e.g. for graphing) from the mysql command
show status like 'Com_select'
# This alternate validation query should be used so as not to increment the query counter unnecessarily
when validating the connection:
validationQuery@javax.sql.BaseDataSource=show variables like 'version'
Starting and Stopping Sakai
From C:\opt\Tomcat\bin
Startup.bat
Shutdown.bat
http://127.0.0.1:8080/portal
Refer to Sakai installation instructions for more detailed instructions:
http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Source+Install+%282.6%29
http://confluence.sakaiproject.org/display/DOC/Install+Guide+-+Binary+Install+%282.6%29
http://confluence.sakaiproject.org/display/DOC/MySQL+Sakai+database+(2.6)
http://confluence.sakaiproject.org/display/DOC/Configuration+%282.6%29
Download