Community Edition on Linux
Magnolia CMS Community Edition and STK are GPL v3 licensed. By downloading and installing either package, you agree to the conditions of the license.
- Check the prerequisites
- Download, install and run Magnolia CMS
- Run the Web update
- Log in to author instance
- Troubleshooting
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.
Download, install and run Magnolia CMS
Download
Download Magnolia CMS Tomcat bundle .tar.gz file from http://sourceforge.net/projects/magnolia/files/. File name depends on the release, for example magnolia-tomcat-bundle-4.3.2-tomcat-bundle.tar.gz. Get the latest.
Install
Extract the zip to a directory on your computer. If you are installing Magnolia CMS for personal use extract to /usr/home/<your account> or equivalent directory. If you are installing a production server extract to /usr/local or /opt. Regular user accounts may not have permissions to extract files into a target directory such as /opt. If this is the case extract the zip in the folder where you downloaded it, then open a terminal window and move the extracted folder using sudo mv magnolia-4.3.2. The sudo command will execute the mv (move) command as superuser, prompting you for a password.
The extracted folder structure looks like this:
magnolia-4.2.3
add-ons
apache-tomcat
bin
conf
logs
webapps
MagnoliaAuthor
MagnoliaPublic
ROOT
Run
- Open a terminal window.
- Go to the Magnolia CMS installation directory:
cd /home/<your account>/magnolia-4.2.3/apache-tomcat/bin
Your path may be different. - Start Magnolia CMS:
./magnolia_control.sh start && tail -f ../logs/catalina.out
./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.
Magnolia CMS reports startup information. 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
- Open a browser and go to
http://localhost:8080. - Click the Run the Web update on the author instance link.
A list of modules that need updating is displayed. - Click Start install.
The modules are updated. - Click Start up Magnolia.
- Open a browser and go to
http://localhost:8080. - Click the Run the Web update on the public instance link.
A list of modules that need updating is displayed. - Click Start install.
The modules are updated. - Click Start up Magnolia.
Log in to author instance
- Open a browser and go to
http://localhost:8080/magnoliaAuthor/.magnolia. - At the login page, sign in with:
- Username:
superuser - Password:
superuser

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.
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.
- Open
/apache-tomcat/conf/server.xmlin a text editor. This file is under your Magnolia CMS installation directory. - Find the following section and set the value of
portto 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.
- Log into the author instance at http://localhost:8090/magnoliaAuthor/.magnolia.
- Go to Configuration.
- Set the value of
/server/defaultBaseUrlproperty tohttp://localhost:8090/magnolia/. - Log into the public instance at http://localhost:8090/magnoliaPublic/.magnolia.
- Go to Configuration.
- Set the value of
/server/defaultBaseUrlproperty tohttp://localhost:8090/magnolia/.
The port also needs to be changed in publishing configuration, otherwise activating changes from the author to public instance fails.
- On the author instance, go to Configuration > Subscribers.
- Edit the
magnoliaPublic8080subscriber. Set theURLproperty tohttp://localhost:8090/magnoliaPublic. - Rename the subscriber to
magnoliaPublic8090. - 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.
The 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:
- 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. - Edit the
limits.conffile:
sudo gedit /etc/security/limits.conf - 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 withroot. - Save the file.
- Edit the configuration file for session-related modules:
sudo gedit /etc/pam.d/common-session - Add the following line to the file:
session required pam_limits.so - Save the file.
- Restart Ubuntu.
- 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 and 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
- Stop the server.
./magnolia_control.sh stop - Open file
/apache-tomcat/bin/setenv.shin a text editor. - Edit the
Xmxparameter to set a new maximum heap size. Default size for Magnolia CMS is 512M, try a higher amount such as 1024M. - Save the file and start the server.
./magnolia_control.sh start && tail -f ../logs/catalina.out