This Getting Started track is for experienced Cocoon Users, who would like to see how the parts that make up a Hippo CMS site all work together. You will be taken through downloading and installing the Hippo Repository, the Hippo CMS and a sample site, into a standard Cocoon distribution.
Introduction
The hippo-cms-site-sample ZIP contains a very basic example of a website presenting documents edited and managed using Hippo CMS. It is intended to run under a standard Apache Cocoon installation (latest stable version of Cocoon at the time of writing is 2.1.8). You should also have at least Hippo Repository running, and preferably also Hippo CMS so you can create and edit some documents.
Installation
A full Hippo installation comes in three components, the Hippo Repository, where your content is kept, the Hippo CMS which you use to edit that content and your site that publishes the content. These components communicate using WebDAV and JMS.
Installing Hippo Repository Binary
How to download, install and run the Hippo Repository, so you can serve content to a Hippo CMS or your own Hippo Site.
Hippo Repository
- Download the latest build from http://repository.hippocms.org/hippo-repository/v1.2.x/
- Unzip the build into a folder on your harddisk, for example ~/hippo/hippo-repository-1.2.x

Warning
Windows Explorer's built-in "compressed folder" functionality is reported to incorrectly unzip the Hippo Repository binary distribution. Windows users are adviced to use a third-party ZIP utility, e.g. 7-Zip. - Then you need to change directory to where the startup scripts are, if this is your first run, make them executable, then run them. In a new console, type:
cd ~/hippo/hippo-repository-[version]/bin chmod u+x fortress.sh wrapper.bin libwrapper.so ./fortress.sh start
NB. Windows Users, Linux Users, MacOSX Users.
Now you can see if it is working
- Open a webbrowser and navigate to http://localhost:60000/default
- You should get a popup asking for a username and password
- Enter the username "root" and password "password"
- Congratulations, your Hippo Repository is running!
Installing Hippo CMS Binary
How to download, install and run Hippo CMS so you can edit the content of a Hippo Repository.
Hippo CMS
- Download the latest build from http://repository.hippocms.org/hippo-cms/v6.x/
- Unzip the build into a folder on your harddisk, for example ~/hippo/hippo-cms-v6.01.00

Warning
Windows Explorer's built-in "compressed folder" functionality is reported to incorrectly unzip the Hippo CMS binary distribution. Windows users are adviced to use a third-party ZIP utility, e.g. 7-Zip. - Then you need to change directory to where the startup scripts are; if this is your first run, make them executable, then run them. In a new console, type:
cd ~hippo/hippo-cms-v6.01.00/bin chmod u+x fortress.sh wrapper.bin libwrapper.so ./fortress.sh start
NB. Windows Users, Linux Users, MacOSX Users.
Now you can see if it is working
- Open a webbrowser (only IE and Firefox are currently supported) and navigate to http://localhost:50000/
- You should see the login window
- Enter the username "root" and password "password"
- Congratulations, your Hippo CMS is running!
Changing the Hippo CMS hostname
Great! But what about this localhost thing? I want other developers to connect to my CMS and repository, but where do I start?
Well it's not that hard. You will have to change 2 files within the Hippo CMS folder:
- sites.xconf - hold the host configuration for the current CMS (located in the cocoon/WEB-INF/ folder)
- localdevDomains.xml - The localdevDomains.xml is used by the Hippo CMS workflow (located in the cocoon/WEB-INF/configuration/projects/localdev/ folder)
sites.xconf
Your sites.xconf should look something like this:
<sites version="1.0"> <site name="hippo-cms"> <domain>localhost</domain> <directory>../sites/hippo-cms/</directory> <repository>default</repository> <model>context://types/types.xml</model> <workflow>default</workflow> <httpstate>session-attr:httpstate</httpstate> </site> </sites>
As you might have noticed the domain is set to 'localhost'. Change this to the hostname you had in mind and your done with the sites.xconf.
localdevDomains.xml
Your localdevDomains.xml should look something like this:
<beans> <bean id="projectDomains" class="java.util.HashSet"> <constructor-arg index="0" type="java.util.Collection"> <list> <value>localhost</value> </list> </constructor-arg> </bean> </beans>
Again the value is set to 'localhost'. Change it to the same url used in the sites.xconf.
Well that's it. There is only one more thing to do and that is restarting the CMS. Afterwards you will be able to reach Hippo CMS on http://yoururl:50000/.
In the future you might want to build the CMS from source. The 'localhost' value will then be a single build property. (for more information see: http://www.hippocms.org/display/CMS/Hippo+CMS+Developers)
Installing Cocoon from Source
How to get a version of Cocoon in which you can run your own Hippo Site projects.
You can download Apache Cocoon here http://cocoon.apache.org/mirror.cgi.
|
You may already have a working Cocoon installation built, however you should first check for the blocks that Cocoon requires to run the samples and make sure you have them in your build. |
Linux and MacOSX
- Unzip the distribution into a folder on your harddisk, for example ~/hippo/cocoon-2.1.8
- In a new console, type:
cd \~/hippo/cocoon-2.1.8 ./build.sh
Windows
- Unzip the distribution into a folder on your harddisk, for example C:\Documents and Settings\username\hippo\cocoon-2.1.8 (where username is your user name on the system)
- Launch the Command Prompt (Start > Run > cmd) and type:
cd C:\Documents and Settings\username\hippo\cocoon-2.1.8 build
Required Blocks
Typically running a Hippo Site that will publish from a Hippo Repository requires that the following blocks are enabled before Cocoon is compiled :
- databases
- eventcache
- jms
- repository
- webdav
The Simple Site Sample
A very basic sample Hippo Site, designed to show you how the various parts work together.
The Sample Site
- Download the latest sample version (18/01/07 it is v1.02.01) from Hippo CMS sample website ZIP file, and unpack it into a directory of your choice.
- Use cocoon-2.1.10 or newer. The Simple Site Sample older Cocoon versions
- In sitemap.xmap of the sample website, set the global variables "previewRepository" and "liveRepository" to the correct URLs in your setup. For example, if your repository runs on "http://localhost:60000/default" (which is the default), set the global variables as follows:
<map:component-configurations> <global-variables> <repositoryRoot>webdav://siteuser:siteuser@localhost:60000/default/</repositoryRoot> <previewPath>files/default.preview/</previewPath> <livePath>files/default.www/</livePath> </global-variables> </map:component-configurations>
- In the Cocoon directory, rename mount-table.xml.sample to mount-table.xml and add the following line within the <mount-table> element:
<mount uri-prefix="hippo-sample/" src="LOCATION"/>where LOCATION must be replaced by the exact location of the Hippo CMS sample site files.
- Start Cocoon in that console by typing:
- ./cocoon.sh servlet
- Open http://localhost:8888/hippo-sample/ in your browser.
Usage
In the "http://localhost:8888/hippo-sample/" url you will find an almost empty page containing just two links: "preview" and "live". Clicking on one of these links will lead you to either to preview website, which shows all documents in the CMS, or the live site, which shows only the published documents.
How does it work?
Preview and live
The only real difference between the preview and live websites is the repository they retrieve their content from. The preview website uses the same repository as the CMS. Every change you make to a document in the CMS will be immediately visible on the preview website. The live website on the other hand, uses the repository to which document are published. Documents in the CMS will only be visible on the live website after they have been published.
DASL query
The pipeline "*/documents" retrieves a list of available documents in the CMS folder "documents" from the repository by doing a DASL query (using the DASLTransformer). The result is transformed into the navigation menu on the left side of the XHTML pages in the site. The DASL syntax is described in Using DASL Queries.
Further Reading
Configuration Properties Reference
Input Module Reference
Source Reference
DASL Reference
Hippo Cocoon Plugin Reference
HippoJXTemplate Reference
You may also find The Site Skeleton useful.