Similar content

Loading

Powered by Canoo FindIT.

Enterprise Edition on Linux

Tip!

These instructions rely on the Enterprise installer application. If you need to do fast installations repeatedly, download the Tomcat and Magnolia CMS bundle instead and follow the Community Edition installation steps. You still need to register for a license key.

Check the prerequisites

Java Runtime Environment (JRE)

Magnolia CMS needs a Java Runtime Environment (JRE). Most likely you already have it on your Linux computer. Use the Java Tester to check.

If you don't have JRE, download and install it from http://java.sun.com/javase/downloads/index.jsp. Installation directory varies from one Linux system to another. For example on Ubuntu Linux 10 the OpenJDK Runtime Environment is installed in /usr/lib/jvm/java-6-openjdk/jre by default.

Register for license key

Magnolia CMS Enterprise Edition is available for a free 60-day trial. To get a license key you must register.

  1. Go to http://registration.magnolia-cms.com/.
  2. Fill the form with your details. A license key will be sent to the email address you provide.
If you bought an Enterprise license, a license key will be sent to you upon signing of the Magnolia Network Agreement.

Download, install and run Magnolia CMS

Download

  1. Go to http://files.magnolia-cms.com/.
  2. Click the latest Magnolia CMS version.
  3. Download the Installer (Installer bundle with Tomcat) JAR file. The file name depends on the release, for example magnolia-enterprise-installer-4.2.3.jar.

Install

  1. Run the installer JAR file you downloaded:
    java -jar magnolia-enterprise-installer-4.2.3.jar
  2. Select an installation language and click OK.
  3. Click Next.
  4. Click Next.
  5. Accept the license terms and click Next.
  6. Optional: Configure Magnolia CMS to use a Java Runtime Environment other than your default JRE. The default is usually fine. Click Next.
  7. Click Next.
  8. Select the installation path. Default is /home/userAccount/MagnoliaEnterpriseEdition. If you are installing Magnolia CMS for personal use extract to the default or equivalent directory. If you are installing a production server extract to /usr/local or /opt.
  9. Click Next. Installation will start.
  10. Click Next.
  11. Clear the Start menu and desktop shortcuts. They only work in Windows. Click Next.
  12. Click Done.
The folder structure of the installed application looks like this:
/home/
  userAccount/
    MagnoliaEnterpriseEdition/
      add-ons/
      apache-tomcat/
        bin/
        common/
        conf/
        logs/
        server
        shared/
        webapps/
          MagnoliaAuthor/
          MagnoliaPublic/
          ROOT/

Run

  1. Open a terminal window.
  2. Go to the Magnolia CMS installation directory:
    cd /home/userAccount/magnolia-4.2.3/apache-tomcat/bin
    Your path may be different.
  3. Start Magnolia CMS:
    ./magnolia_control.sh start
Tip

Use ./magnolia_control.sh start && tail -f ../logs/catalina.out to start Magnolia.

The first part of the command ./magnolia_control.sh start launches Magnolia CMS. The second part && tail -f ../logs/catalina.out displays startup messages written to /apache-tomcat/logs/catalina.out log file. This makes it easier to troubleshoot startup errors. If startup fails, look for the reason in the report. See Troubleshooting to resolve the issues. In a successful startup the last line reads:
INFO: Server startup in 12345 ms

To stop Magnolia CMS use ./magnolia_control.sh stop

Run the Web update

  1. Open a browser and go to http://localhost:8080.
  2. Click the Run the Web update on the author instance link.
    A list of modules that need updating is displayed.
  3. Click Start install.
    The modules are updated.
  4. Click Start up Magnolia.
Repeat the update on the public instance.
  1. Open a browser and go to http://localhost:8080.
  2. Click the Run the Web update on the public instance link.
    A list of modules that need updating is displayed.
  3. Click Start install.
    The modules are updated.
  4. Click Start up Magnolia.

Register

Now you need the license key that was sent to your email address. Copy only the key string part from the message. Fill in the same email address that you used when registering.

Log in to author instance

At the login page, sign in with:

  • Username: superuser
  • Password: superuser
Info

Superuser is a system administration account that has permission to every function. End users should not use this account. See Users for instructions how to create new user accounts and Default users for accounts that you can use for testing right away.

The AdminCentral is displayed.

Troubleshooting

Port 8080 is already in use

Port 8080 is the default port for Tomcat. You can see it at the end of the default address http://localhost:8080. If another application on the computer is already using the same port you may need to change it.
  1. Open /apache-tomcat/conf/server.xml in a text editor. This file is under your Magnolia CMS installation directory.
  2. Find the following section and set the value of port to something other than 8080, for example 8090:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8090" maxHttpHeaderSize="8192"
           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
           enableLookups="false" redirectPort="8443" acceptCount="100"
           connectionTimeout="20000" disableUploadTimeout="true" />

Change the defaultBaseUrl property which is used to generate links in emails or other external systems. To do this, you need to now access Magnolia at the new port 8090.

  1. Log into the author instance at http://localhost:8090/magnoliaAuthor/.magnolia.
  2. Go to Configuration.
  3. Set the value of /server/defaultBaseUrl property to http://localhost:8090/magnolia/.
  4. Log into the public instance at http://localhost:8090/magnoliaPublic/.magnolia.
  5. Go to Configuration.
  6. Set the value of /server/defaultBaseUrl property to http://localhost:8090/magnolia/.
Now the Welcome page at http://localhost:8090 has the correct URLs too.

The port also needs to be changed in publishing configuration, otherwise activating changes from the author to public instance fails.

  1. On the author instance, go to Configuration > Subscribers.
  2. Edit the magnoliaPublic8080 subscriber. Set the URL property to http://localhost:8090/magnoliaPublic.
  3. Rename the subscriber to magnoliaPublic8090.
  4. Activate the modified subscriber including its subnodes.

Too many open files

This error can occur on some Linux systems when using the embedded Derby database. Derby opens several file handles and may run over the maximum limit set by the system.

Solution is to increase the limit. The exact procedure varies from one Linux distribution to the next. The following works on Ubuntu. For other systems see the Too many open files wiki page for tips.

To set a system wide limit for open files on Ubuntu Linux:

  1. Find the current maximum number of open files per user in a single session:
    ulimit -n
    By default the number is 1024 which is too small.
  2. Edit the limits.conf file:
    sudo gedit /etc/security/limits.conf
  3. Add the following lines to the file:
    * soft nofile 10000
    * hard nofile 50000
    This sets for all users a soft limit of 10000 open files and a hard limit of 50000. These are just example numbers. Set them according to your system needs. Note that the wildcard option applies only to regular users, not to superuser. If you run Magnolia CMS as superuser replace the asterisk with root.
  4. Save the file.
  5. Edit the configuration file for session-related modules:
    sudo gedit /etc/pam.d/common-session
  6. Add the following line to the file:
    session required pam_limits.so
  7. Save the file.
  8. Restart Ubuntu.
  9. Verify the new maximum number of open files:
    ulimit -n
    The command should now return 10000.

Java out of memory

If the Java Virtual Machine (JVM) does not have enough memory you may see a java.lang.OutOfMemoryError in the startup log. Magnolia CMS fails to start.

Exception in thread "Timer-1" java.lang.OutOfMemoryError: Java heap space
	at org.apache.jackrabbit.core.query.lucene.IndexingQueue.getFinishedDocuments

Increase Java heap size to allocate more memory to JVM:
  1. Stop the server.
    ./magnolia_control.sh stop
  2. Open file /apache-tomcat/bin/setenv.sh in a text editor.
  3. Edit the Xmx parameter to set a new maximum heap size. Default size for Magnolia CMS is 512M, try a higher amount such as 1024M.
  4. Save the file and start the server.
    ./magnolia_control.sh start && tail -f ../logs/catalina.out