Many companies have already invested money on having their technological stack running on a concrete application server and/or they may want to profit from the benefits of an application server so. Although CQ comes already shipped as a standalone application that can be executed by itself, with it’s own servlet engine, you can also deploy it on another application server that supports the Servlet API.
In this post, I will install AEM with Tomcat 7 application server. This post is based on the Adobe documentation, if you want to check if your particular version of CQ/AEM is suitable for a concrete application server or want to install it within another server, please refer to it.

Prerequisites

 

Tomcat 7

For this tutorial, I used the last version of Tomcat 7, at the time this tutorial was done, it was 7.0.54.

1. Increase your VM memory:

In $CATALINA_HOME/bin create the file setenv.sh. with the following content to increase your VM settings:

2. Allow access to manager account

Edit the tomcat-users.xml to allow access for the manager account. Add the roles admin and manager-gui, add the role user admin.

3. Customize the manager app (optional)

With the manager-gui you are only allowed to upload files with a maximum size of 50MB. In order to upload AEM you will need at least 300MB. In order to increase this limit, go to webapps/manager/WEB-INF/web.xml and add the following at multipart-config.

4. Rename your ROOT application (optional)

This is only needed if you want to deploy AEM with context root “/”, if you are happy having your war name as context root (e.g. “/cq561author” if you have cq561author.war) you can leave it that way.

5. Deploy AEM

You may want to configure your application before you install it, like for example have a publish instance instead of an author (default) one, if this is your case read the general description at Adobe’s documentation.