{"id":47283,"date":"2017-03-29T19:04:59","date_gmt":"2017-03-29T13:34:59","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=47283"},"modified":"2017-03-30T13:20:35","modified_gmt":"2017-03-30T07:50:35","slug":"configuring-dispatcher-author-and-publish-instance-of-adobe-experience-manager-aem","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/configuring-dispatcher-author-and-publish-instance-of-adobe-experience-manager-aem\/","title":{"rendered":"Configuring Dispatcher, Author and Publish Instance of Adobe Experience Manager (AEM)"},"content":{"rendered":"<p>A shorter time to market is critical to product companies. With the growth in competition, it is important to deliver a fast, secure and seamless application experience. \u00a0It is the usability of the application that will differentiate an organization from its competitors.<\/p>\n<p><a title=\"AEM Development Services\" href=\"http:\/\/www.tothenew.com\/wcm\/cq-aem-development-consulting\">Adobe Experience Manager<\/a> (or AEM), a component of the Adobe Marketing Cloud, is the leading enterprise content management platform for building websites and mobile applications along with managing digital assets and content. These applications need to be highly available and deployed over an easily scalable infrastructure.<\/p>\n<p>Amazon Web Services (or AWS) provides a plethora of <a title=\"DevOps AWS\" href=\"http:\/\/www.tothenew.com\/devops-aws\">cloud services<\/a> which can be used and integrated to build a complete solution architecture for such applications. AWS provides capabilities such as global capacity, security, reliability, fault tolerance, programmability, and usability.<\/p>\n<p>An AEM instance is essentially a copy of the AEM jar running on a system on a specific port. These instances can be run on a single machine (using a different port for each instance) or various machines. This blog demonstrates the process of setting up AEM Author and AEM Publish instances, along with the Dispatcher on an AWS EC2 machine running on <a href=\"http:\/\/www.tothenew.com\/blog\/how-to-install-kubernetes-on-centos\/\">CentOS 7<\/a>.<\/p>\n<ul>\n<li><b>AEM Author:<\/b> The Author instance is used to design, create and review the content which will be published on the application in the future. The instance is located inside the organization\u2019s firewall under full protection of the internal network. It provides an easy GUI for the tasks and uses the port 4502 by default.<\/li>\n<li><b>AEM Publish: <\/b>The Publish instance is used to make the designed application available to the public and is located in a demilitarized zone. The default port used by the instance is 4503.<\/li>\n<li><b>AEM Dispatcher:<\/b> The Dispatcher is another instance used in AEM which handles instance security, load balancing, and caching from the Publish instance.<\/li>\n<\/ul>\n<p>You need to ensure that the Apache HTTP Server and Java are running\u00a0to set up AEM instances.<\/p>\n<p><b><b>Install Apache<\/b><\/b><\/p>\n<p>[js]sudo yum update<br \/>\nsudo yum install httpd[\/js]<\/p>\n<p><strong>Install Java<\/strong><\/p>\n<p>[js]sudo yum install java-1.8.0-openjdk-devel[\/js]<\/p>\n<p><b>Outlined below are the steps to setup AEM instances:<\/b><\/p>\n<p><b><b>&#8211; Dispatcher<\/b><\/b><\/p>\n<p>The dispatcher instance is configured using a dispatcher module (dispatcher-apache&lt;x.y&gt;-&lt;rel-nr&gt;.so) and a configuration file (dispatcher.any)<\/p>\n<ul>\n<ul>\n<li>Download the appropriate tar.gz <a href=\"https:\/\/www.adobeaemcloud.com\/content\/companies\/public\/adobe\/dispatcher\/dispatcher.html\">from here<\/a><\/li>\n<li>Untar and remove the original tar file:\n<p>[js] tar -xvf dispatcher-apache-xxx.tar.gz<br \/>\nrm dispatcher-apache-xxx.tar.gz [\/js]<\/p>\n<\/li>\n<\/ul>\n<\/ul>\n<ul>\n<ul>\n<li>The directory structure is as follows:<\/li>\n<\/ul>\n<\/ul>\n<p><b>&#8211; CHANGES<\/b><\/p>\n<p>Changes comprise of issues resolved in each release<\/p>\n<p><b>&#8211; Conf <\/b><\/p>\n<p>These are configuration files for dispatcher<\/p>\n<p><b>dispatcher-apache&lt;x.y&gt;-&lt;rel-nr&gt;.so : <\/b>The Dispatcher shared object library file which will be added to the Apache web server<\/p>\n<p><b>&#8211; README<\/b><\/p>\n<p>README contains installation instructions<\/p>\n<ul>\n<ul>\n<li>Make a softlink of the DSO file in the \u2018modules\u2019 directory of Apache\n<p>[js]ln -s \/path\/to\/dispatcher\/dispatcher-apache&lt;x.y&gt;-&lt;rel-nr&gt;.so \/etc\/httpd\/modules\/mod_dispatcher.so[\/js]<\/p>\n<\/li>\n<\/ul>\n<\/ul>\n<ul>\n<ul>\n<li>Copy the dispatcher.any file to \u2018conf\u2019 folder of Apache\n<p>[js]cp dispatcher.any \/etc\/httpd\/conf\/dispatcher.any[\/js]<\/p>\n<\/li>\n<\/ul>\n<\/ul>\n<ul>\n<ul>\n<li>Disable SELinux: SELinux (or Security Enhanced Linux), if enabled, may cause some errors while running Dispatcher.<\/li>\n<\/ul>\n<\/ul>\n<ul>\n<ul>\n<ul>\n<li>Edit \/etc\/selinux\/config:\n<p>[js]SELINUX=disabled[\/js]<\/p>\n<\/li>\n<li>Run<\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<p>[js]\/usr\/sbin\/setsebool httpd_can_network_connect true[\/js]<\/p>\n<ul>\n<ul>\n<li>Edit the configurations in \/etc\/httpd\/conf\/httpd.conf:\n<ul>\n<li>Load module: to load module on start-up<\/li>\n<li>Add dispatcher configuration: Dispatcher-specific configuration entries<\/li>\n<li>SetHandler: to activate the dispatcher<\/li>\n<li>ModMimeUsePathInfo: to modify the behavior of mod_mime<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/ul>\n<p>Add the following lines:<\/p>\n<p>[js]Listen 80<br \/>\nInclude conf.modules.d\/*.conf<br \/>\nLoadModule dispatcher_module \/etc\/httpd\/modules\/mod_dispatcher.so<br \/>\n&lt;IfModule disp_apache2.c&gt;<br \/>\n DispatcherConfig conf\/dispatcher.any<br \/>\n DispatcherLog logs\/dispatcher.log<br \/>\n DispatcherLogLevel 3<br \/>\n DispatcherNoServerHeader 0<br \/>\n DispatcherDeclineRoot 0<br \/>\n DispatcherUseProcessedURL 0<br \/>\n DispatcherPassError 0<br \/>\n DispatcherKeepAliveTimeout 60<br \/>\n&lt;\/IfModule&gt;<\/p>\n<p>&lt;Directory \/&gt;<br \/>\n &lt;IfModule disp_apache2.c&gt;<br \/>\n SetHandler dispatcher-handler<br \/>\n &lt;\/IfModule&gt;<br \/>\n Options FollowSymLinks<br \/>\n AllowOverride None<br \/>\n&lt;\/Directory&gt;<br \/>\n&lt;Directory \/&gt;<br \/>\n &lt;IfModule disp_apache2.c&gt;<br \/>\n SetHandler dispatcher-handler<br \/>\n ModMimeUsePathInfo On<br \/>\n &lt;\/IfModule&gt;<br \/>\n Options FollowSymLinks<br \/>\n AllowOverride None<br \/>\n&lt;\/Directory&gt;[\/js]<\/p>\n<p><b><b>&#8211; Author and Publisher:<\/b><\/b><\/p>\n<ul>\n<ul>\n<li>To <a href=\"http:\/\/www.tothenew.com\/blog\/aem-dispatcher-setup-for-linux\/\">set up AEM<\/a>, the AEM Quickstart Jar (AEM_6.x_Quickstart.jar) and License file (license.properties) are required. These files are always placed together to run the Author or Publish instance.<\/li>\n<\/ul>\n<\/ul>\n<ul>\n<ul>\n<li>Create directories for author and publisher<\/li>\n<\/ul>\n<\/ul>\n<p>[js]mkdir -p \/opt\/aem\/author<br \/>\nmkdir -p \/opt\/aem\/publish[\/js]<\/p>\n<ul>\n<ul>\n<li>Copy jar and license file and set appropriate names for jar files:<\/li>\n<\/ul>\n<\/ul>\n<p>AEM author and publish instances are configured using run modes. For example, author instances use the author run mode\u00a0and publish instances use the publish run mode.<\/p>\n<p>These run instances can be configured through the naming of the jar file (cq5-&lt;run mode&gt;-p&lt;port&gt;.jar).<\/p>\n<p>[js]cp AEM_6.x_Quickstart.jar \/opt\/aem\/author\/cq5-author-p4502.jar<br \/>\ncp AEM_6.x_Quickstart.jar \/opt\/aem\/publish\/cq5-publish-p4503.jar<br \/>\ncp license.properties \/opt\/aem\/author\/license.properties<br \/>\ncp license.properties \/opt\/aem\/publish\/license.properties[\/js]<\/p>\n<ul>\n<ul>\n<li>Unpack jars:<\/li>\n<\/ul>\n<\/ul>\n<p>The run mode of an AEM instance cannot be changed once it has been installed.<\/p>\n<p>[js]java -jar \/opt\/aem\/author\/cq5-author-p4502.jar -unpack<br \/>\njava -jar \/opt\/aem\/publish\/cq5-publish-p4503.jar -unpack[\/js]<\/p>\n<p>Unpacking of the jar files creates a folder named \u2018crx-quickstart\u2019 which contains the\u00a0script to start\/stop the AEM instance and logs.<\/p>\n<ul>\n<ul>\n<li>Start the publish instance for the first time:<\/li>\n<\/ul>\n<\/ul>\n<p>[js]java -jar \/opt\/aem\/publish\/cq5-author-p4502.jar -r publish[\/js]<\/p>\n<ul>\n<ul>\n<li>Edit start script of the\u00a0publish instance:<\/li>\n<\/ul>\n<\/ul>\n<p>Every AEM instance is an author instance by default. To configure the publish instance, set the following properties in \/opt\/AEM\/publish\/crx-quickstart\/bin\/start:<\/p>\n<p>[js]CQ_PORT=4503<br \/>\nCQ_RUNMODE=&#8217;publish'[\/js]<\/p>\n<p>Stop and restart the publish instance using the scripts in crx-quickstart\/bin\/.<\/p>\n<p><b>Note: <\/b> The start script can be used to define various configurations of the instance, such as java heap memory.<\/p>\n<ul>\n<ul>\n<li>Edit \/etc\/httpd\/conf\/dispatcher.any\n<ul>\n<li>Add virtual hosts (URI and hostname requests which the dispatcher will accept)<\/li>\n<li>Add the renderer (the\u00a0server that provides the pages to be served, i.e., the publish instance).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/ul>\n<p>Include the following:<\/p>\n<p>[js]\/virtualhosts {<br \/>\n&quot;*:80&quot;<br \/>\n}<br \/>\n\/renders {<br \/>\n\/rend01 {<br \/>\n# Hostname or IP of the render<br \/>\n\/hostname &quot;127.0.0.1&quot;<br \/>\n# Port of the render<br \/>\n\/port &quot;4503\u201d<br \/>\n}<br \/>\n}[\/js]<\/p>\n<p>This configuration accepts all requests on port 80 and serves the pages provided by the publish instance on port 4503.<\/p>\n<ul>\n<ul>\n<li>Start the author instance using the start script.<\/li>\n<\/ul>\n<\/ul>\n<p>[js]bash \/opt\/aem\/author\/crx-quickstart\/bin\/start[\/js]<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_47345\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-47345\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-47345 size-large\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/03\/author-aem1-1024x503.png\" alt=\"AEM Author login screen\" width=\"625\" height=\"307\" \/><p id=\"caption-attachment-47345\" class=\"wp-caption-text\">AEM Author login screen<\/p><\/div>\n<div id=\"attachment_47346\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-47346\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-47346 size-large\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/03\/aem-author-publish-1024x156.png\" alt=\"Starting Author and Publish instances\" width=\"625\" height=\"95\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/03\/aem-author-publish-1024x156.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/03\/aem-author-publish-300x45.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/03\/aem-author-publish-624x95.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/03\/aem-author-publish.png 1299w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-47346\" class=\"wp-caption-text\">Starting author and publish instance<\/p><\/div>\n<div id=\"attachment_47347\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-47347\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-47347 size-large\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/03\/stop-author-and-publish-1024x109.png\" alt=\"Stopping Author and Publish instances\" width=\"625\" height=\"66\" \/><p id=\"caption-attachment-47347\" class=\"wp-caption-text\">Stopping Author and Publish instances<\/p><\/div>\n<div id=\"attachment_47348\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-47348\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-47348\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/03\/dispatcher-1024x152.png\" alt=\"Check correct installation  of dispatcher in logs\" width=\"625\" height=\"92\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/03\/dispatcher-1024x152.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/03\/dispatcher-300x44.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/03\/dispatcher-624x92.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/03\/dispatcher.png 1300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-47348\" class=\"wp-caption-text\">Check correct installation of dispatcher in logs<\/p><\/div>\n<p>You will be easily able to configure AEM by following the above steps on one or multiple AWS EC2 instances.<\/p>\n<p><strong>References:<\/strong><br \/>\n<a href=\"https:\/\/docs.adobe.com\/docs\/en\/aem\/6-1\/deploy\/custom-standalone-install.html\">1. Author and Publish<\/a><br \/>\n<a href=\"https:\/\/docs.adobe.com\/docs\/en\/dispatcher.html\">2. Dispatcher<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A shorter time to market is critical to product companies. With the growth in competition, it is important to deliver a fast, secure and seamless application experience. \u00a0It is the usability of the application that will differentiate an organization from its competitors. Adobe Experience Manager (or AEM), a component of the Adobe Marketing Cloud, is [&hellip;]<\/p>\n","protected":false},"author":929,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":271},"categories":[1174,2348,1],"tags":[4847,1813,248,2366],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/47283"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/929"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=47283"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/47283\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=47283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=47283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=47283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}