| 1 |
This file describes how to get the package up and running. |
|---|
| 2 |
|
|---|
| 3 |
Prerequisites: |
|---|
| 4 |
|
|---|
| 5 |
* A unixoid OS. Yes, java should be platform independent. |
|---|
| 6 |
Unfortunately portions of the build environment and code |
|---|
| 7 |
are unix specific. Although these platform independant |
|---|
| 8 |
portions mainly deal with file system path secifications - |
|---|
| 9 |
they exist. There may be even more places where the thing |
|---|
| 10 |
wouldn't work on win32. |
|---|
| 11 |
|
|---|
| 12 |
* A Java installation. Version 1.5 is recommended. |
|---|
| 13 |
The environment variable JAVA_HOME must be set to the |
|---|
| 14 |
root directory of your java installation. |
|---|
| 15 |
|
|---|
| 16 |
* Apache Ant, the Java-based build tool in version 1.5.4 or higher. |
|---|
| 17 |
If you have really large projects consider increasing the memory |
|---|
| 18 |
for the java vm ant runs in: To do this set the ANT_OPTS |
|---|
| 19 |
environment variable to something like "-mx200m". This variable |
|---|
| 20 |
is evaluated within the ant start script contained in the ant |
|---|
| 21 |
distribution. |
|---|
| 22 |
|
|---|
| 23 |
----------snip: not valid until jikes can really generate 1.5 code ----------- |
|---|
| 24 |
* jikes if you want to compile out-of-the-box. Compilation |
|---|
| 25 |
with javac is of course possible, just set the build.compiler |
|---|
| 26 |
property to modern if you want to compile with the javac of |
|---|
| 27 |
your java installation. But belive me, you really want to use |
|---|
| 28 |
jikes, it's just lightning fast compared to javac. |
|---|
| 29 |
----------snap---------------------------------------------------------------- |
|---|
| 30 |
|
|---|
| 31 |
* A working apache installation with a working mod_jk |
|---|
| 32 |
(the apache connection module for tomcat). You need |
|---|
| 33 |
to have this module loaded, but you need no further |
|---|
| 34 |
configuration, the build process will take care of providing |
|---|
| 35 |
you with a sample config file that should at least get you |
|---|
| 36 |
started. Additionally the apache installation must provide mod_rewrite |
|---|
| 37 |
(This should be pretty standard nowadays). |
|---|
| 38 |
|
|---|
| 39 |
Note that there have been problems with the order of |
|---|
| 40 |
inclusion of mod_rewrite and mod_jk in the |
|---|
| 41 |
httpd.conf. It seems that mod_jk needs to be loaded |
|---|
| 42 |
BEFORE mod_rewrite. If you experience problems, try changing |
|---|
| 43 |
the order of these two modules. Other problems that have |
|---|
| 44 |
been experienced are related to a changed regexp syntax |
|---|
| 45 |
between different versions of mod_rewrite. You may have to |
|---|
| 46 |
customize the relevant regexps in the file core/build/create_apacheconf.xsl. |
|---|
| 47 |
|
|---|
| 48 |
* Your apache needs to have enabled name-based virtual servers |
|---|
| 49 |
for the default hostname of your machine. Furthermore you |
|---|
| 50 |
should have a "* entry" for your machine in DNS (This means that |
|---|
| 51 |
a lookup to NAME.HOSTNAME.DOMAIN should resolve to HOSTNAME.DOMAIN no |
|---|
| 52 |
matter what NAME is). If you don't have DNS configured like this you can |
|---|
| 53 |
still supply the names (if you use the skelelton distribution) |
|---|
| 54 |
"cmsskel.HOSTNAME.DOMAIN" and "admskel.HOSTNAME.DOMAIN" |
|---|
| 55 |
or, in case you work with the cvs checkout |
|---|
| 56 |
"cmscore.HOSTNAME.DOMAIN" and "admcore.HOSTNAME.DOMAIN" |
|---|
| 57 |
via your /etc/hosts file. |
|---|
| 58 |
|
|---|
| 59 |
Note that you may be able to work around this last point by tweaking the |
|---|
| 60 |
created apache.conf or by tweaking the producing stylesheet |
|---|
| 61 |
core/build/create_apacheconf.xsl; this is not recommended, though. |
|---|
| 62 |
|
|---|
| 63 |
* NOTE: you don't need a external installation of tomcat, |
|---|
| 64 |
everything you need is contained in this package. I suggest |
|---|
| 65 |
that even if you have your own tomcat setup already, |
|---|
| 66 |
start by using the supplied versions, and, if all goes |
|---|
| 67 |
well, you can try to move the configuration into your own |
|---|
| 68 |
installation. |
|---|
| 69 |
|
|---|
| 70 |
* NOTE2: you don't need any additional jar files or classes besides |
|---|
| 71 |
what is supplied with your java installation and this package. |
|---|
| 72 |
|
|---|
| 73 |
1) Type "ant" to generate all neccesary files and compile all classes. |
|---|
| 74 |
|
|---|
| 75 |
2) You may want to type "ant generate" for pre-processing all the templates |
|---|
| 76 |
up-front. This speeds up the first hit of a page in the sample |
|---|
| 77 |
applications as the page doesn't need to be build from scratch then. |
|---|
| 78 |
|
|---|
| 79 |
3) Put something like the following |
|---|
| 80 |
|
|---|
| 81 |
NameVirtualHost HOSTNAME.DOMAIN:80 |
|---|
| 82 |
# uncomment if you want to use SSL |
|---|
| 83 |
# NameVirtualHost HOSTNAME.DOMAIN:443 |
|---|
| 84 |
|
|---|
| 85 |
# config for mod_jk |
|---|
| 86 |
include <your path to this directory>/projects/servletconf/tomcat/jk.conf |
|---|
| 87 |
|
|---|
| 88 |
# virtual hosts for tomcat: |
|---|
| 89 |
include <your path to this directory>/projects/servletconf/tomcat/apache.conf |
|---|
| 90 |
|
|---|
| 91 |
into your httpd.conf. Don't forget to restart apache. Modern apache installations often have a |
|---|
| 92 |
httpd.conf.d directory where to put links to config files that should be included automatically. |
|---|
| 93 |
In this case you can link the two files there instead of including them via your http.conf |
|---|
| 94 |
|
|---|
| 95 |
4) start Tomcat with the following command: |
|---|
| 96 |
|
|---|
| 97 |
./startTomcat.sh |
|---|
| 98 |
|
|---|
| 99 |
Note: For stopping Tomcat, just press Control-C to interrupt the script. |
|---|
| 100 |
|
|---|
| 101 |
Note: There have been problems with restarting or |
|---|
| 102 |
stopping/starting tomcat. Somtimes a restart of Apache is needed, |
|---|
| 103 |
too, so mod_jk can catch up and reopen the connections to |
|---|
| 104 |
Tomcat. (FIXME: Is this still the case? I have not experienced |
|---|
| 105 |
these problems for quite some time now) |
|---|
| 106 |
|
|---|
| 107 |
5) To see if everything works, you can try to open the editor |
|---|
| 108 |
application. Point your browser to |
|---|
| 109 |
|
|---|
| 110 |
http://cmsskel.HOSTNAME.DOMAIN |
|---|
| 111 |
|
|---|
| 112 |
6) You will find some basic applications in the example.tar.gz. |
|---|
| 113 |
Just unpack the file with "tar xvzf example.tar.gz" in your skel/projects |
|---|
| 114 |
directory and take a short look to the README_EXAMPLES.txt included in the |
|---|
| 115 |
tar afterwards. |
|---|
| 116 |
|
|---|
| 117 |
7) Creating your own pustefix project is really simple. If you're in |
|---|
| 118 |
the skel dir just type in "./newproject.sh" |
|---|
| 119 |
and follow the command-line |
|---|
| 120 |
instructions. |
|---|
| 121 |
Afterwards run ant, restart apache, restart tomcat and type in |
|---|
| 122 |
http://myprojectname.HOSTNAME.DOMAIN |
|---|
| 123 |
|
|---|
| 124 |
To see how it works you should take a short look in |
|---|
| 125 |
de.schlund.pfixcore.util.basicapp. |
|---|
| 126 |
If you start with InitNewPfixProject.java (in the package basics) it should |
|---|
| 127 |
be easy to understand the way to go |
|---|
| 128 |
|
|---|
| 129 |
Have Fun. |
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
FINAL NOTE: |
|---|
| 133 |
|
|---|
| 134 |
You could now start building your own applications, but unfortunately |
|---|
| 135 |
there is still not much documentation about how to achieve this. Therefore |
|---|
| 136 |
I suggest you refer to the mailing list (see pustefix.sf.net). |
|---|