Install Apache In Windows 10

Posted on  by 

NOTE: I fought this installation a lot and fixed numerous issues, but in the end I got stuck on a C++ compilation failure in the Airflow install via pip. So, I’m switching to installing it in a new post in an Ubuntu shell available in the Windows 10 store since I’ll be running Airflow in Linux in production anyway. So, there is probably some helpful stuff here; but its not a full solution and I recommend against doing Airflow this way given my experiences here.

  1. Apache Download For Windows 10
  2. Install Apache Server In Windows 10
  3. Install Apache Jmeter Windows 10
  4. Install Apache Netbeans Windows 10
  5. Install Apache In Windows 10 Using Vbox Linux
  6. Install Apache Maven In Windows 10
  7. Install Apache Server In Windows 10

I’m relatively new to Python and have only really used it for simplistic scripts in the past; but now I’ll be using it for a new job along with Apache Airflow (which is very cool).

Anyway, I just had a terrible time installing Airflow… so I thought I’d document the issues here and a working solution on Windows 10:

  1. Install python 3.6.7 from here: https://www.python.org/downloads/release/python-367/
    • (Do not use Python 3.7; as of 2018-11-06, “pip install apache-airflow” will install apache-airflow-1.10.0, and the installer will try and use the “async” keyword, which is now a reserved word in Python 3.7, so it will fail).
  2. Make sure Python and its Scripts directory are in your path (Python’s installer may or may not do this. If you open a new command line after the Python install and “python –version” doesn’t show 3.6.7, you need to do it.
    • Note that the scripts directory is where pip is; this is your package installer for adding modules to Python.
  3. Upgrade pip with: python -m pip install –upgrade pip
  4. The installation command for Airflow is “pip install apache-airflow”. But in my case, this failed a few more times due to other dependencies/issues. So, I had to do the following before this worked:
    • Set this environment variable: “set SLUGIFY_USES_TEXT_UNIDECODE=yes”
    • Install Microsoft Visual C++ 14 build packages (this is time consuming) and upgrade the build tools in Pip.
      • pip install –upgrade setuptools
      • install the “Build Tools for Visual Studio 2017” from: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017
        • Once the interface opens for the installer, install Visual C++ build tools – Build Windows desktop applications using the Microsoft C++ toolset, ATL, or MFC. I also checked the following boxes on the right:
          • Windows 10 SDK (10.0.17134.0)
          • Visual C++ tools for CMake
          • Testing tools core features – Build Tools
          • VC++ 2015.3 v14.00 (v140) toolset for desktop
          • Windows Universal CRT SDK
          • Windows 8.1 SDK
          • Installation is 2.5GB! Woah.
  5. Open a new command line so it picks up everything and then run
    • set SLUGIFY_USES_TEXT_UNIDECODE=yes
    • pip install apache-airflow
    • IT STILL DIDN’T WORK! – The error is a complex SYSTEM_THREADING related one and online docs for it seem to not have a resolution.
      There’s probably a way to fix this; but at this point I’m going to switch to installing it in a Ubuntu shell subsystem from the Windows 10 store in a new blog post – I’ve wasted enough time on this given I’ll be running Airflow in Linux in production anyway.

Jun 18, 2015  Home ∼ How to Install and Run Apache Web Server on Windows 10. How to Install and Run Apache Web Server on Windows 10. June 18, 2015 admin. That’s how easy it is to run Apache Web Server on a Windows 10 box. Posted in Development. Installing Prerequisites for. How to Download and Install NetBeans IDE on Windows 10: this is a step by step guide on how to download and install NetBeans 10.0 and Java JDK 11 on Windows 10. The incubating versions of NetBeans 10 do not come with an installer, hence we will use the binary files provided by Apache.

Install Apache In Windows 10

This article picks up where we left off in my last article titled “XAMPP or WampServer or…? Think again!” where basic idea was to point out that you might not need bulky WAMP packages, and we also covered simpler yet smarter alternatives. In this article, we are going to install Apache 2.4 and PHP 7.1 on a Windows 10 machine.

If you don’t really require components such as FileZilla FTP server, Mercury Mail, MySQL or MariaDB, Perl, etc… that comes built-in with XAMPP, you can always opt to individually install the ones that you do need. This is in fact a better and modest choice.

  1. Now click ok, and the windows will keep closing. This has to be done because the Web Server’s daemon runs as a Service on windows. Press win+R, or open Run. Find the ‘Apache’ service, right click on it and press start. Open Command Prompt as Admin, and write. Httpd –k install. When the window pops “Allow Access”.
  2. To download and install XAMPP on your Windows 10 computer, use the following steps: Download XAMPP from Apache Friends. Note: If you have special version requirements for PHP. Double-click the file to run the installer. Click the OK button on the warning to continue. Click the Next button.

Before we proceed…

Are you certain that your app “requires” to be developed in Apache environment? You may also look at this article that covers installing and configuring PHP 7 with Nginx web server on windows 10. Most importantly, If you are just looking forward to execute simpler PHP scripts or tests in a web browser then you don’t really need a fully loaded web server since PHP has its own built-in web server since PHP 5.4, and our primary article covers how you can use it, click here.

Apache Download For Windows 10

1. Prerequisites

You need to have Microsoft Visual C++ Redistributable 15 (2017) and/or 14 (2015) (depending on packages that you select) installed on your PC beforehand. If not already installed, You may download VC15 and 14 from official Microsoft page: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

Install

2. Installing PHP 7.1

Install Apache Server In Windows 10

Note: Procedure is identical if you want to install a different version of PHP (i.e. 7.0 or 7.2)

  1. Download thread-safe PHP 7.1 binaries from this official PHP downloads page for Windows OS.
  2. Extract ZIP archive on a relevant location. (i.e. C:PHP7.1)
  3. Rename the php.ini-development file to simply php.ini

3. Installing Apache 2.4 web server

Please note that binaries for Windows 10 are not directly downloadable from official Apache website. Therefore you may download latest binaries of Apache 2.4 for Windows from either ApacheHaus or ApacheLounge.

The Apache HTTP Server Project itself does not provide binary releases of software, only source code. Individual committers may provide binary packages as a convenience, but it is not a release deliverable.

  1. Download a binaries package. In this example, I have downloaded Apache 2.4.29 for VC15 from ApacheLounge downloads page.
  2. Obviously, Extract this ZIP archive once downloaded
  3. Copy Apache24 directory into drive C: (i.e. C:Apache24)

4. Configuring Apache 2.4 to work with PHP 7.1

Install Apache Jmeter Windows 10

  1. Open httpd.conf file in C:Apache24conf in a text editor.
  2. Find DocumentRoot declaration and change paths to your own working directory. (You may also skip this step by simply moving all your work files to working directory that is already configured)
    So, if your working directory is D:Work, you will change paths to:
  3. Find DirectoryIndex directive and add “index.php”
  4. Add following lines at top of this httpd.conf file:
    LoadModule php7_module'c:/PHP 7.1/php7apache2_4.dll'PHPIniDir'c:/PHP 7.1'AddHandler application/x-httpd-php.phpAddType application/x-httpd-php.php
  5. Save and close configuration file!

Install Apache Netbeans Windows 10

5. Testing

  1. Create a simple phpinfo file in your working directory
  2. Execute C:Apache24binhttpd.exe file (Command prompt window will stay open until you close this window or terminate process manually which will cause Apache to stop working as well)
  3. Open web browser and visit http://localhost/ to open your phpinfo file

Install Apache In Windows 10 Using Vbox Linux

Install

Here are screenshots from a local machine after successful installation:

6. Install Apache 2.4 as service

Install Apache Maven In Windows 10

Optionally, you may install Apache 2.4 as service to have it running in background all the time. This may be preferred since you will not be required to keep a command prompt window open all the time.

Install Apache Server In Windows 10

  1. Open command prompt (as Administrator)
  2. Navigate to c:Apache24bin
  3. To install, execute httpd.exe-kinstall
  4. To start or stop, execute net start Apache2.4 or net stop Apache2.4
  5. To uninstall as service, execute httpd.exe-kuninstall

Note: You may also create a shortcut to “ApacheMonitor.exe” on desktop. Opening this will show ApacheMonitor icon in notifications tray area and you will be able to manage Apache 2.4 once it has been installed as service.

Coments are closed