| 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 |
require a unix-like shell. Running Pustefix on Windows might |
|---|
| 8 |
work using Cygwin, but we haven not tried yet. If you succeed |
|---|
| 9 |
in running Pustefix on Windows, we would like to hear. |
|---|
| 10 |
|
|---|
| 11 |
* A Java installation. Version 1.5 is required and version 1.6 |
|---|
| 12 |
is recommended. The environment variable JAVA_HOME must be |
|---|
| 13 |
set to the root directory of your java installation. |
|---|
| 14 |
|
|---|
| 15 |
* Apache Ant, the Java-based build tool in version 1.7.0 or higher. |
|---|
| 16 |
If you have really large projects consider increasing the memory |
|---|
| 17 |
for the java vm ant runs in: To do this set the ANT_OPTS |
|---|
| 18 |
environment variable to something like "-mx200m". This variable |
|---|
| 19 |
is evaluated within the ant start script contained in the ant |
|---|
| 20 |
distribution. |
|---|
| 21 |
|
|---|
| 22 |
* If you want to use Pustefix with the Apache HTTP daemon, either |
|---|
| 23 |
mod_proxy_ajp or mod_jk have to be installed and loaded. |
|---|
| 24 |
However, you can simply run Pustefix without Apache by setting |
|---|
| 25 |
the standalone.tomcat property to true when running "ant". |
|---|
| 26 |
Tomcat will listen for incoming HTTP connections on port 8080 |
|---|
| 27 |
and for HTTPS connections on port 8443. |
|---|
| 28 |
|
|---|
| 29 |
If you are using Apache, name-based virtual servers have to be |
|---|
| 30 |
enabled for the default address of your machine. |
|---|
| 31 |
|
|---|
| 32 |
Note that there have been problems with the order of |
|---|
| 33 |
inclusion of mod_rewrite and mod_jk in the Apache configuration |
|---|
| 34 |
file. It seems that mod_jk needs to be loaded |
|---|
| 35 |
BEFORE mod_rewrite. If you experience problems, try changing |
|---|
| 36 |
the order of these two modules. Other problems that have |
|---|
| 37 |
been experienced are related to a changed regexp syntax |
|---|
| 38 |
between different versions of mod_rewrite. You may have to |
|---|
| 39 |
customize the relevant regexps in the file core/build/create_apacheconf.xsl. |
|---|
| 40 |
|
|---|
| 41 |
* You should have a "* entry" for your machine in DNS (This means that |
|---|
| 42 |
a lookup to NAME.HOSTNAME.DOMAIN should resolve to HOSTNAME.DOMAIN no |
|---|
| 43 |
matter what NAME is). If you don't have DNS configured like this you can |
|---|
| 44 |
still supply the names (e.g. "cms.HOSTNAME.DOMAIN" or |
|---|
| 45 |
"sample1.HOSTNAME.DOMAIN") via your /etc/hosts file. |
|---|
| 46 |
|
|---|
| 47 |
* NOTE: you don't need a external installation of Tomcat, |
|---|
| 48 |
everything you need is contained in this package. We suggest |
|---|
| 49 |
that even if you have your own Tomcat setup already, |
|---|
| 50 |
start by using the supplied versions, and, if all goes |
|---|
| 51 |
well, you can try to move the configuration into your own |
|---|
| 52 |
installation. |
|---|
| 53 |
|
|---|
| 54 |
* NOTE2: you don't need any additional jar files or classes besides |
|---|
| 55 |
what is supplied with your java installation and this package. |
|---|
| 56 |
|
|---|
| 57 |
1) Type "ant" to generate all neccesary files and compile all classes. |
|---|
| 58 |
|
|---|
| 59 |
2) You may want to type "ant generate" for pre-processing all the templates |
|---|
| 60 |
up-front. This speeds up the first hit of a page in the sample |
|---|
| 61 |
applications as the page doesn't need to be build from scratch then. |
|---|
| 62 |
|
|---|
| 63 |
3) Put something like the following |
|---|
| 64 |
|
|---|
| 65 |
NameVirtualHost HOSTNAME.DOMAIN:80 |
|---|
| 66 |
# uncomment if you want to use SSL |
|---|
| 67 |
# NameVirtualHost HOSTNAME.DOMAIN:443 |
|---|
| 68 |
|
|---|
| 69 |
# config for mod_jk |
|---|
| 70 |
Include <your path to this directory>/projects/servletconf/tomcat/jk.conf |
|---|
| 71 |
|
|---|
| 72 |
# virtual hosts: |
|---|
| 73 |
Include <your path to this directory>/projects/servletconf/tomcat/apache.conf |
|---|
| 74 |
|
|---|
| 75 |
into your Apache configuration. Don't forget to restart apache. |
|---|
| 76 |
Modern apache installations often have a httpd.conf.d directory where |
|---|
| 77 |
to put links to config files that should be included automatically. |
|---|
| 78 |
In this case you can link the two files there instead of including them |
|---|
| 79 |
via your http.conf |
|---|
| 80 |
|
|---|
| 81 |
4) Start Tomcat with the following command: |
|---|
| 82 |
|
|---|
| 83 |
./startTomcat.sh |
|---|
| 84 |
|
|---|
| 85 |
Note: For stopping Tomcat, just press Control-C to interrupt the script. |
|---|
| 86 |
|
|---|
| 87 |
5) To see if everything works, you can try to open the editor |
|---|
| 88 |
application. Point your browser to |
|---|
| 89 |
|
|---|
| 90 |
http://cms.HOSTNAME.DOMAIN |
|---|
| 91 |
|
|---|
| 92 |
6) You will find some basic applications in the example.tar.gz. |
|---|
| 93 |
Just unpack the file with "tar xvzf example.tar.gz" in your skel/projects |
|---|
| 94 |
directory and take a short look to the README_EXAMPLES.txt included in the |
|---|
| 95 |
tar afterwards. |
|---|
| 96 |
|
|---|
| 97 |
7) Creating your own pustefix project is really simple. If you're in |
|---|
| 98 |
the skel dir just type in "./newproject.sh" |
|---|
| 99 |
and follow the command-line |
|---|
| 100 |
instructions. |
|---|
| 101 |
Afterwards run ant, restart apache, restart tomcat and type in |
|---|
| 102 |
http://myprojectname.HOSTNAME.DOMAIN |
|---|
| 103 |
|
|---|
| 104 |
To see how it works you should take a short look in |
|---|
| 105 |
de.schlund.pfixcore.util.basicapp. |
|---|
| 106 |
If you start with InitNewPfixProject.java (in the package basics) it should |
|---|
| 107 |
be easy to understand the way to go |
|---|
| 108 |
|
|---|
| 109 |
Have Fun. |
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
FINAL NOTE: |
|---|
| 113 |
|
|---|
| 114 |
You can now start building your own applications. Some tutorials as well as the |
|---|
| 115 |
reference documentation can be found on http://www.pustefix-framework.org/. |
|---|