I installed Apache, PHP and Mysql separately on a Windows computer, but I would like to know how I can start, stop and restart Apache without using Windows Services but directly using DOS. On Linux I do it this way:
sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl restart apache2
But what about Windows, is there a way to boot from DOS?
CodePudding user response:
Mate, Windows stopped including DOS about 2 decades ago, unless you are running Windows 98 or something around that era you will not be able to do anything in DOS via Windows.
To run commands in Windows now days you would do it with Command Prompt or PowerShell.
Open Command Prompt as Administrator
Type 'net start' to see a list of running services, locate the name for the Apache service e.g. "Apache2.4"
To stop service type "net stop Apache2.4"
Top start service again type "net start Apache2.4"
Alternative approach would be to install a pre build stack locally on Windows such as XAMMP which comes with a GUI control console where you can start/stop services such as Apache, MySQL.