Project

General

Profile

Step 2 - Install and run in 5 minutes » History » Version 4

Udo Offermann, 07.09.2012 15:19

1 3 Udo Offermann
h1. How to install z2 v2.1
2 1 Udo Offermann
3 3 Udo Offermann
[[What_is_z2|prev]] :: [[Wiki|home]] :: [[First_steps_with_z2_v21|next]]
4 1 Udo Offermann
5
h2. How to install z2-environment
6
7
Installation of the z2-environment is very easy. We tested the installation on Linux, Mac OS X and Windows Vista.
8
9
h2. Prerequisites
10
11
You need a properly setup JDK 6 - that's all. 
12
A halfway modern system will do. 
13
14
It is benefical to use the Eclipse IDE (Ganymed, Helios or Indigo work all fine). There's a small Eclipse plugin called "Eclipsoid" which makes it easier to develop z2 applications within Eclipse (see [[First steps with z2]] for more details). However you can use any IDE (including vi and notepad) together with z2.
15
16
h2. Creating a _home_ for z2
17
18
This is a best practice approach (and other approaches are possible). We recommend to keep the repositories and the IDE workspace close together. This way we don't need to adjust the path settings in the z2 configuration files and they can remain relative paths.
19
20
Create a folder called z2-base inside your favorite/home/development/what-ever directory and enter it:
21
22
<pre>
23 3 Udo Offermann
    :dev$ mkdir z2-base
24
    :dev$ cd z2-base
25 1 Udo Offermann
</pre>
26
27
h2. Cloning the sources
28
29
As described in [[What_is_z2]] the z2-base project contains several repositories. 
30 3 Udo Offermann
You always start with the _core_ repository. Create a clone from git.z2-environment.net which will checkout the "v2.1" branch automatically:
31 1 Udo Offermann
32
<pre>
33 3 Udo Offermann
    :z2-base$ git clone http://git.z2-environment.net/z2-base.core
34 1 Udo Offermann
    Cloning into core...
35 3 Udo Offermann
36
    :z2-base$ cd z2-base.core
37
    :z2-base.core$ git branch
38
    * v2.1
39 1 Udo Offermann
</pre>
40
41 4 Udo Offermann
That's all you need to do in order to install the z2-environment and you can start the server right away
42 3 Udo Offermann
if you have setup JDK 6 properly.
43 1 Udo Offermann
44
h2. Start the z2-environment
45
46 3 Udo Offermann
The start scripts are located inside @run/bin@. On a desktop you can use the gui version called @gui.sh@ (resp. @gui.bat@ on Windows). 
47
Otherwise you can use the terminal based version @go.sh@ (resp. @go.bat@ on Windows).
48 1 Udo Offermann
49 3 Udo Offermann
<pre>
50
    :z2-base.core$ cd run/bin
51
    :z2-base.core$ ./gui.sh
52 1 Udo Offermann
53 3 Udo Offermann
    Listening for transport dt_socket at address: 5000
54
    09/07 15:10:24 [1]...hers.HomeLauncher[800]: Z2 Home Launcher, (c) ZFabrik Software KG 2010, 2011, 2012 
55
    09/07 15:10:24 [1]...ProcessRunnerImpl[800]: Running core build 201208241554 as udoo in z2 home /Users/udoo/dev/temp/z2-base-v2.1/z2-base.core/run/bin/../.., timezone Europe/Berlin, language de, region null
56
    09/07 15:10:24 [1]...ProcessRunnerImpl[800]: Using VM v1.6.0_33 by Apple Inc. at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home on Mac OS X (arch: 10.6.8)
57
    09/07 15:10:24 [1]...ProcessRunnerImpl[800]: ************************************
58
    09/07 15:10:24 [1]...ProcessRunnerImpl[800]: *** Running in DEVELOPMENT mode! ***
59
    09/07 15:10:24 [1]...ProcessRunnerImpl[800]: ************************************
60
    09/07 15:10:24 [1]...entRepositoryImpl[800]: Using GitCR com.zfabrik.boot.config/systemRepository (origin=http://git.z2-environment.net/z2-base.base, branch=master)    com.zfabrik.impl.gitcr.GitComponentRepositoryImpl@75787005,repo:246d0e3e, component:com.zfabrik.boot.config/systemRepository, prio:500, checkDepth:1073741823, fileSystem:com.zfabrik.components.provider.fs.FileSystemImpl@36029483, root:/Users/udoo/dev/temp/z2-base-v2.1/z2-base.core/run/bin/../../work/repos/246d0e3e/git
61
    09/07 15:10:24 [1]...entRepositoryImpl[800]: Cloning GitCR com.zfabrik.boot.config/systemRepository (origin=http://git.z2-environment.net/z2-base.base, branch=master) . This will take some seconds...
62 1 Udo Offermann
    ...
63 3 Udo Offermann
    09/07 15:10:58 [30]...ent/webWorker@0.1[800]: Listening for transport dt_socket at address: 5100
64 1 Udo Offermann
    ...
65 3 Udo Offermann
    09/07 15:11:02 [30]...ent/webWorker@0.1[800]: INFO  org.eclipse.jetty.server.AbstractConnector  - Started SelectChannelConnector@0.0.0.0:8080
66
    ...
67
    09/07 15:11:09 [1]...stemStateResource[800]: System state attained: com.zfabrik.boot.main/home_up
68
    09/07 15:11:09 [1]...hers.HomeLauncher[800]: Completed home process initialization
69 1 Udo Offermann
</pre>
70 4 Udo Offermann
This means the z2-environment is up and running and excepting requests on localhost port 8080. 
71
Open your favorite browser and run the URL http://localhost:8080/helloworld
72 1 Udo Offermann
73 3 Udo Offermann
[[What_is_z2|prev]] :: [[Wiki|home]] :: [[First_steps_with_z2_v21|next]]