![]() ![]() sudo ln -s /mnt/c/Users/YOUR WINDOWS USERNAME/Documents/server /var/www/devroot sudo mkdir /mnt/c/Users/YOUR WINDOWS USERNAME/Documents/serverĬreate a symbolic link to the selected folder. Please replace YOUR WINDOWS USERNAME with your Windows username. The following command will create a server folder inside your Documents directory. I recommend you to use your Documents folder. This folder should be outside of the WSL filesystem. Install Apache: sudo apt-get install apache2Ĭreate a project folder for your web applications. Once the PPA is configured, update the local package index: sudo apt-get update To add the PPA, run the following command in the WSL bash: sudo add-apt-repository ppa:ondrej/apache2 ![]() Ondřej Surý’s PPA offers the latest Apache/PHP packages for Ubuntu. A Personal Package Archive (PPA) is a repository that allows third-party developers to build and distribute packages for Ubuntu. We need to add a PPA for Apache packages. We want to install the latest stable version of Apache, but official Ubuntu repositories don’t contain the latest release. If you have successfully installed Bash on Ubuntu on Windows, let’s install and configure a simple LAMP stack for development. ![]() Microsoft has a great tutorial on how to install WSL, please follow the instructions of the article. But, in this tutorial, we will set up the LAMP stack on Ubuntu, so you need to select Ubuntu. You can install more Linux distributions from the Microsoft Store (Ubuntu, openSUSE, SUSE Linux Enterprise Server 12). familiarity with Linux/bash (If you would like to get familiar with the command-line, you can read this DigitalOcean tutorial).įirst, you will need WSL installed on your computer.A 64-bit version of Windows 10 with the Creators Update or later.Prerequisitesīefore you begin this guide, you will need the following: You can set up other stacks (for example, a LEMP stack) with similar methods. In this tutorial, we will set up a LAMP stack (Ubuntu 16.04, Apache, PHP 7.1, MariaDB) on WSL for development. These methods will work on the latest stable releases of Windows 10 as well. Note: This article is not only for the Windows Insiders. We can run a Linux environment directly on Windows without the overhead of a virtual machine. Microsoft says: “This is primarily a tool for developers - especially web developers and those who work on or with open source projects”. WSL is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10. But, Microsoft now offers a great option for PHP developers who work on Windows: The Windows Subsystem for Linux (WSL). PHP development on Windows has some disadvantages. By András Magyar How to set up a PHP development environment on Windows Subsystem for Linux (WSL) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |