Index: main/trunk/release-kits/kits/rk2/ant-scripts/components.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/components.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk2/ant-scripts/components.xml	(revision 22325)
@@ -1,48 +1,55 @@
 <!-- an ant project containing authoritative definitions of the components of greenstone3 -->
 <project name="components">
+  
+  <!-- source component - files that get compiled and could be safely removed from a binary distribution -->
+  <patternset id="greenstone2.source.component">
+    <include name="gli/src"/>
+    <include name="gli/src/**/*"/>
+    <include name="common-src"/>
+    <include name="common-src/**/*"/>
+    <include name="build-src"/>
+    <include name="build-src/**/*"/>
+    <include name="runtime-src"/>
+    <include name="runtime-src/**/*"/>
+    <include name="aclocal.m4"/>
+    <include name="config.guess"/>
+    <include name="config.h.in"/>
+    <include name="config.sub"/>
+    <include name="configure"/>
+    <include name="configure.in"/>
+    <include name="install-sh"/>
+    <include name="Makefile.in"/>
+    <include name="win32.mak"/>
+    <include name="win32cfg.h"/>
+  </patternset>
+  
+  <!-- imagemagick -->
+  <patternset id="greenstone2.imagemagick.component">
+    <include name="bin/**/imagemagick"/>
+    <include name="bin/**/imagemagick/**/*"/>
+  </patternset>
+  
+  <!-- ghostscript -->
+  <patternset id="greenstone2.ghostscript.component">
+    <include name="bin/**/ghostscript"/>
+    <include name="bin/**/ghostscript/**/*"/>
+  </patternset>
 
-	<!-- source component - files that get compiled and could be safely removed from a binary distribution -->
-	<patternset id="greenstone2.source.component">
-		<include name="gli/src"/>
-		<include name="gli/src/**/*"/>
-		<include name="common-src"/>
-		<include name="common-src/**/*"/>
-		<include name="build-src"/>
-		<include name="build-src/**/*"/>
-		<include name="runtime-src"/>
-		<include name="runtime-src/**/*"/>
-		<include name="aclocal.m4"/>
-		<include name="config.guess"/>
-		<include name="config.h.in"/>
-		<include name="config.sub"/>
-		<include name="configure"/>
-		<include name="configure.in"/>
-		<include name="install-sh"/>
-		<include name="Makefile.in"/>
-		<include name="win32.mak"/>
-		<include name="win32cfg.h"/>
-	</patternset>
-
-	<!-- imagemagick -->
-	<patternset id="greenstone2.imagemagick.component">
-		<include name="imagemagick"/>
-		<include name="imagemagick/**/*"/>
-	</patternset>
-
-    <!-- ghostscript -->
-    <patternset id="greenstone2.ghostscript.component">
-        <include name="ghostscript"/>
-        <include name="ghostscript/**/*"/>
-    </patternset>
-
-    <!-- the core component - defined by antithesis -->
-    <patternset id="greenstone2.core.component">
-		<invert>
-			<patternset refid="greenstone2.source.component"/>
-			<patternset refid="greenstone2.imagemagick.component"/>
-			<patternset refid="greenstone2.ghostscript.component"/>
-		</invert>
-    </patternset>
-
+  <!-- apache httpd -->  
+  <patternset id="greenstone2.apachehttpd.component">
+    <include name="apache-httpd"/>
+    <include name="apache-httpd/**/*"/>
+  </patternset>
+  
+  <!-- the core component - defined by antithesis -->
+  <patternset id="greenstone2.core.component">
+    <invert>
+      <patternset refid="greenstone2.source.component"/>
+      <patternset refid="greenstone2.imagemagick.component"/>
+      <patternset refid="greenstone2.ghostscript.component"/>
+      <patternset refid="greenstone2.apachehttpd.component"/>
+    </invert>
+  </patternset>
+  
 </project>
 
Index: main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml	(revision 22325)
@@ -38,5 +38,4 @@
 					<include name="cgi-bin/library.cgi"/>
 					<include name="cgi-bin/oaiserver.cgi"/>
-					<include name="apache-httpd/**/*"/>
 					<include name="*.sh"/>
 					<include name="*.csh"/>
@@ -73,6 +72,4 @@
 					<include name="cgi-bin/library.cgi"/>
 					<include name="cgi-bin/oaiserver.cgi"/>
-					<include name="apache-httpd"/>
-					<include name="apache-httpd/**/*"/>
 					<include name="*.sh"/>
 					<include name="*.csh"/>
@@ -94,5 +91,8 @@
 			<unzip src="components/ghostscript.comp" dest="cdrom/dist/Software/ghostscript/${rk.os}" overwrite="true"/>
 		</if>
-
+		
+		<!-- apache httpd -->
+		<unzip src="components/apachehttpd.comp" dest="cdrom/dist/Software" overwrite="true"/>
+		
 		<!-- jre linux -->
 		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
Index: main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml	(revision 22325)
@@ -10,4 +10,7 @@
 		<antcall target="create-component"><param name="component" value="imagemagick"/></antcall>
 
+		<!-- apache httpd -->
+		<antcall target="create-component"><param name="component" value="apachehttpd"/></antcall>
+
 		<!-- windows and mac only -->
 		<if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
Index: main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 22325)
@@ -62,5 +62,5 @@
 	</page>
 
-	<!-- conmponents -->
+	<!-- components -->
 	<page type="input" name="selector" displayText="">
 		<comment name="choose-components"/>
@@ -82,4 +82,10 @@
 			defaultValue="true"
 			force="true"/>
+
+		<target
+		        target="Installing Apache Web Server"
+			diskRequirement="@component.size.httpd@"
+			displayText=""
+			defaultValue="true"/>
 
 		<target
Index: main/trunk/release-kits/kits/rk2/installer/build.xml
===================================================================
--- main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 22325)
@@ -120,6 +120,4 @@
 		<!-- if linux|mac -->
 		<chmod dir="${installDir}/bin/${shell.name}" includes="**/*" perm="775"/>
-		<chmod dir="${installDir}/apache-httpd/${shell.name}/bin" includes="*" perm="775"/>
-		<chmod dir="${installDir}/apache-httpd/${shell.name}" includes="*.sh" perm="775"/>
 		<!-- /if -->
 
@@ -155,11 +153,4 @@
 			>cgiarg          shortname=l argdefault=${language}</echo>
 
-		<!-- if linux|mac -->
-		<echo>Setting up apache web server</echo>
-		<exec dir="${installDir}" executable="${installDir}/apache-httpd/${shell.name}/install-bindist.sh">
-			<arg value="${installDir}/apache-httpd/${shell.name}"/>
-		</exec>
-		<!-- /if -->
-
 		<echo message="Creating installation properties file"/>
 		<!-- if linux|mac -->
@@ -170,4 +161,41 @@
 		<!-- /if -->
 		
+	</target>
+
+	<!-- Apache HTTPD  -->
+	<target name="Installing Apache Web Server">
+	  <echo>Installing the Apache Web Server</echo>
+	  
+	  <!-- start web -->
+	  <unzip src="${antinstaller.jar}" dest="${basedir}">
+	    <patternset>
+	      <include name="apachehttpd.lzma"/>
+	    </patternset>
+	  </unzip>
+
+	  <!-- if linux|mac -->
+	  <sevenzip task="decode" input="${basedir}/apachehttpd.lzma" output="${basedir}/imagemagick.comp"/>
+	  <!-- /if -->
+	  <!-- if windows -->
+	  <exec dir="${basedir}" executable="${basedir}/7za.exe">
+	    <arg line="x apachehttpd.lzma"/>
+	  </exec>
+	  <!-- /if -->
+	  <!-- end web -->
+
+	  <!-- start cdrom -->
+	  <copy todir="${installDir}">
+	    <fileset dir="${orig.dir}/Software/apache-httpd"/>
+	  </copy>
+	  <!-- end cdrom -->
+
+	  <!-- if linux|mac -->
+	  <chmod dir="${installDir}/apache-httpd/${shell.name}/bin" includes="*" perm="775"/>
+	  <chmod dir="${installDir}/apache-httpd/${shell.name}" includes="*.sh" perm="775"/>
+	  <echo>Setting up apache web server</echo>
+	  <exec dir="${installDir}" executable="${installDir}/apache-httpd/${shell.name}/install-bindist.sh">
+	    <arg value="${installDir}/apache-httpd/${shell.name}"/>
+	  </exec>
+	  <!-- /if -->
 	</target>
 
Index: main/trunk/release-kits/kits/rk3/installer/antinstall-config.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/installer/antinstall-config.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk3/installer/antinstall-config.xml	(revision 22325)
@@ -102,4 +102,12 @@
 			displayText=""/>
 
+		<!-- start amp -->
+		<target
+		   target="Installing AMP"
+		   diskRequirement="@component.size.amp@"
+		   defaultValue="true"
+		   displayText=""/>
+		<!-- end amp -->
+
 		<!-- if windows -->
 		<target
Index: main/trunk/release-kits/kits/rk3/installer/build.xml
===================================================================
--- main/trunk/release-kits/kits/rk3/installer/build.xml	(revision 22247)
+++ main/trunk/release-kits/kits/rk3/installer/build.xml	(revision 22325)
@@ -175,4 +175,23 @@
 
 	</target>
+
+	<!-- start amp -->
+
+	<target name="Installing AMP">
+	  <echo>Installing Apache, MySQL and PHP</echo>
+	  <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="amp.lzma"/></patternset></unzip>
+	  <!-- if windows --><exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x amp.lzma"/></exec><!-- /if -->
+	  <!-- if linux|mac --><sevenzip task="decode" input="${basedir}/amp.lzma" output="${basedir}/amp.comp"/><!-- /if -->
+	  <delete file="amp.lzma"/>
+	  <unzip src="${basedir}/amp.comp" dest="${installDir}/ext/amp"/>
+	  <delete file="amp.comp"/>
+	  
+	  <!-- if linux|mac -->
+	  <echo>Setting binaries to executable</echo>
+	  <chmod dir="${installDir}/ext/amp" includes="*" perm="775"/>
+	  <!-- /if -->
+	</target>
+
+	<!-- end amp -->
 
 	<target name="Installing Tomcat">
