Batch Processing during implementation (Windows)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.