- Sakai CLE Courseware Management
- Alan Berg, Ian Dolphin
- 1140字
- 2025-03-31 04:37:29
Installing the demo
Sakai is built with the Java programming language. Java bytecode runs on multiple platforms without modifications. There are Java Virtual Machines available for Macintosh, Windows PC, Linux, and many other platforms. To run the demo version of Sakai, you must have a version of the Java Development Kit — currently Java 1.6 JDK — installed on your machine.
The demo is great for individual exploration. However, when you deploy for more than a few users, you will need to connect to a more substantial database such as MySQL or Oracle. The Foundation-supported quality assurance teams have thoroughly tested both MySQL and Oracle infrastructures under the numerous sites and variations, and over a whole series of versions.
Changing from one database to another requires only eight lines of configuration in the sakai.properties
text file, as you'll see later in the chapter, so there's a clear path from demo to mid-sized production. (The route to large-scale deployments involves multiple servers and hardware such as load balancers. Chapter 3, Sakai 2.x Anatomy, briefly discusses high-scalability structures. The technologies used are standard, well-known, and they work well under high user demand.)
Installation is straightforward, assuming that you have a modern computer with at least 1GB of RAM (preferably more) and Java 1.6 (http://www.java.com/en/download/manual.jsp) installed.
At the time of writing, the following simple installation instructions are accurate. To confirm that you have the correct version of Java installed on your system, run the following from the command line:
java -version
Tip
Java version numbering
One point of confusion is the Java version numbering (http://java.sun.com/javase/namechange.html). The aged Java 1.5 is currently also known as Java 2 Platform, Standard Edition 5.0 (J2SE 5.0). Java 1.6 is also known as Java Platform, Standard Edition 6 (Java SE 6). The fuller version with more programming libraries is known as Java 2 SDK. To avoid confusion, most administrators and developers use the version number, rather than the name, to keep track of changes.
Next, download the demo package (http://sakaiproject.org/node/2261) and unpack it in a location of your choice — for example, your home directory. A subdirectory, sakai-demo-x.x.x
(where x.x.x
is the current Sakai version number) should appear.
Now, verify that the environment variable JAVA_HOME
exists and points to the top-level directory of your Java 1.6 instance. For Unix operating systems, you would typically modify a startup file like ~/.bash_login
to set and export shell variables, while Macintosh users usually set and export environment variables in .bash_profile
. For Windows, select Start | Control Panel | System | Advanced | Environment Variables and set JAVA_HOME
via the GUI. The JAVA_HOME
value should look similar to the following, with the value of JAVA_HOME
specific to your environment:
- Linux/UNIX:
export JAVA_HOME= /usr/lib/jvm/java-6-sun-1.6.0.22
- Mac:
export JAVA_HOME=/Library/Java/Home
- Windows:
JAVA_HOME=C:\j2sdk1.6.0.22
The environment variable becomes available as soon as you open a new shell in Windows or a new terminal in OS X.
To start the demo from the command line, in the root directory of the unpacked Sakai demo, type:
- Windows:
start-sakai.bat
- Linux/UNIX/Mac:
/start-sakai.sh
You'll immediately see a lot of messages from both Tomcat and Sakai. It's normal to get a lot of output. Be patient and in a few minutes, you'll see a text similar to:
INFO: Server startup in 168687 ms (2008-09-25 10:22:35,175 main_org.apache.catalina.startup.Catalina)
The first startup takes about 40% longer than later startups. This is because the Tomcat server needs to expand the web application archives for Sakai and its tools, and to set up and populate the embedded database. Because there are many tools loaded initially, the average startup time is longer than it would be for a less feature-rich application.
The demonstration server is stopped by using another of the included scripts:
- Windows:
stop-sakai.bat
- Linux/UNIX/Mac:
stop-sakai.sh
With the server started, you should be able to view the Sakai demo by connecting a web browser to http://localhost:8080
. The home page should look similar to the next figure. The welcome message in the center of the screen mentions the sakai.properties
file, which can be found under the home directory of your Sakai instance in the Sakai subdirectory, and which is used to define database settings, e-mail addresses, and other important configuration options. You'll tweak this important file periodically throughout the remaining chapters of this book.

For further help on running the demo, please see:
https://confluence.sakaiproject.org/display/DOC/Release+Documentation
Administrator's account
The default administrator's account is named admin
with the password admin
. It is recommended that you change the default password as soon as possible. To do this, log on as the admin user, select the Administration Workspace tab, and then click on the Users tool on the left side of the screen. Choose the administrator's account, enter a new password in the Create New Password field, and enter it again in the Verify New Password field. Click on Update Details to submit the changes, and use your new password the next time you log in.

To test Sakai, you'll need a range of accounts with different roles. You can add a user from the Users tool, or by logging out and creating a default set of accounts from the public-facing welcome page you saw earlier. From the welcome page, select the New Account tool from the menu on the left side, complete the New Account information (the e-mail address is optional), and click Create Account.

Tip
Removing Sakai
Removing Sakai is as simple as removing the installation directory via your favorite OS's GUI or from the command line. For example, under UNIX/Linux:
rm -rf install_directory
Under Windows:
RMDIR install_directory /s /q
Expanding the demo
After you try out Sakai, you'll probably want to invite a few other users to take a look. Using the in-memory database for a wider demonstration or pilot is not recommended. The embedded database does not provide any guarantee of stability, and only saves data on a successful shutdown. An unexpected restart can result in a loss of data. A wider pilot will probably also require a larger amount of memory. To roughly double the number of simultaneous users, you can modify the default memory ceiling via the JAVA_OPTS
setting in the startup Sakai script; for example, to increase the maximum memory setting to 2048 MB, the JAVA_OPTS
should look roughly similar to the following:
JAVA_OPTS="-server -Xmx2048m -XX:MaxNewSize=256m XX:MaxPermSize=256m -Dsakai.demo=true -Dhttp.agent=Sakai -Dsakai.demo=true -Djava.awt. headless=true -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax"
Chapter 9, The Administration Workspace, (section sakai.properties) discusses how to attach Sakai to MySQL or to an Oracle database. Both are industry standard databases that scale to high numbers of users and widespread commercial support. The QA team has thoroughly tested Sakai with both of these databases and has codified recommendations on device driver version numbers available at XXX. There are also a number of administrators supporting each database in production, and contributing their expertise to the documentation and Sakai mailing lists.
In Chapter 4, My First Site, you will find out how to run your first project and course site.