Skip to content

Commit

Permalink
git-svn-id: svn://cherokee-project.com/cherokee/trunk@2590 5dc97367-9…
Browse files Browse the repository at this point in the history
…7f1-0310-9951-d761b3857238
  • Loading branch information
taher committed Dec 11, 2008
1 parent 257e4ca commit efd5f53
Show file tree
Hide file tree
Showing 20 changed files with 403 additions and 9 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2008-12-11 Taher Shihadeh <taher@unixwars.com>
* doc/cookbook_moodle.txt, doc/cookbook_liferay.txt,
doc/cookbook_alfresco.txt, doc/modules_handlers_dbslayer.txt,
doc/other_community.txt,
doc/media/images/cookbook_(moodle|alfresco|liferay).*: some additions.

2008-12-10 Antonio Perez <aperez@skarcha.com>

* cherokee/cryptor_libssl.c: Fixes problem where OpenSSL expected
Expand Down
16 changes: 15 additions & 1 deletion doc/Makefile.am
Expand Up @@ -58,6 +58,9 @@ cookbook_zend.html \
cookbook_kumbia.html \
cookbook_nagios.html \
cookbook_symfony.html \
cookbook_moodle.html \
cookbook_alfresco.html \
cookbook_liferay.html \
modules.html \
modules_balancers.html \
modules_balancers_round_robin.html \
Expand Down Expand Up @@ -196,11 +199,22 @@ media/images/cookbook_nagios2.png \
media/images/cookbook_nagios3.png \
media/images/cookbook_nagios4.png \
media/images/cookbook_symfony.png \
media/images/cookbook_moodle_db.png \
media/images/cookbook_moodle_document_root.png \
media/images/cookbook_moodle_modules.png \
media/images/cookbook_moodle_paths.png \
media/images/cookbook_moodle.png \
media/images/cookbook_alfresco_alfresco.png \
media/images/cookbook_alfresco_assistant.png \
media/images/cookbook_alfresco_install.png \
media/images/cookbook_alfresco_path.png \
media/images/cookbook_alfresco_share.png \
media/images/cookbook_alfresco_soffice.png \
media/images/cookbook_liferay.png \
media/images/proxy_phase1.png \
media/images/proxy_phase2.png \
media/images/tracelor.png


EXTRA_DIST = \
$(doc_DATA) \
$(docmediacss_DATA) \
Expand Down
154 changes: 154 additions & 0 deletions doc/cookbook_alfresco.txt
@@ -0,0 +1,154 @@
== link:index.html[Index] -> link:cookbook.html[Cookbook]

Cookbook: Setting up Alfresco
-----------------------------

For this recipe we will be using
link:http://wiki.alfresco.com/wiki/Download_Alfresco_Community_Network[Alfresco
Labs 3c], the community supported release.

You can use the full blown installer or simply download the _WAR file
only_ version. We will be using the former method, but you could
choose the latter and just deploy the application in your favorite
application server. For this you could refer to the
link:cookbook_glassfish.html[Glassfish] recipe and the rest of this
document would be of no more concern to you.

Before we proceed with the installation of Alfresco Lab 3c on Linux,
you must know that it uses JDK 1.5+, MySQL and Tomcat as application
server.

We will be installing the package and then setting up Cherokee as a
reverse proxy to access this Enterprse Content Managment solution.

[[alfresco]]
Phase one: Alfresco
~~~~~~~~~~~~~~~~~~~

Once you've downloaded the full installer, the process is as simple as
running it and follow the easy step by step assistant.

image::media/images/cookbook_alfresco_assistant.png[Install wizard]


If you choose to run it as root, it will be installed in
`/opt/Alfresco` by default and will be available system-wide. If not,
your home directory will be chosen.

image::media/images/cookbook_alfresco_path.png[Path prompt]

The process is fairly straight forward.

image::media/images/cookbook_alfresco_install.png[Install process]

When you are asked for an OpenOffice location, you can select the
Alfresco directory if you don'w want to use it for Office document
conversions. If you can't seem to find a path that lets the installer
proceed, it could be that the installer is trying to look for the file
`soffice.exe`. There is information about this problem in their
link:http://wiki.alfresco.com[wiki], but you could try copying or
making a symbolic link to `/usr/bin/soffice` while the installer gets
fixed. We will simply be ignoring this step.

image::media/images/cookbook_alfresco_soffice.png[Open Office]

This should do for now. Now you have to launch Alfresco.

----
# /opt/Alfresco/alfresco.sh start
----

If you experience problems or notice a wrong JRE path, you should edit
the script and modify the `JRE_HOME` variable to whatever Java version
you have on your system.

For instance, it could show:

----
Using JRE_HOME: /usr
----

By simply looking to your files you could find out the correct version
you have in your system.

----
# ls -l /usr/lib/jvm
total 8
lrwxrwxrwx 1 root root 14 2008-11-12 11:13 default-java -> java-6-openjdk
drwxr-xr-x 7 root root 4096 2008-11-12 11:13 java-6-openjdk
lrwxrwxrwx 1 root root 19 2008-11-19 01:25 java-6-sun -> java-6-sun-1.6.0.10
drwxr-xr-x 6 root root 4096 2008-11-19 01:25 java-6-sun-1.6.0.10
----

In this case, we would be setting JRE_HOME to `/usr/lib/jvm/java-6-sun-1.6.0.10`

After giving the script some seconds to launch the application server,
you can now access Alfresco by visiting
link:http://localhost:8080/share[http://localhost:8080/share]

.Initial access information

`~~~~~~~`~~~~~~
Field , Value
~~~~~~~~~~~~~~~
user , admin
password, admin
~~~~~~~~~~~~~~~

.Accessing Alfresco
image::media/images/cookbook_alfresco_share.png[Share]

.Accessing Alfresco
image::media/images/cookbook_alfresco_alfresco.png[Alfresco]


[[Cherokee]]
Phase two: Cherokee
~~~~~~~~~~~~~~~~~~~

Now to set up Cherokee as reverse proxy. You can either create a new
virtual server with a matching rule (be it `default` or anything else)
if you are sharing the proxy machine, or dedicate another machine
to the Proxy Handler. This will be our choice, since typically you
will be wanting to get the best possible performance, the Java
application server is heavy by definition, and you could be using the
proxy machine also to serve other contents. We are only going to set
Cherokee's HTTP reverse proxy handler to hit the server running
Alfresco at port 8080.

Launch Cherokee-Admin on your proxy machine, create a rule that
matches the desired path on your web server hierarchy -`/share` for
instance- in your virtual server of choice, and define the `HTTP
reverse proxy` handler from within the `Handler` tab.

Remeber to configure an URL rewriting rule in the handler's
configuration. Alfresco's application server doesn't provide content
directly in the document root, so we'll have to add the required
subnode.

`~~~~~~~~~~~~~~~~~~~~~~~`~~~~~~~~~~~~~~~
Regular Expression, Substitution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
, /share/$1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You will need to assign it an information source you define for the
server running Alfresco. We will assume the IP is `192.168.1.100` in
your firewalled local network, and your reverse proxy is accessible as
`http://example.com/`

This information source is to be defined as external sources, like
the following example:

`~~~~~~~~~~~`~~~~~~~~~~~~`~~~~~~~~~~~~~~~~~~~
Type , Nick , Connection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remote host , liferay , 192.168.1.100:8080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Refer to the link:modules_handlers_proxy.html[HTTP reverse proxy]
documentation if you need any further help with this.

Once you launch Cherokee and access `http://example.com/share`, you
should be presented with the login screen from before, since you will
be receiving whatever is at `http://192.168.1.100:8080/share`.
104 changes: 104 additions & 0 deletions doc/cookbook_liferay.txt
@@ -0,0 +1,104 @@
== link:index.html[Index] -> link:cookbook.html[Cookbook]

Cookbook: Setting up Liferay
----------------------------

For this recipe we will be using
link:http://www.liferay.com/web/guest/downloads/portal[Liferay Portal
5.1.2 Standard Edition].

You can use the standard package which is shipped with Tomcat as
application server, or simply download one of the others. There is a
link:http://downloads.sourceforge.net/lportal/liferay-portal-glassfish-linux-5.1.1.jar[Glassfish
version] availabe. We will be using the former method, but you could
choose the latter and just deploy the application in your favorite
application server. If you chose the Glassfish release, you could
refer to the link:cookbook_glassfish.html[Glassfish] recipe and the
rest of this document would be of no more concern to you.

Before we proceed with the installation on Linux, you will need to
make sure to have JDK 1.5 or later installed.

We will be installing the package and then setting up Cherokee as a
reverse proxy to access this Enterprse Portal.

[[liferay]]
Phase one: Liferay
~~~~~~~~~~~~~~~~~~

This part is trivial. As the
link:http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Quick+Installation+Instructions[Quick
installation notes] say, you just have to uncompress the package and
launch the startup script.

So, uncompress to `/opt/liferay`, launch `/opt/liferay/bin/startup.sh`
and you are done with this part.

It could give an error because it can't find the Java environment.

Simply set the environment variable and try again.

----
export JAVA_HOME=/usr/lib/jvm/java-6-sun
/opt/liferay/bin/startup.sh
----

This path is set to the symbolic link present in `/usr/lib/jvm`. Yours
could vary, so take a look there. As stated before, you do need Java
1.5 or higher.

Once you have launched it, you can already acces the application
server directly at link:http://localhost:8080[http://localhost:8080]

.Initial access information

`~~~~~~~`~~~~~~~~~~~~~~~~~
Field , Value
~~~~~~~~~~~~~~~~~~~~~~~~~~
user , test@liferay.com
password, test
~~~~~~~~~~~~~~~~~~~~~~~~~~~

.Accessing Liferay
image::media/images/cookbook_liferay.png[Liferay]


[[Cherokee]]
Phase two: Cherokee
~~~~~~~~~~~~~~~~~~~

Now to set up Cherokee as reverse proxy. You can either create a new
virtual server with a matching rule (be it `default` or anything else)
if you are sharing the proxy machine, or dedicate another machine
to the Proxy Handler. This will be our choice, since typically you
will be wanting to get the best possible performance, the Java
application server is heavy by definition, and you could be using the
proxy machine also to serve other contents. We are only going to set
Cherokee's HTTP reverse proxy handler to hit the server running
Lifreay at port 8080.

Launch Cherokee-Admin on your proxy machine, create a rule that
matches the desired path on your web server hierarchy -`/liferay` for
instance- in your virtual server of choice, and define the `HTTP
reverse proxy` handler from within the `Handler` tab.

You will need to assign it an information source you define for the
server running Liferay. We will assume the IP is `192.168.1.100` in
your firewalled local network, and your reverse proxy is accessible as
`http://example.com/`

This information source is to be defined as external sources, like
the following example:

`~~~~~~~~~~~`~~~~~~~~~~~~`~~~~~~~~~~~~~~~~~~~
Type , Nick , Connection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remote host , liferay , 192.168.1.100:8080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Refer to the link:modules_handlers_proxy.html[HTTP reverse proxy]
documentation if you need any further help with this.

Once you launch Cherokee and access `http://example.com/liferay`, you
should be presented with the login screen from before, since you will
be receiving whatever is at `http://192.168.1.100:8080/`.

0 comments on commit efd5f53

Please sign in to comment.