Install, uninstall Apache under Windows environment

Source: Internet
Author: User

Installing Apache Services

Open the Apcahe directory, open the bin directory,

such as: E:\wamp\Apache24\bin, open the directory, SHIFT + right mouse button,

Click here to open the Command window or the W shortcut directly here,

You can also window key +r, enter CMD to open the Command Window CD to E:\wamp\Apache24\bin (Can be tab to fill the whole directory/file name)

Command line Input installation command

httpd-k Install default service name Apache2.4

Or

httpd-k install-n "apacheserver" service named apacheserver

  

The Httpd.exe in this directory is the server execution program, according to the official website, we first installed Apache as an application software service to the system services, run the command:

Httpd-k install-n "Apacheserver"

After executing this command, if there is no problem, the Apache service installed successfully, the service name is: Apacheserver This we can customize, if only to execute

Httpd-k Install

This defaults to installing the Apache service named: Apache2.4

If prompted, OS 5 denial of service, AH00369 such an error is that the current account does not have permission to perform the operation

, you need to open the C:\Windows\System32 directory, right-click Cmd.exe choose to run as Administrator or open the bottom left corner (window key) to find all Programs-Accessories-command Prompt right-click Run as Administrator, execute the installation command again

Window key +r, enter services.msc, open the list of services, find the service name just given to the installation, and the default is automatic, the system starts the service also started, do not need to start the service manually

Start, stop, restart

Http-k Operation Command [-N Service Name] (default does not require service name)

  start : httpd-k start or httpd-k start-n "Apacheserver"

  Stop : httpd-k stop or httpd-k shutdown-n "Apacheserver" (Stop and Shutdown stops)

   Restart: httpd-k restart or httpd-k shutdown-n "Apacheserver"

Uninstall Command

httpd-k Uninstall or httpd-k uninstall-n "Apacheserver"

You can use this command to view

Netstat-an "This command can see what programs are running on the current machine, including ports"

Settings can be started in any directory, close Apache, need to configure the path .

, if not configured, the following error is indicated

HTTPD is not an internal or external command

The specific configuration path is : set the environment variable

environment variable, Advanced Environment Configuration , properties , Computers

This setting is a user variable, you can also set the system variable, if you want to do not have path, you can create a new

This position is E:\wamp\Apache24\bin; The bin directory of the Apache installation directory

After completion, restart the command window to take effect

Install, uninstall Apache under Windows environment

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.