Installation

Weceem is available either as a standalone Java web application (.war file) for deployment to standard Java server environments, or as a plugin for the Grails application framework

Requirements

Deploying Weceem CMS requires:

You don't need to install or have any understanding of Grails to use Weceem, but if you want to develop a custom application that uses Weceem, you will also need to install Grails.

Upgrading all Weceem installations

Before installing a new version of Weceem you must always Export each of your spaces to ensure you have a backup. In addition you should make sure that your database and uploaded files (e.g. WeceemFiles/) folder are backed up.

Installing Standalone Weceem applications

To install standalone Weceem you need to:

  1. Follow the normal procedures to put the WAR file into your Java Servlet Container 
  2. Make the search index folder writable by the servlet container's user
  3. Tell Weceem were to find your configuration

There are several configuration options, the most important of which are used to tell Weceem where to find your SQL database. To pass configuration to the Weceem application you create a properties file - and place it on the classpath or pass a variable to the Java VM to tell Weceem where to find your properties file.

Typical weceem properties file:

# Control whether or not connection pooling is enabled
dataSource.pooled=true

# Set the JDBC driver class name - class must be on classpath
dataSource.driverClassName=com.mysql.jdbc.Driver
# The user name for the SQL database
dataSource.username=weceem
# The password for the SQL database
dataSource.password=weceem
# The database update mode. Leave as "update"
dataSource.dbCreate=update
# The JDBC URL of your database
dataSource.url=jdbc:mysql://localhost:3306/weceem

# OR you can specify a JNDI data source with just this line, and nothing else
# but you must have configured the JNDI database resource in your servlet container/
#dataSource.jndiName=java:comp/env/jdbc/WeceemDS

# The path to use for storing search index files - MUST be writable
searchable.index.path=/var/weceem/search-indexes

These are actually Grails configuration properties use to configure the Grails DataSource and the Searchable plugin used to index your content for search.

Weceem will try to find a file called "weceem.properties" on the classpath, but you can point it at a specific location by passing a URL as the weceem.config.location system property with an argument to your container/VM like:

-Dweceem.config.location=file:/etc/weceem/ourconfig.properties

NOTE: You should also set the file upload directory to store uploaded files in a folder on your server that is not going to be deleted when you upgrade your web application. See Configuration Options.

Upgrading note

With releases prior to 1.0, if you deploy to a new application folder you must copy the WeceemFiles/ folder to your new installation, to copy across uploaded files - because they are stored inside your expanded WAR application. If you use the Export and Import mechanism this should not be necessary.

However by setting the correct upload path in your configuration, you can store the uploaded files outside of the web-application folder and so avoid this process in future.

Installing Weceem Plugin into your own application

Installing Weceem into an application is simple - run grails install-plugin weceem. Grails version 1.3.1 or higher is recommended for release 0.9 onwards. Weceem plugin should function with Grails 1.2.2 and higher, but is not been extensively tested on that older release line. 

Once the plugin is installed into your application, you will must to set a few Grails configuration properties to make your application function correctly. Please see the Developer Guide section on configuration options - in particular the Grails content negotiation settings and the Weceem default space names which must be configured.

Upgrading note

When upgrading from an earlier version of the Weceem plugin in your application, you may need to manually uninstall some older Grails plugins if Weceem requires a new version of them if your release of Grails does not do this automatically for you.

 

Upgrading from Version 0.8 to 0.9-1.0

There are important changes to the SQL tables and configuration options.

Due to changes in the names of all SQL tables used by Weceem to avoid clashes with other systems and reserved names in databases, Weceem 0.9 will not see your existing space data! This will cause it to delete some or all of your existing uploaded files when it creates the first default space again.

So before you run Weceem 0.9 using data from 0.8 you must migrate or "export and import".

Migrating (preferred)

Run this SQL migration script: migrate your existing data and the upgrade should go smoothly without need to Export & Import:

-- IF you already ran weceem and it didn't find your old space...
DROP TABLE wcm_content; -- Add CASCADE for postgres
DROP TABLE wcm_space;
DROP TABLE wcm_status;
DROP TABLE wcm_content_version;
DROP TABLE wcm_related_content;

-- Do the table renames and migrate class names
ALTER TABLE content RENAME TO wcm_content;
ALTER TABLE status RENAME TO wcm_status;
ALTER TABLE space RENAME TO wcm_space;
ALTER TABLE content_version RENAME TO wcm_content_version;
ALTER TABLE related_content RENAME TO wcm_related_content;

UPDATE wcm_content SET class = 'org.weceem.blog.WcmBlog' WHERE class = 'org.weceem.blog.Blog';
UPDATE wcm_content SET class = 'org.weceem.blog.WcmBlogEntry' WHERE class = 'org.weceem.blog.BlogEntry';
UPDATE wcm_content SET class = 'org.weceem.content.WcmComment' WHERE class = 'org.weceem.content.Comment';
UPDATE wcm_content SET class = 'org.weceem.content.WcmFolder' WHERE class = 'org.weceem.content.Folder';
UPDATE wcm_content SET class = 'org.weceem.content.WcmTemplate' WHERE class = 'org.weceem.content.Template';
UPDATE wcm_content SET class = 'org.weceem.content.WcmVirtualContent' WHERE class = 'org.weceem.content.VirtualContent';
UPDATE wcm_content SET class = 'org.weceem.content.WcmWidget' WHERE class = 'org.weceem.content.Widget';
UPDATE wcm_content SET class = 'org.weceem.css.WcmStyleSheet' WHERE class = 'org.weceem.css.StyleSheet';
UPDATE wcm_content SET class = 'org.weceem.files.WcmContentDirectory' WHERE class = 'org.weceem.files.ContentDirectory';
UPDATE wcm_content SET class = 'org.weceem.files.WcmContentFile' WHERE class = 'org.weceem.files.ContentFile';
UPDATE wcm_content SET class = 'org.weceem.html.WcmHTMLContent' WHERE class = 'org.weceem.html.HTMLContent';
UPDATE wcm_content SET class = 'org.weceem.js.WcmJavaScript' WHERE class = 'org.weceem.js.JavaScript';
UPDATE wcm_content SET class = 'org.weceem.content.WcmExternalLink' WHERE class = 'org.weceem.content.ExternalLink';
UPDATE wcm_content SET class = 'org.weceem.wiki.WikiItem' WHERE class = 'org.weceem.wiki.WcmWikiItem';

Then you can start 0.9 and all should be well.

Export and import

Alternatively you can export all your spaces individually and re-import them after installing Weceem 0.9. This will require that you re-create your spaces in Weceem after the upgrade (as it cannot see the old spaces table) and you must obviously make 100% sure your 0.8 exports were valid. In rare situations we have found export ZIPs from 0.8 that are malformed. Make sure you can open the zip - and backup your SQL and WeceemFiles/ as previously mentioned.

Configuration changes

The weceem.config.location system property that you may be passing to Weceem to locate your properties file containing database config etc, is a URL. You must therefore make sure that the value is prefixed with file: e.g: file:/var/myconfig/weceem.properties 

 

 
eMail Page   Print
      Delicious   submit to reddit