How to install AEM 5.6.1 on an application server like Tomcat

How to install AEM 5.6.1 on an application server like Tomcat

 

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

  • You have your application server already installed and configured.
  • You know how to start, stop your application server and how to install web applications on it.
  • You need AEM as a war file.

 

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.
  • Start Tomcat running bin/startup.sh, you may need to give execute privileges to startup.sh and catalina.sh, if that is the case use commands like chmod 755 startup.sh
  • Go to Tomcat’s management console: http://localhost:8080/manager/html and login with the password you entered at tomcat-users.xml (in my case admin:admin).
  • Stop&undeploy the ROOT webapp (“/”).
  • Rename the ROOT.war folder in tomcat’s webapp folder (if present).
  • Start that webapp again (if present).

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.

  • Change the name of your AEM war file to ROOT.war (only if you want it at context “/”)
  • Deploy AEM (may take time to install)
  • Don’t be afraid if you go to http://localhost:8080 and you get a 503 unavailable. After 2-3 minutes you should be able to reload and see AEM’s log in page.
  •  Check if it was correctly installed by checking at the Web Console http://localhost:8080/system/console/bundles if all the bundles were deployed.
  • If you want to install your content packages go to CRX Package Manager http://localhost:8080/crx/packmgr/index.jsp
  • Enjoy it!
Tags:
, , ,
No Comments

Sorry, the comment form is closed at this time.