Restore Apache + MySQL after reinstalling the system

Source: Internet
Author: User
Restore Apache + MySQL after reinstalling the system
If Apache and MySQL are both installed on non-system disks and Windows is reinstalled, Apache and MySQL cannot be started. You are unwilling to use installation files to re-install the software. Open-Source Software generally does not use Windows COM or other components. You do not need to perform complex registry operations to install the software. Program Register as a Windows Service. The SC command of Windows can help us complete this job. The format is SC create Apache binpath = "D: \ apache2 \ bin \ httpd.exe "registers D: \ apache2 \ bin \ httpd.exe as a service named Apache. However, Apache and MySQL have the function of registering as a Windows service! D: \ apache2 \ bin> httpd /?
Usage: httpd [-D name] [-d directory] [-F file]
[-C "directive"] [-c "directive"]
[-W] [-k start | restart | stop | Shutdown]
[-K install | config | uninstall] [-N SERVICE_NAME]
[-V] [-V] [-H] [-L] [-L] [-T] [-S]
Options:
-D name: Define a name for use in <ifdefine Name> directives
-D directory: specify an alternate initial serverroot
-F file: specify an alternate serverconfigfile
-C "directive": Process directive before reading config files
-C "directive": Process directive after reading config files
-N name: Set service name and use its serverconfigfile
-K start: Tell Apache to start
-K restart: Tell running Apache to do A Graceful Restart
-K stop | Shutdown: Tell running Apache to shutdown
-K install: install an apache service
-K config: Change startup options of an apache service
-K uninstall: uninstall an apache service
-W: hold open the console window on Error
-E level: Show startup errors of level (see loglevel)
-E file: log startup errors to file
-V: Show version number
-V: Show compile settings
-H: List available command line options (this page)
-L: list compiled in Modules
-L: List available configuration directives
-T-D dump_vhosts: Show parsed settings (currently only vhost settings)
-S: a synonym for-T-D dump_vhosts
-T-D dump_modules: show all loaded modules
-M: a synonym for-T-D dump_modules
-T: Run syntax check for config filesd: \ apache2 \ bin> Run D: \ apache2 \ bin \ httpd.exe-K installapache to register as a Windows service, use D: \ apache2 \ bin \ Net start apache2.2 to start it. Works with httpd. the phpinidir "D:/PHP" command in conf PHP can also continue to use the example, MySQL is D: \ mysql \ bin \ mysqld-nt.ext -- install MySQL -- defaults-extra-file = D: \ srv \ mysql \ My. inid: \ mysql \ bin \ Net start MySQL

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.