Home FAQs / How-To's Upgrading Apache across multiple Windows computers
Upgrading Apache across multiple Windows computers PDF Print E-mail
User Rating: / 2
PoorBest 
Written by Gregg   
Thursday, 13 November 2008 21:21

1) Create a network share to Apache on every computer running Apache.
2) Create a batch file using the commands shown below;


Code:
sc \\remote_computername [start/stop] apache_service_name
copy /v /y source_apache_root\include\*.* \\remote_computername\remote_sharename\destination_apache_location\include
copy /v /y source_apache_root\lib\*.* \\remote_computername\remote_sharename\destination_apache_location\lib
copy /v /y source_apache_root\modules\*.* \\remote_computername\remote_sharename\destination_apache_location\modules
xcopy /s /v /y source_apache_root\bin\*.* \\remote_computername\remote_sharename\destination_apache_location\bin
xcopy /s /v /y source_apache_root\manual\*.* \\remote_computername\remote_sharename\destination_apache_location\manual

 

Example:

For our example we have 3 computers with the names R1 R2 & R3 on our network and all having Apache installed and running.
All shares on our other computers are simply named Apache for ease.
The Apache services running on the other computers are simply named Apache2.2

OK, now we need to manually shutdown and upgrade Apache on R1 and place our batch file on it. Our batch file contents on R1;


Code:
@echo off

rem Upgrading Computer R2

sc \\R2 stop Apache2.2
copy /v /y c:\Apache22\include\*.* \\R2\Apache\include
copy /v /y c:\Apache22\lib\*.* \\R2\Apache\lib
copy /v /y c:\Apache22\modules\*.* \\R2\Apache\modules
xcopy /s /v /y c:\Apache22\bin\*.* \\R2\Apache\bin
xcopy /s /v /y c:\Apache22\manual\*.* \\R2\Apache\manual
sc \\R2 start Apache2.2

-- repeat above using R3 insted of R2 ---
 


Things to consider
:

Removing "Everyone" permissions to the Apache shares and allowing only certain users permission to those shares. The batch file will only work for those with said permission to the share.

Last Updated on Monday, 15 December 2008 00:01