M12 KP-Lab portal installation

Prerequisites

Few steps need to be done before you can start building the Jetspeed.

First you need to install at least the following

JDK 1.5+ => Guide

Maven2 -> Guide

Subversion -> Guide

Tomcat 5.5 -> Guide

MySQL -> Guide

you may also like to have

Eclipse
Subclipse[For Windows users -1]
Maven2 Eclipse plugin)

For installation of these, please, refer to the official instructions at least for now.

You should also not that currently you can not install Jetspeed with the by using the M2Eclipse plugin. Don't really know excatly what is the issue, something to do with profiles.

Installation

Step1:

First you have to obtain the source code. Open a console and go to the folder where to you want to checout the source code e.g. /home/myusername/kplabprojects. Then, enter the following command:

svn co https://kplab.evtek.fi/svn/kplab/wp6/apps/trunk kplab

This will checkout the source code from the subversion server. You should be prompted for username and password, but if the username is wrong just press enter once for blank password and you should now be asked for the username instead and then for the passoword. This should work atleast with the 1.4 version of subversion.

Note that the command will create a folder named kplab and the actual source code will be there. Use

cd kplab
to go there.

Step 2:

Now you have the source code. Next you should change some of the configuration options. Copy a file name settings.xml.sample from the portal folder to a .m2 under you home folder and name it settings.xml. The whole path should be in *nix /home/yourusername/.m2/settings.xml and in Windows c:\Documents and Settings\yourusername\.m2\settings.xml.

This command should do it Unix/Linux:

cp portal/settings.xml.sample ~/.m2/settings.xml

You can find the file and some more instructions at Jetspeed Maven2 settings page. Check if the default values match your system and if they do, you can skip to the next step, but they don't, open the file with a text editor and change properties to match your system. Check at least the following settings:

line: 63
org.apache.jetspeed.server.home should be the location you have installed your tomcat. /usr/local/tomcat is the ususal location.

lines: 143 and 149
Change the database names at the end of the connection url to match the ones you have created for Jetspeed. Defaults are j2 and j2test.

lines: 145-146 and 151-152
Check that the usernames and passoword match the ones configured to your mysql server for access to the Jetspeed databases.

If you are behind a proxy server, change the host/port/username/password values at the bottom of the file (lines 302-312) to match your proxy. If you are not behind a proxy server, remove or comment out the lines.

Step 2.1

To get the portal running you have to make some configurations to Tomcat also. You have to add a special user for Jetspeed portlet deployment. In the default configuration provided the user is named j2deployer with a password j2deployer and for development systems this is good enough. For production environments you might want to change this just for security reasons.

User is defined with properties org.apache.jetspeed.services.autodeployment.user and org.apache.jetspeed.services.autodeployment.password in the Maven2 settings on lines 68-69 (the same file you just edited on Step 2)

That user must be added to the tomcat users list which is defined in a file /usr/local/tomcat/conf/tomcat-users.xml or in anyway you can find the file under conf folder under your Tomcat installation. Add the following line after the existing users for default installation:

<user username="j2deployer" password="j2deployer" roles="manager" />

If you wish to change this user for some reason, you must do the corresponding changes in both settings.xml and tomcat-users.xml files.

Step 3:

Now you should be able to compile the source and deploy it to the tomcat.

Compiling and deploying Jetspeed is easy once (and if) you have the configuration setup correctly. If building for the first time, execute the following commands at the source code root:

mvn
mvn -P tomcat

The first command will build all the components and install them to the local Maven repository. The second one will package the components and deploy them to the Tomcat. For the subsequent builds you may only execute the

mvn -P tomcat

command as it will also compile, install and package everything. If you do not whish to repopulate the database for every build (to keep the existing user and other stored data), you can add the nodb profile to the build command like this:

mvn -P tomcat,nodb

The first mvn command has to be ran atleast once for initial build or if the local maven repository is emptyed for some reason. This is due to a bug in Maven 2 dependency resolution for plugins.

If everything wen smoothly, you should have now a working copy of KP-Lab portal.

Common reason for errors might be that maven cannot access the internet. Internet access is required because it uses online repositories to download the needed building components.

Step 4:

If you got this far, the only thing left is to start Tomcat and open a browser and navigate to http://localhost:8080/jetspeed and play around. You can register new user or use pre-installed admin user account admin/admin.

For more configuration options see the KP-Lab portal build configuration page.


Development DevelopmentJetspeed

Attachments

repository.zip Info on repository.zip 75239366 bytes
  Page Info My Prefs Log in
This page (revision-32) last changed on 18:24 25-Mar-2017 by Patrick Ausderau.
 

Referenced by
...nobody

JSPWiki v2.4.102
[RSS]