Set Up the Magnolia CMS for Web Content Creation in Just a Few Clicks | 2 | WebReference

Set Up the Magnolia CMS for Web Content Creation in Just a Few Clicks | 2


Set Up the Magnolia CMS for Web Content Creation in Just a Few Clicks [con't]

Getting Started with Magnolia

To begin using Magnolia CMS, you need to make sure that you first have a recent Java Runtime Environment (JRE) installed and configured for your system. Assuming you have this in place, you must begin by installing and configuring the product. You can do this in one of two ways:

  1. If you already have a JSP servlet container, such as Apache Tomcat or JBoss, you can download a Magnolia Web application archive (WAR) file that contains a preconfigured Magnolia instance. The servlet container usually can extract the WAR files automatically and deploy the application. You'll find detailed instructions for different servlet containers here.
  2. If you don't have a pre-existing installation of a JSP servlet container, you can download a Magnolia "bundle" that includes preconfigured versions of both Apache Tomcat and Magnolia. This bundle contains everything you need for a standard Magnolia deployment, with minimal configuration needed.

Using the second approach makes the installation process extremely straightforward and requires far less configuration. The first approach is best suited to users who have prior experience with administering and maintaining Java-based Web applications, or who already have an existing installation of a JSP servlet container.

To begin, download the latest Community Edition bundle from the official Magnolia Web site, and extract the file on to your computer (if you're using Windows XP or better, you can right-click the file and select the Extract option). You can extract the file to any directory you wish. Figure 1 illustrates the directory structure you're likely to find.

Figure 1: Directory Structure Obtained by Extracting the Contents of a Magnolia + Tomcat Bundle

As shown in Figure 1, the bundle contains a working version of Apache Tomcat, with two Magnolia instances in the $TOMCAT/webapps/ directory: an authoring instance and a public instance (more on this later). Under the $TOMCAT/bin/ directory, you'll also find a startup/shutdown script named (magnolia_control.bat on Windows) that can be used to start and stop Magnolia; this script essentially is a wrapper around Tomcat's own control scripts, with some Magnolia-specific configuration options.

When you've extracted the files, drop to a command prompt and set the JAVA_HOME or JRE_HOME environment variable to the location of your JRE installation (if not already present) as shown below (more detailed instructions).

shell> set JRE_HOME=C:\Program Files\Java\jre (on Windows)
shell> export JRE_HOME=/usr/local/java/jre (on *NIX)

Next, execute the following command from the $TOMCAT/bin directory to start the Tomcat server and the Magnolia instances:

shell> magnolia_control.bat start (on Windows)
shell> ./ start (on *NIX)

Figure 2 illustrates what you will see during the startup process.

Figure 2: Magnolia Startup in Progress

Assuming the process concludes with no errors, you should now be able to access Magnolia. Pop open your Web browser and browse to the Magnolia authoring instance by entering the URL http://localhost:8080/magnoliaAuthor. You should see a page that looks like Figure 3.

Figure 3: Magnolia Startup Process

You should now update your Magnolia installation by clicking the specified link and then installing required modules with the Start install/update option on the subsequent page. Figure 4 illustrates.

Figure 4: Magnolia Installation in Progress

Magnolia will proceed through the automated installation process and display a success screen (see Figure 5) when complete.

Figure 5: Magnolia installation in Progress

Selecting the Start up Magnolia option will redirect you to the administrative interface for the Magnolia authoring instance, where you can log in with the default credentials of 'superuser' with the password 'superuser'. If all goes well, you should end up with the Magnolia administrative control panel, aka AdminCentral, which looks like Figure 6.

Figure 6: The Magnolia AdminCentral Workspace

AdminCentral is where you'll be logging many of your Magnolia hours, as it allows you to control all aspects of the Magnolia CMS, including templates, dialogs, users and roles, caching, mail relaying, subscriptions and document management.


At this point, you have a working Magnolia installation. You can now begin building your own custom templates, and then creating pages from them. Or you can download Magnolia's Standard Templating Kit (STK), which offers a quicker and more efficient route to the same destination.

I will provide the details for all these next steps in upcoming articles.

About the Author

Vikram Vaswani is a consultant specializing in open-source tools and technologies. He has more than 11 years of experience deploying open-source tools in corporate intranets, high-traffic Web sites, and mission-critical applications. He is a frequent contributor of articles and tutorials to the open source community, and the author of six books on PHP, MySQL and XML technologies.