Step 2 - Install and run in 5 minutes » History » Version 17
Udo Offermann, 11.09.2012 13:58
1 | 3 | Udo Offermann | h1. How to install z2 v2.1 |
---|---|---|---|
2 | 1 | Udo Offermann | |
3 | 17 | Udo Offermann | [[Step_1_-_What_is_z2|prev]] :: [[Z2_v21|home]] :: [[First_steps_with_z2_v21|next]] |
4 | 1 | Udo Offermann | |
5 | h2. Prerequisites |
||
6 | |||
7 | 15 | Udo Offermann | You need a properly setup JDK 6 on Linux, Mac OS X or Windows - that's all. |
8 | 1 | Udo Offermann | A halfway modern system will do. |
9 | |||
10 | 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. |
||
11 | |||
12 | h2. Creating a _home_ for z2 |
||
13 | |||
14 | 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. |
||
15 | |||
16 | Create a folder called z2-base inside your favorite/home/development/what-ever directory and enter it: |
||
17 | |||
18 | <pre> |
||
19 | 12 | Udo Offermann | :dev$ mkdir z2-base |
20 | :dev$ cd z2-base |
||
21 | 1 | Udo Offermann | </pre> |
22 | |||
23 | h2. Cloning the sources |
||
24 | |||
25 | As described in [[What_is_z2]] the z2-base project contains several repositories. |
||
26 | 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: |
27 | 1 | Udo Offermann | |
28 | <pre> |
||
29 | 13 | Udo Offermann | :z2-base$ git clone http://git.z2-environment.net/z2-base.core |
30 | Cloning into core... |
||
31 | 3 | Udo Offermann | |
32 | 13 | Udo Offermann | :z2-base$ cd z2-base.core |
33 | :z2-base.core$ git branch |
||
34 | * v2.1 |
||
35 | 1 | Udo Offermann | </pre> |
36 | |||
37 | 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 |
38 | 3 | Udo Offermann | if you have setup JDK 6 properly. |
39 | 1 | Udo Offermann | |
40 | h2. Start the z2-environment |
||
41 | |||
42 | 10 | Udo Offermann | The start scripts are located inside @run/bin@ and are called _go.sh_ on Unix based systems like Linux and Mac OS and _go.bat_ on Windows. There's also a gui-based version that we will discover later. |
43 | 1 | Udo Offermann | |
44 | <pre> |
||
45 | 13 | Udo Offermann | :z2-base.core$ cd run/bin |
46 | :bin$ ./go.sh & |
||
47 | 09/10 15:59:10 [1]...hers.HomeLauncher[800]: Z2 Home Launcher, (c) ZFabrik Software KG 2010, 2011, 2012 |
||
48 | 09/10 15:59:10 [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 |
||
49 | 09/10 15:59:10 [1]...ProcessRunnerImpl[800]: Using VM v1.6.0_35 by Apple Inc. at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home on Mac OS X (arch: 10.6.8) |
||
50 | 09/10 15:59:10 [1]...ProcessRunnerImpl[800]: ************************************ |
||
51 | 09/10 15:59:10 [1]...ProcessRunnerImpl[800]: *** Running in DEVELOPMENT mode! *** |
||
52 | 09/10 15:59:10 [1]...ProcessRunnerImpl[800]: ************************************ |
||
53 | 09/10 15:59:10 [1]...entRepositoryImpl[800]: Using GitCR com.zfabrik.boot.config/systemRepository (origin=http://git.z2-environment.net/z2-base.base, branch=v2.1) com.zfabrik.impl.gitcr.GitComponentRepositoryImpl@71b8b3bb,repo:246d0e3e, component:com.zfabrik.boot.config/systemRepository, prio:500, checkDepth:1073741823, fileSystem:com.zfabrik.components.provider.fs.FileSystemImpl@151ff451, root:/Users/udoo/dev/temp/z2-base-v2.1/z2-base.core/run/bin/../../work/repos/246d0e3e/git |
||
54 | 09/10 15:59:12 [1]...entRepositoryImpl[800]: Pulled deltas from GitCR com.zfabrik.boot.config/systemRepository (origin=http://git.z2-environment.net/z2-base.base, branch=v2.1) within 1684msec |
||
55 | ... |
||
56 | 09/10 15:59:12 [18]...ent/webWorker@0.1[800]: Listening for transport dt_socket at address: 5100 |
||
57 | ... |
||
58 | 09/10 15:59:13 [18]...ent/webWorker@0.1[800]: INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector@0.0.0.0:8080 |
||
59 | ... |
||
60 | 09/10 15:59:16 [1]...stemStateResource[800]: System state attained: com.zfabrik.boot.main/home_up |
||
61 | 09/10 15:59:16 [1]...hers.HomeLauncher[800]: Completed home process initialization |
||
62 | 3 | Udo Offermann | |
63 | 13 | Udo Offermann | press (q)uit, (c)omponents, (f)oundation props, (s)ystem props, s(y)nc repo, (v)erify, (g)c:> |
64 | 10 | Udo Offermann | |
65 | 3 | Udo Offermann | </pre> |
66 | 6 | Udo Offermann | |
67 | 16 | Udo Offermann | This means the z2-environment is up and running and excepting requests on localhost port 8080, just try it: http://localhost:8080/helloworld. |
68 | Actually this is enough to run the z2-environment as a productive site - of course one would combine this with a web server like Apache - however from a system installation point of view, this is all what you have to do! |
||
69 | 10 | Udo Offermann | |
70 | 16 | Udo Offermann | On the next page we will do some first development step with z2 in combination with the Eclipse IDE. It's quite handy to run the z2 server from inside Eclipse, so you should stop the running server now by pressing 'q'. |
71 | 1 | Udo Offermann | |
72 | 17 | Udo Offermann | [[Step_1_-_What_is_z2|prev]] :: [[Z2_v21|home]] :: [[First_steps_with_z2_v21|next]] |