Building LAMS from source
This is the software you need to compile/build LAMS:
Getting LAMS source
You can get the LAMS source via our CVS or on our Downloads page (source tab)
Getting it from CVS
The LAMS code is available for viewing via the web at http://code.lamsfoundation.org/fisheye/browse/lams.
Configure your cvs client as follows:
The project name all contains all the packages and tools required to build the standard LAMS distribution.
If you want to build another branch, check out CVS Repositories, Branching and TAGS
There's just a few system settings to adjust before you compile.
Change the osPropertiesName according to the OS you are building LAMS on:
... # which o/s related property file do you want? valid values "windows" or "unix" osPropertiesName=windows ...
If using Windows, now edit the windows.properties file. If using Unix: unix.properties and adjust the path and settings according to your configuration
... # Path to jboss directory: jboss.home=D:/jboss-5.1/ ...
Now you should be ready to compile LAMS. In lams_build, using your console run:
That should compile LAMS and all its tools.
After it finishes compiling, go to you jboss-5.1/bin folder and execute run.bat or run.sh to start LAMS. Then point your browser to http://localhost:8080/lams/ and you should be able to see the LAMS login page.
There's a few testing users to get you started:
Author, Monitor and Learner
Author, Monitor and Learner
Author, Monitor and Learner
Author, Monitor and Learner
Need more? Login as sysadmin and head to the sysadmin menu.
LAMS is released under the GPL license version 2,
Just post a message in the Tech forums of the LAMS Community
Property Files and LAMS Configuration Table
Go through the properties files in the lams_build project and set the entries to suit your PC. In particular check
unix.properties as they might require some editing according to your setup.
Configure the LAMS Configuration table. This is the system configuration table - updated via System Administration - the sql to create the table is in either lams_common/db/sql/insert_windows_config_data.sql or lams_common/db/sql/insert_unix_config_data.sql (OS dependant). The main entries you will need to configure are as follows:
ServerURL must be set to the url you intend to use to run LAMS. If you put one url here, and then access LAMS via another url then some of our images won't work.
Location of temporary files. Should be allocated to an area with plenty of disk space. These files can be deleted if they are more than a couple of days old.
When the Flash clients receive an unexpected response from the server, the user can write out a dump file to this directory. The dump file can be used for reporting bugs back to the LAMS team.
The "deployed" or "running" version of LAMS will go here. It is usually <JBOSS directory>/server/default/deploy/lams.ear. If this is wrong then the export portfolio will not work correctly.
Needed for sending system emails.
This is where all uploaded files are stored, so it needs to be on a disk with plenty of space.
This is a really important data table - an invalid entry in this table and LAMS may not work.
If you are unsure of the LAMS Configuration settings then they can be changed after building.
Using Command Line Ant;
Then in lams_build project, run the following ant tasks:
- Run "rebuild-db
- Run "assemble-ear"
- Run "deploy-ear"
- Run "deploy-tools"
- Run "copyfiles"
Or, just run "lams-cruise" and it should do all of them in above order.
If you are using Eclipse, then you need to make sure you have the code loaded in Eclipse.
If you are using the zip file above, or checked out Eclipse using another cvs client then you will need to get the projects set up right in Eclipse. If you checked out using Eclipse then you can go on to the next step. Copy all the project folders that you got out of CVS / from the zip file to your Eclipse workspace directory. Then go to Eclipse and for each project folder, do File, New Project, select Java Project, click Next and enter the name of the project folder. Leave the options as given in this screenshot. Then click Finished. This should create the new project in Eclipse.
When all the projects are loaded, the screen should look something like the following, except that you won't have the lams_documents, lams_tool_deploy, lams_tool_example projects. You can close all projects except lams_build as this helps reduce the memory that Eclipse needs.
Then in lams_build project, select the build.xml file, right mouse click to get the popup menu and select "Run As", "Ant Build...". Its about 3/4 the way down the menu. Make sure you pick "Ant Build...", not "Ant Build".
A dialog box will appear. Uncheck the usage entry (this is the default) and turn on
- and "copyfiles" IN THAT ORDER. The order is really really important. Then click Run.
You don't have to do them all at once - you can just turn on one, run it, bring up the dialog box again and select the next one. But it must be done in the right order.
If you encounter a problem, you can rerun these tasks. Until you learn what each one does, you are probably best to start with "rebuild-db" and go through all 5 tasks again. "rebuild-db" will delete all the tables in the database so you don't need to do that manually. But the LAMS database must exist or "rebuild-db" will fail. If "rebuild-db" itself fails, it may have deleted the database, in which case you will need to "Database Setup" and set up the database again.
For people doing development only (i.e. trying to do more than build and run LAMS): The lams_common project has a task "insert-test-data". This is only used if you want to run the core projects' test cases. Do not use it for running the LAMS server.
Now that everything is deployed and the database is setup, you can now start JBOSS. Good luck!
Once JBOSS is running, you should be able to access LAMS as http:/<servername>/lams. If you are running locally on your PC, it will probably be http://localhost:8080/lams. Login in as username mmm (see Development User Organisations)
If you are having trouble accessing LAMS check http:/<servername>/ (e.g. http://localhost:8080/). This should display the main JBOSS page. If you don't get the JBOSS page then JBOSS hasn't started properly.
If JBOSS has started but LAMS doesn't seem to be working have a look at the <jboss directory>/server/default/log directory. There should be a server.log and a lams.log (along with some other logs). If there isn't a lams.log LAMS hasn't started at all. If there is a lams.log, then check it for errors.
If there isn't a lams.log check server.log. There should be an entry like "Init J2EE application: file:/D:/jboss-4.0.2/server/default/deploy/lams.ear/" when LAMS tries to start, and an entry like "Started J2EE application: file:/D:/jboss-4.0.2/server/default/deploy/lams.ear/" when LAMS has ready to run.
If you have some of the settings in LAMS Configuration table wrong, then you can change this file without rebuilding or restarting (in some instances) LAMS. Login as System Admin, go to System Administration page, select Edit Configuration Settings. Save your changes. All changes will be persisted to the database table. Note: If you rebuild the Database, this will undo changes made via System Administration.
For some tips on debugging and using the JBOSS hot deploy with Eclipse, see Debugging with JBOSS and Eclipse.
Still having problems to build?... Post your issues in this forum thread in the LAMS Community
Rebuilding The Tools
If you have deployed the tools, then do rebuild-db and then try to deploy the tools again, you are likely to get errors due to the tool tables not being created. The tool deployment utility doesn't really support "reinstallation" of tools yet, so the db recreation bit that exists is a hack, and breaks if the lams_tool table is purged (which occurs when rebuild-db is run).
So if you do rebuild-db either delete all the tool tables (they start with tl_ or tool_) using your favourite DB manager or drop and recreate the database.
In addition, the parallel activities are created each time you you do "deploy tools". So if you do "deploy tools" twice without rebuilding the db, you will end up with two copies of the parallel activities in authoring. This will not break anything but it does look a bit odd!
Creating Your Own Users and Courses
There are a number of test users (test1, test2 and test3) and their passwords are the same as their username. They have access to authoring, starting lessons and participating in lessons in a test organisation Developers Playpen.
To create your own users/organisations, login as sysadmin (password sysadmin). You can then access the administration screens to manage users and courses.
Still having problems?
- Please don't hesitate to ask questions in the Technical Forum at the LAMS Community