Can you really install Apache having a script/batch file?
apt-get install apache2
right within the old batch file, based on your package manager.
Should you desired to install from source, just
and set all of the steps you'd normally take in the party script.