How to install and start apache service from command line

How to install and start apache service from command line

i.To install apache as a service from command line

Syntax:
1.start->run->type cmd->click ok
2.Type the root folder path of apache

c:/apache> cd bin
c:/apache>bin>httpd -k install -n “ServiceName”

ServiceName will be called ‘Apache’.

ii.To start,stop,restart,shutdown apache service from command line

Syntax:

c:/apache>bin>httpd -k start
c:/apache>bin>httpd -k restart
c:/apache>bin>httpd -k stop
c:/apache>bin>httpd -k shutdown

Leave a Reply


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.