1. Deployment Folder: contains three files: Root. War, update. SQL, and batch processing. bat.
2. Copy the deployment folder to any location on the server computer.
3. Execute the batch processing file.
The content of the batch processing script file is as follows:
@ Echo
MD e: \ exambody \ My
MD e: \ exambody \ data backup during deployment \ % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% \
Copy update. SQL E: \ exambody \ My
Copy root. War E: \ exambody \ My
@ Echo 1. Execute the update. SQL statement to update the database
E:
Cd e: \ exambody \ mysql-5.1.37-win32 \ bin
Mysql-uroot-padmin <E: \ exambody \ My \ update. SQL
@ Echo 2. Delete the root folder of the server
E:
Rd E: \ exambody \ apache-Tomcat-6.0.33 \ webapps \ Root/S/Q
@ Echo 3. Backup Server Root. War and database files
Copy E: \ exambody \ apache-Tomcat-6.0.33 \ webapps \ Root. War E: \ exambody \ data backup during deployment \ % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% \
Xcopy E: \ exambody \ mysql-5.1.37-win32 \ data \ exambody E: \ exambody \ data backup \ % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% \ exambody \/e/y
@ Echo 4. Copy the war package to the directory e: \ exambody \ apache-Tomcat-6.0.33 \ webapps on the server.
CD
Xcopy E: \ exambody \ My \ Root. War E: \ exambody \ apache-Tomcat-6.0.33 \ webapps \/e/y
Rd E: \ exambody \ My \/S/Q