This guide is continuously being updated, as reality demands updates. If you find any errors in this guide, please let us know.

This will guide you through installing the parentNode web stack on a Windows 10. The full stack includes Apache 2.4, PHP 7.2, MariaDB 10.2, Redis, Imagick, FFmpeg and wkhtmltopdf.

The majority of the install process will be handled by an install script, which will also take care of updating config files and creating relevant paths. But there are a few steps to get through before that.

Prerequisites

You need to be running a fully updated 64-bit version of Windows 10 to install the web stack for Windows. So check you system for updates before you continue. If you are in doubt of whether your are running a 64-bit version. Go to System and check the Systemtype value – it will say either 32-bit or 64-bit. If you're running a 32-bit version of the operating system, you might find some help to upgrade to 64-bit on Google.

You also need the Windows subsystem for Linux, Ubuntu on Windows and Bash. There are a few steps involved in setting in that set up, so we made a small guide to help you get through.

Open Control Panel, click on Programs and then on Turn Windows features on or off.

This will show you a long list of Windows features. Find the Windows Subsystem for Linux and turn it on.

Once the components are installed on your computer, accept to  restart your computer to complete the task.

Install the Ubuntu app from the Windows app store – go to https://www.microsoft.com/store/apps and search for Ubuntu 18.04, and then click download and install. When the Ubuntu app in installed, launch it and wait while it installs Bash. It can take a while, so be patient. When it is done, you'll need to create a new user and password for the Linux subsystem.

Once you have entered the username and password, the Ubuntu and Bash installation is done.

NOTE: The cursor doesn't move when you type the password. That's how it is – it's for your own protection.

NOTE: Be aware that Copy/Paste does not work as you would expect in Bash (or CMD, PowerShell or other command-line tools in Windows). You have to right-click to paste, rather than using the CTRL-v shortcut.

Installation of the web stack

Open Bash as Administrator (right-click on the Bash application and select run as Administrator), paste the following command and press [ENTER]:

bash <(curl -s https://parentnode.dk/installers/install-windows-stack.txt)

The setup script will guide you through the rest of the installation. Make sure you stay online during the setup process, which will take approximately 5-15 minutes, depending on your computer/internet connection.

Lean back. When the script states Server setup complete you are done. Congratulations. Enjoy the parentNode realm.

Optional further reading

What to expect from the installation process

As the first thing, you will be asked to enter your password. You have to enter the password you specified in the Bash setup. This allows the install script to copy the needed configuration files to your system.

Then the script will ask you for your Git username and email. This information will be added to your global Git configuration, and allows for the underlying Git service to work seamlessly.

The script will then ask you for your new Database administrator (root) password. This ensures that the database content is well protected. You should make sure you can remember this password later.

You will only be asked to define root password for the database the first time you run the installer script.

The script will prompt you to install the Visual Studio C++ compiler and MariaDB. You need to agree to installing both. You may be asked to restart your computer after an install has finished, but it is OK to wait until the parentNode install script has finished.

If you have the Windows Defender turned on for your system, you will also be prompted to allow access to Apache HTTP server. You only allow it to be accessed on private networks.

The script will also perform a number of system checks, and tells you how to proceed if a missing requirement is preventing the script from finishing. Just run the install script again, after fulfilling such a requirement, if any show up.

If you want to know what the install scripts are doing you can read through the code in the open source repository on GitHub.

About the installer

The installer requires Bash, Ubuntu on Windows and the Windows subsystem for Linux, because it is based on our original installer for Ubuntu and Mac. By using the Linux subsystem, we don't have to reinvent the wheel – and you'll get a really nice Linux subsystem on your Windows machine as a reward.

The Visual Studio C++ compiler and MariaDB will be installed in the default Windows Programs location. Apache HTTP server and PHP will be installed in C:srvinstalled-packages.

The script will add a special Git color scheme to your Bash prompt. It also adds a number of aliases to your .profile, to provide you with a set of maintenance tools. These updates will only come into effect after you restart the Bash terminal.

Bash commands

After installation, you will also have the following commands available in your bash terminal.

Apache controller. This allows you to stop, start and restart the Apache HTTP server.

apache [stop|start|restart]

Go to your sites folder. Just type sites, and you'll go there.

sites

Enable site. Adds project details to hosts-file and apache.conf – and restarts Apache. Read more in the post, Enable a site.

enable_site [currently in development]

Trouble shooting

Curl is not working

On some configurations, typically with 3rd party Antivirus or system protection Curl has been observed not to work. The solution so far has been to copy libeay32.dll and ssleay32.dll from C:/srv/installed-packages/php722 to C:/Windows/System32. Restart Apache and you should be good to go.

Files

These files will be downloaded and installed on your computer.